|
|||||||||
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. |
java.lang.Object |
getDefaultValue()
Return the default value for this field, or null if there is no default. |
java.lang.String |
getDescription()
Return a more detailed description of this field. |
java.net.URL |
getDocURL()
Return a URL pointing to documentation for this field, or null if not available |
java.lang.Class |
getFieldClass()
Return the class to use to store values in this field. |
java.lang.String |
getFormat()
Return a string describing the format of the field, if known, otherwise null |
java.lang.String |
getId()
Return the Id of this field. |
java.lang.String |
getLinkText(TableQueryResult tableQueryResult,
java.lang.Object value,
int row,
int column)
Return the text to display for the link, if there is one, otherwise null. |
QueryResult |
getLinkValue(TableQueryResult tableQueryResult,
java.lang.Object value,
int row)
If this field has a link, follow it and return the value it points to as a QueryResult. |
java.lang.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. |
java.lang.String |
getOptionName(int i)
Return the name of the ith option for this field. |
java.lang.Object |
getOptionValue(int i)
Return the value of the ith option for this field. |
java.lang.String |
getType()
Return a string describing the semantic type of the field (for example: "ra", "dec", "radius"). |
java.lang.String |
getUnits()
Return a string describing the units of the field values, if known (for example: "arcmin", "arcsec", "deg") |
java.lang.Object |
getValue(java.lang.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(java.lang.Object value)
Return true if the given value is valid for this field, otherwise false. |
Method Detail |
---|
java.lang.String getId()
java.lang.String getName()
java.lang.String getType()
getFieldClass()
java.lang.String getUnits()
java.lang.String getFormat()
java.lang.String getDescription()
java.net.URL getDocURL()
boolean hasLink()
java.lang.String getLinkText(TableQueryResult tableQueryResult, java.lang.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
java.lang.RuntimeException
- if the field is not a linkQueryResult getLinkValue(TableQueryResult tableQueryResult, java.lang.Object value, int row) throws java.net.MalformedURLException
tableQueryResult
- object representing the table datavalue
- the value in the table cellrow
- the row in the table
java.net.MalformedURLException
- if the value is not valid URL string
java.lang.RuntimeException
- if the value is not a stringjava.lang.Class getFieldClass()
java.lang.Object getValue(java.lang.String s)
java.lang.Object getDefaultValue()
int getNumOptions()
int getDefaultOptionIndex()
java.lang.String getOptionName(int i)
java.lang.Object getOptionValue(int i)
boolean isValid(java.lang.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 |