|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyValue
Represents the value of a property.
NOTE:
The underlying data type of a property is determined by its vocabulary.
The programmatic determination of a property type from a vocabulary is out of scope for this API.
Therefore, the only practical way to determine the appropriate getX() method for an arbitrary instance supporting this interface
is to obtain the name details via the getPropertyRef() method and compare the property information against
externally available vocabulary information.
Under the normal use cases for this API, the usage of an instance supporting this interface will be such that
the data type is already known, and the developer will take steps to use the appropriate getX() method.
Method Summary | |
---|---|
boolean |
exists()
Returns 'true' only if a value is available from the repository. Returns 'false' if a value is not available from the repository. If this method returns 'true', then the getX() methods will return valid data if type X is appropriate to the data stored in the repository. |
boolean |
getBoolean()
Returns the Boolean value of the property. |
double |
getDouble()
Returns the double value of the property, in the default units specified in its vocabulary. |
java.lang.String[] |
getEnumeration()
Returns the value of the property as a list of strings. |
float |
getFloat()
Returns the float value of the property, in the default units specified in its vocabulary. |
int |
getInteger()
Returns the integer value of the property, in the default units specified in its vocabulary. |
long |
getLong()
Returns the long value of the property, in the default units specified in its vocabulary. |
PropertyRef |
getPropertyRef()
Returns the PropertyRef that identifies the property to which this PropertyValue instance applies. |
java.lang.String |
getString()
Returns the string value of the property, or a string version of the property. |
Method Detail |
---|
double getDouble() throws ValueException
ValueException
- MUST be thrown (with code ValueException.INCOMPATIBLE_TYPES) if the property is not a double according to its vocabulary definition, or (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.long getLong() throws ValueException
ValueException
- MUST be thrown (with code ValueException.INCOMPATIBLE_TYPES) if the property is not a long according to its vocabulary definition, or (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.boolean getBoolean() throws ValueException
ValueException
- MUST be thrown (with code ValueException.INCOMPATIBLE_TYPES) if the property is not a Boolean according to its vocabulary definition, or (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.int getInteger() throws ValueException
ValueException
- MUST be thrown (with code ValueException.INCOMPATIBLE_TYPES) if the property is not an integer according to its vocabulary definition, or (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.java.lang.String[] getEnumeration() throws ValueException
ValueException
- MUST be thrown (with code ValueException.INCOMPATIBLE_TYPES) if the property is not an enumeration according to its vocabulary definition, or (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.float getFloat() throws ValueException
ValueException
- MUST be thrown (with code ValueException.INCOMPATIBLE_TYPES) if the property is not a float according to its vocabulary definition, or (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.PropertyRef getPropertyRef()
java.lang.String getString() throws ValueException
ValueException
- MUST be thrown (with code ValueException.NOT_KNOWN) if the the value is not known to the implementation.boolean exists()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |