|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DatatypeAware

Common base interface for Occurrences and Variants.
Some convenience methods for a subset of XML Schema Part 2: Datatypes are supported.
| Method Summary | |
|---|---|
java.math.BigDecimal |
decimalValue()
Returns the BigDecimal representation of the value. |
float |
floatValue()
Returns the float representation of the value. |
Locator |
getDatatype()
Returns the Locator identifying the datatype of
the value. |
java.lang.String |
getValue()
Returns the lexical representation of the value. |
java.math.BigInteger |
integerValue()
Returns the BigInteger representation of the value. |
int |
intValue()
Returns the int representation of the value. |
Locator |
locatorValue()
Returns the Locator representation of the value. |
long |
longValue()
Returns the long representation of the value. |
void |
setValue(java.math.BigDecimal value)
Sets the decimal value. |
void |
setValue(java.math.BigInteger value)
Sets the integer value. |
void |
setValue(float value)
Sets the float value. |
void |
setValue(int value)
Sets the int value. |
void |
setValue(Locator value)
Sets the IRI value. |
void |
setValue(long value)
Sets the long value. |
void |
setValue(java.lang.String value)
Sets the string value. |
void |
setValue(java.lang.String value,
Locator datatype)
Sets the string value and the datatype. |
| Methods inherited from interface org.tmapi.core.Reifiable |
|---|
getReifier, setReifier |
| Methods inherited from interface org.tmapi.core.Scoped |
|---|
addTheme, getScope, removeTheme |
| Methods inherited from interface org.tmapi.core.Construct |
|---|
addItemIdentifier, equals, getId, getItemIdentifiers, getParent, getTopicMap, hashCode, remove, removeItemIdentifier |
| Method Detail |
|---|
Locator getDatatype()
Locator identifying the datatype of
the value.
java.lang.String getValue()
For the datatype xsd:string
the string itself is returned. For the datatype
xsd:anyURI
the Locator.getReference() is returned.
void setValue(java.lang.String value)
throws ModelConstraintException
value - The string value.
ModelConstraintException - In case the value is null.
void setValue(Locator value)
throws ModelConstraintException
This method sets the datatype implicitly to xsd:anyURI.
value - The IRI value.
ModelConstraintException - In case the value is null.
void setValue(java.lang.String value,
Locator datatype)
throws ModelConstraintException
value - The string value.datatype - The value's datatype.
ModelConstraintException - In case the value or datatype
is null.
void setValue(java.math.BigDecimal value)
throws ModelConstraintException
This method sets the datatype implicitly to xsd:decimal.
value - The decimal value.
ModelConstraintException - In case the value is null.
void setValue(java.math.BigInteger value)
throws ModelConstraintException
This method sets the datatype implicitly to xsd:integer.
value - The integer value.
ModelConstraintException - In case the value is null.void setValue(long value)
This method sets the datatype implicitly to xsd:long.
value - The integer value.void setValue(float value)
This method sets the datatype implicitly to xsd:float.
value - The float value.void setValue(int value)
This method sets the datatype implicitly to xsd:int.
value - The int value.int intValue()
java.lang.NumberFormatException - If the value cannot be represented as
a int.java.math.BigInteger integerValue()
BigInteger representation of the value.
BigInteger representation of the value.
java.lang.NumberFormatException - If the value cannot be represented as
a BigInteger instance.float floatValue()
java.lang.NumberFormatException - If the value cannot be represented as
a float.java.math.BigDecimal decimalValue()
BigDecimal representation of the value.
BigDecimal representation of the value.
java.lang.NumberFormatException - If the value cannot be represented as
a BigDecimal instance.long longValue()
java.lang.NumberFormatException - If the value cannot be represented as
a long.Locator locatorValue()
Locator representation of the value.
Locator representation of the value.
java.lang.IllegalArgumentException - If the value cannot be represented as
a Locator instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||