Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## es.upm.gib.eutilsrdfwrapper.motor
Class Results

    java.lang.Object
      es.upm.gib.eutilsrdfwrapper.motor.Results

    public class Results

extends java.lang.Object

This class represents the dynamic retrieval of results from NCBI, related to a specific query. Objects of this class do not hold results, but rather allow us to retrieve the results of a query. Due to restrictions in the NCBI design, results are not given all at a time, but rather must be requested in small groups. This class adapts that functionality and offers a method for asking if there are more available results, and obtaining one more result.

Constructor Summary
`Results(ConceptsQuery query)` Class constructor

Method Summary
`int` | `getColumnCount()` Returns the number of columns to retrieve data
`java.lang.String` | `getColumnName(int index)` Returns the name of the column that corresponds to the requested index
`java.util.List<java.lang.String>` | `getHeader()` Retrieves the header (global variable names) of this Results object
`java.util.List<java.util.List<java.lang.String>>` | `getHeaderAux()`
`InternalQueryState` | `getInternalQueryState()` Retrieves the internal query state of the Results object
`java.util.List<java.util.List<java.lang.String>>` | `getResults()` Returns the stored results for this query
`java.lang.String` | `getValue(int column)` Retrieves the current value for a specific column (given by its index)
`java.lang.String` | `getValue(java.lang.String name)` Retrieves the current value for a specific column (given by its variable name)
`boolean` | `hasNext()` Indicates if more results can be retrieved
`void` | `nextRow()` Moves the index to the next valid result.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Results

    public Results(ConceptsQuery query)

  Class constructor

  Parameters:
    `query` - ConceptsQuery to be answered

Method Detail

### getHeaderAux

    public java.util.List<java.util.List<java.lang.String>> getHeaderAux()

### getHeader

    public java.util.List<java.lang.String> getHeader()

  Retrieves the header (global variable names) of this Results object

  Returns:
    a list with the names of the variables for this Results object

### getResults

    public java.util.List<java.util.List<java.lang.String>> getResults()

  Returns the stored results for this query

  Returns:
    the stored results for this query

### getInternalQueryState

    public InternalQueryState getInternalQueryState()

  Retrieves the internal query state of the Results object

  Returns:
    the internal query state of the Results object

### getColumnCount

    public int getColumnCount()

  Returns the number of columns to retrieve data

  Returns:
    the number of columns to retrieve data

### getColumnName

    public java.lang.String getColumnName(int index)

  Returns the name of the column that corresponds to the requested index

  Parameters:
    `index` - Indicates the array index of the recoverable data we get the name
  Returns:
    Returns the name of the column that corresponds to the requested index

### getValue

    public java.lang.String getValue(int column)
                              throws java.lang.IndexOutOfBoundsException

  Retrieves the current value for a specific column (given by its index)

  Parameters:
    `column` - Indicates the number of column we want to retrieve data
  Returns:
    Returns the data stored in the referenced column
  Throws:
    `java.lang.IndexOutOfBoundsException` - invalid column

### getValue

    public java.lang.String getValue(java.lang.String name)
                              throws java.lang.IllegalArgumentException

  Retrieves the current value for a specific column (given by its variable name)

  Parameters:
    `name` - Indicates the name of column we want to retrieve data
  Returns:
    Returns the data stored in the referenced column
  Throws:
    `java.lang.IllegalArgumentException` - if name is not a valid column

### hasNext

    public boolean hasNext()

  Indicates if more results can be retrieved

  Returns:
    true if at least one more result can be retrieved (must invoke "next" to retrieve it), false otherwise

### nextRow

    public void nextRow()
                 throws java.lang.IllegalStateException

  Moves the index to the next valid result. Must be invoked once before retrieving a result for the first time

  Throws:
    `java.lang.IllegalStateException` - if there are no more results

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD