Package openllet.core.datatypes
Interface Datatype<T>
-
- Type Parameters:
T
- type of literal
- All Known Implementing Classes:
AbstractBaseDatatype
,AbstractDerivedIntegerType
,AbstractTimelineDatatype
,InfiniteNamedDatatype
,OWLRational
,OWLReal
,RDFPlainLiteral
,XSDAnyURI
,XSDBoolean
,XSDByte
,XSDDate
,XSDDateTime
,XSDDateTimeStamp
,XSDDecimal
,XSDDecimal
,XSDDouble
,XSDDouble
,XSDDuration
,XSDFloat
,XSDFloat
,XSDGDay
,XSDGMonth
,XSDGMonthDay
,XSDGYear
,XSDGYearMonth
,XSDInt
,XSDInteger
,XSDInteger
,XSDLanguage
,XSDLong
,XSDLong
,XSDName
,XSDNCName
,XSDNegativeInteger
,XSDNMToken
,XSDNonNegativeInteger
,XSDNonPositiveInteger
,XSDNormalizedString
,XSDPositiveInteger
,XSDShort
,XSDString
,XSDTime
,XSDToken
,XSDUnsignedByte
,XSDUnsignedInt
,XSDUnsignedLong
,XSDUnsignedShort
public interface Datatype<T>
Title: Datatype
Description: A datatype as described in the OWL 2 specificationf
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
- Author:
- Mike Smith
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestrictedDatatype<T>
asDataRange()
Get the canonical _data range for a datatypeopenllet.aterm.ATermAppl
getCanonicalRepresentation(openllet.aterm.ATermAppl input)
Get the canonical representation of a lexical formopenllet.aterm.ATermAppl
getLiteral(java.lang.Object value)
Get the canonicalATermAppl
literal representation for a value space object.openllet.aterm.ATermAppl
getName()
Get the datatype identifierDatatype<?>
getPrimitiveDatatype()
Get the primitive datatype associated with this datatype.T
getValue(openllet.aterm.ATermAppl literal)
Get the Java object representation of a _data valueboolean
isPrimitive()
Check if a datatype is primitive.
-
-
-
Method Detail
-
asDataRange
RestrictedDatatype<T> asDataRange()
Get the canonical _data range for a datatype- Returns:
- a
DataRange
representation of the datatype value space
-
getCanonicalRepresentation
openllet.aterm.ATermAppl getCanonicalRepresentation(openllet.aterm.ATermAppl input) throws InvalidLiteralException
Get the canonical representation of a lexical form- Parameters:
input
- a lexical form of the literal- Returns:
- the canonical representation of the lexical form
- Throws:
InvalidLiteralException
- if input is invalid
-
getLiteral
openllet.aterm.ATermAppl getLiteral(java.lang.Object value)
Get the canonicalATermAppl
literal representation for a value space object. This may be unsupported by datatypes for whichisPrimitive()
returnsfalse
.- Parameters:
value
- Element of the value space for some datatype- Returns:
- The
ATermAppl
representation ofvalue
- Throws:
java.lang.IllegalArgumentException
- ifvalue
is not contained in the value space of the datatype
-
getName
openllet.aterm.ATermAppl getName()
Get the datatype identifier- Returns:
ATermAppl
of URI for datatype
-
getPrimitiveDatatype
Datatype<?> getPrimitiveDatatype()
Get the primitive datatype associated with this datatype.- Returns:
this
ifisPrimitive() == true
, else a primitive datatype that is a superset of the value space of this datatype.
-
getValue
T getValue(openllet.aterm.ATermAppl literal) throws InvalidLiteralException
Get the Java object representation of a _data value- Parameters:
literal
- the literal- Returns:
- the Java object representation of the lexical form
- Throws:
InvalidLiteralException
- if literal is invalid
-
isPrimitive
boolean isPrimitive()
Check if a datatype is primitive. All datatypes are either primitive or derived. Derived datatypes are names for subsets of the value spaces of primitive datatypes, defined using specific constraining facet values.- Returns:
true
if the datatype is primitive,false
else
-
-