|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldDesc
This interface describes a catalog field, which may be an input field, such as a query parameter, or an output field, such as a table column description. Any of the methods may return null, if the information is not known, although normally, at least a field name should be provided. To save work, classes that implement this interface may be derived from FieldDescAdatper and override as many of the methods as needed.
Method Summary | |
---|---|
int |
getDefaultOptionIndex()
Return the index of the default option, or -1 if there is no default. |
Object |
getDefaultValue()
Return the default value for this field, or null if there is no default. |
String |
getDescription()
Return a more detailed description of this field. |
URL |
getDocURL()
Return a URL pointing to documentation for this field, or null if not available |
Class |
getFieldClass()
Return the class to use to store values in this field. |
String |
getFormat()
Return a string describing the format of the field, if known, otherwise null |
String |
getId()
Return the Id of this field. |
String |
getLinkText(TableQueryResult tableQueryResult,
Object value,
int row,
int column)
Return the text to display for the link, if there is one, otherwise null. |
QueryResult |
getLinkValue(TableQueryResult tableQueryResult,
Object value,
int row)
If this field has a link, follow it and return the value it points to as a QueryResult. |
String |
getName()
Return the name of this field. |
int |
getNumOptions()
If a list of options was defined for the field, return the number of options, otherwise 0. |
String |
getOptionName(int i)
Return the name of the ith option for this field. |
Object |
getOptionValue(int i)
Return the value of the ith option for this field. |
String |
getType()
Return a string describing the semantic type of the field (for example: "ra", "dec", "radius"). |
String |
getUnits()
Return a string describing the units of the field values, if known (for example: "arcmin", "arcsec", "deg") |
Object |
getValue(String s)
Parse the given string into the correct class type for this field and return the value. |
boolean |
hasLink()
Return true if the field has a link pointing to more data. |
boolean |
isDec()
Return true if this field contains a world coordinates Dec value. |
boolean |
isId()
Return true if this field is the unique id. |
boolean |
isMax()
Return true if this field represents the max value of a range. |
boolean |
isMin()
Return true if this field represents the min value of a range. |
boolean |
isRA()
Return true if this field contains a world coordinates RA value. |
boolean |
isValid(Object value)
Return true if the given value is valid for this field, otherwise false. |
Method Detail |
---|
String getId()
String getName()
String getType()
getFieldClass()
String getUnits()
String getFormat()
String getDescription()
URL getDocURL()
boolean hasLink()
String getLinkText(TableQueryResult tableQueryResult, Object value, int row, int column)
tableQueryResult
- object representing the table datavalue
- the value in the table cellrow
- the row in the tablecolumn
- the column in the table
RuntimeException
- if the field is not a linkQueryResult getLinkValue(TableQueryResult tableQueryResult, Object value, int row) throws MalformedURLException
tableQueryResult
- object representing the table datavalue
- the value in the table cellrow
- the row in the table
MalformedURLException
- if the value is not valid URL string
RuntimeException
- if the value is not a stringClass getFieldClass()
Object getValue(String s)
Object getDefaultValue()
int getNumOptions()
int getDefaultOptionIndex()
String getOptionName(int i)
Object getOptionValue(int i)
boolean isValid(Object value)
boolean isId()
boolean isRA()
boolean isDec()
boolean isMin()
boolean isMax()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |