|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.URLValueInfo
public class URLValueInfo
ValueInfo for URL values.
| Constructor Summary | |
|---|---|
URLValueInfo(java.lang.String name,
java.lang.String description)
Constructs a new URLValueInfo. |
|
| Method Summary | |
|---|---|
java.lang.String |
formatValue(java.lang.Object value,
int maxLength)
Returns a string representation of a given value described by this ValueInfo. |
javax.swing.table.TableCellRenderer |
getCellRenderer()
|
java.lang.Class |
getContentClass()
Returns the java class of the values described by this object. |
java.lang.String |
getDescription()
Returns a description of the values described by this object. |
DomainMapper[] |
getDomainMappers()
Returns an array of objects which may be able to convert from the values described by this info to a particular target value domain. |
int |
getElementSize()
May indicate the size of a value element stored as the value of this info. |
java.lang.String |
getName()
Returns the name of this object. |
int[] |
getShape()
Returns the shape associated with array value types. |
java.lang.String |
getUCD()
Returns the Unified Column Descriptor string applying to the values described by this object. |
java.lang.String |
getUnitString()
Returns a string representing the units of the values described by this object. |
java.lang.String |
getUtype()
Returns the Utype string applying to the values described by this object. |
boolean |
isArray()
Indicates whether the values described by this object are java arrays. |
boolean |
isNullable()
Indicates whether values returned described by this object may have the value null. |
java.lang.Object |
unformatString(java.lang.String rep)
Returns an object of the sort described by this ValueInfo represented by the given string rep. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLValueInfo(java.lang.String name,
java.lang.String description)
name - info namedescription - info description| Method Detail |
|---|
public java.lang.String getName()
ValueInfo
getName in interface ValueInfopublic java.lang.String getDescription()
ValueInfo
getDescription in interface ValueInfopublic java.lang.String getUnitString()
ValueInfo
getUnitString in interface ValueInfopublic java.lang.String getUCD()
ValueInfo
getUCD in interface ValueInfoUCDpublic java.lang.String getUtype()
ValueInfo
getUtype in interface ValueInfonull if none is knownpublic java.lang.Class getContentClass()
ValueInfoThe class returned should not under normal circumstances be an array of arrays; to express multidimensionality of arrays you should store an array of non-array objects or of primitives and provide shape information via the getShape method. There is nothing to stop you describing arrays of arrays with a ValueInfo, but some other elements of the tables infrastructure and applications may work on the assumption that such objects are not present.
Note that to store sets of more than 231 items it will be necessary to use some custom object, since java arrays are indexed by type int.
getContentClass in interface ValueInfopublic boolean isArray()
ValueInfo
getContentClass().getComponentType()!=null
isArray in interface ValueInfopublic int[] getShape()
ValueInfoValueInfo.getContentClass() is a java array type,
the return from this method may contain information about
the shape of the rectangular array which this represents.
The dimensions of the array are given in the elements of
the return value of this method, fastest varying first.
All elements of the array should be positive, except that the
last (slowest varying) element may be <=0 (conventionally -1)
to indicate that the number of (shape.length-1)-dimensional
slices contained in the value is not known.
If nothing is known about the shape of the array values,
then a 1-element array whose only element is <=0 should be returned.
If getContentClass does not give an array type (hence isArray returns false) the return value for this method is undefined (but should probably be null).
getShape in interface ValueInfopublic int getElementSize()
ValueInfoValueInfo.getShape() (or by 1, if getShape
is null).
The exact meaning of the value returned is dependent on this ValueInfo. This method was introduced to return the maximum number of characters in a String-class ValueInfo; this information is necessary for writing out to certain formats (FITS). Other ValueInfo types however may use it for their own purposes.
ValueInfo instances which decline to supply this information should return -1 from this method.
getElementSize in interface ValueInfopublic boolean isNullable()
ValueInfo
isNullable in interface ValueInfopublic DomainMapper[] getDomainMappers()
ValueInfo
getDomainMappers in interface ValueInfo
public java.lang.String formatValue(java.lang.Object value,
int maxLength)
ValueInfo
formatValue in interface ValueInfovalue - the value to representmaxLength - the maximum number of characters in the returned
stringpublic java.lang.Object unformatString(java.lang.String rep)
ValueInfo
unformatString in interface ValueInforep - the string representation of a value described by
this ValueInfo
public javax.swing.table.TableCellRenderer getCellRenderer()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||