jsky.catalog
Interface QueryArgs

All Known Implementing Classes:
BasicQueryArgs, IRSAQueryArgs

public interface QueryArgs

An interface representing the values of the arguments to a catalog query. The values correspond one to one with a given catalog's parameters, as returned by the Catalog.getParamDesc(index) method.

See Also:
Catalog.getNumParams(), Catalog.getParamDesc(int)

Method Summary
 Catalog getCatalog()
          Return the catalog we are accesing.
 SearchCondition[] getConditions()
          Return an array of SearchCondition objects indicating the values or range of values to search for.
 String getId()
          Return the object id being searched for, or null if none was defined.
 int getMaxRows()
          Returns the max number of rows to be returned from a table query
 Object getParamValue(int i)
          Get the value of the ith parameter
 Object getParamValue(String label)
          Get the value of the named parameter
 double getParamValueAsDouble(String label, double defaultValue)
          Get the value of the named parameter as a double.
 int getParamValueAsInt(String label, int defaultValue)
          Get the value of the named parameter as an integer.
 String getParamValueAsString(String label, String defaultValue)
          Get the value of the named parameter as a String.
 String getQueryType()
          Returns the query type (an optional string, which may be interpreted by some catalogs)
 CoordinateRadius getRegion()
          Return an object describing the query region (center position and radius range), or null if none was defined.
 void setId(String id)
          Set the object id to search for.
 void setMaxRows(int maxRows)
          Set the max number of rows to be returned from a table query
 void setParamValue(int i, Object value)
          Set the value for the ith parameter
 void setParamValue(String label, double value)
          Set the double value for the parameter with the given label
 void setParamValue(String label, int value)
          Set the int value for the parameter with the given label
 void setParamValue(String label, Object value)
          Set the value for the parameter with the given label
 void setParamValues(Object[] values)
          Set the array of parameter values directly.
 void setQueryType(String queryType)
          Set the query type (an optional string, which may be interpreted by some catalogs)
 void setRegion(CoordinateRadius region)
          Set the query region (center position and radius range) for the search.
 

Method Detail

setParamValue

void setParamValue(int i,
                   Object value)
Set the value for the ith parameter


setParamValue

void setParamValue(String label,
                   Object value)
Set the value for the parameter with the given label


setParamValue

void setParamValue(String label,
                   int value)
Set the int value for the parameter with the given label


setParamValue

void setParamValue(String label,
                   double value)
Set the double value for the parameter with the given label


setParamValues

void setParamValues(Object[] values)
Set the array of parameter values directly.


getParamValue

Object getParamValue(int i)
Get the value of the ith parameter


getParamValue

Object getParamValue(String label)
Get the value of the named parameter

Parameters:
label - the parameter name or id
Returns:
the value of the parameter, or null if not specified

getParamValueAsInt

int getParamValueAsInt(String label,
                       int defaultValue)
Get the value of the named parameter as an integer.

Parameters:
label - the parameter label
defaultValue - the default value, if the parameter was not specified
Returns:
the value of the parameter

getParamValueAsDouble

double getParamValueAsDouble(String label,
                             double defaultValue)
Get the value of the named parameter as a double.

Parameters:
label - the parameter label
defaultValue - the default value, if the parameter was not specified
Returns:
the value of the parameter

getParamValueAsString

String getParamValueAsString(String label,
                             String defaultValue)
Get the value of the named parameter as a String.

Parameters:
label - the parameter label
defaultValue - the default value, if the parameter was not specified
Returns:
the value of the parameter

getId

String getId()
Return the object id being searched for, or null if none was defined.


setId

void setId(String id)
Set the object id to search for.


getRegion

CoordinateRadius getRegion()
Return an object describing the query region (center position and radius range), or null if none was defined.


setRegion

void setRegion(CoordinateRadius region)
Set the query region (center position and radius range) for the search.


getCatalog

Catalog getCatalog()
Return the catalog we are accesing.


getConditions

SearchCondition[] getConditions()
Return an array of SearchCondition objects indicating the values or range of values to search for.


getMaxRows

int getMaxRows()
Returns the max number of rows to be returned from a table query


setMaxRows

void setMaxRows(int maxRows)
Set the max number of rows to be returned from a table query


getQueryType

String getQueryType()
Returns the query type (an optional string, which may be interpreted by some catalogs)


setQueryType

void setQueryType(String queryType)
Set the query type (an optional string, which may be interpreted by some catalogs)



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.