public class InfiniteNamedDatatype extends Object implements Datatype<aterm.ATermAppl>
Title: Infinite Named Datatype
Description: Infinite named datatype, which permits all strings as lexical forms and for which identity and equality of the value space match equality of the lexical space.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Modifier and Type | Method and Description |
|---|---|
RestrictedDatatype<aterm.ATermAppl> |
asDataRange()
Get the canonical data range for a datatype
|
boolean |
equals(Object obj) |
static InfiniteNamedDatatype |
get(aterm.ATermAppl dtName)
Get an instance with a specific name.
|
aterm.ATermAppl |
getCanonicalRepresentation(aterm.ATermAppl input)
Get the canonical representation of a lexical form
|
aterm.ATermAppl |
getLiteral(Object value)
Get the canonical
ATermAppl literal representation for a value
space object. |
aterm.ATermAppl |
getName()
Get the datatype identifier
|
Datatype<?> |
getPrimitiveDatatype()
Get the primitive datatype associated with this datatype.
|
aterm.ATermAppl |
getValue(aterm.ATermAppl literal)
Get the Java object representation of a data value
|
int |
hashCode() |
boolean |
isPrimitive()
Check if a datatype is primitive.
|
String |
toString() |
public static InfiniteNamedDatatype get(aterm.ATermAppl dtName)
dtName - the name of the datatypepublic RestrictedDatatype<aterm.ATermAppl> asDataRange()
DatatypeasDataRange in interface Datatype<aterm.ATermAppl>DataRange representation of the datatype value spacepublic aterm.ATermAppl getCanonicalRepresentation(aterm.ATermAppl input)
throws InvalidLiteralException
DatatypegetCanonicalRepresentation in interface Datatype<aterm.ATermAppl>input - a lexical form of the literalInvalidLiteralExceptionpublic aterm.ATermAppl getLiteral(Object value)
DatatypeATermAppl literal representation for a value
space object. This may be unsupported by datatypes for which
Datatype.isPrimitive() returns false.getLiteral in interface Datatype<aterm.ATermAppl>value - Element of the value space for some datatypeATermAppl representation of valuepublic aterm.ATermAppl getName()
Datatypepublic Datatype<?> getPrimitiveDatatype()
DatatypegetPrimitiveDatatype in interface Datatype<aterm.ATermAppl>this if isPrimitive() == true, else a
primitive datatype that is a superset of the value space of this
datatype.public aterm.ATermAppl getValue(aterm.ATermAppl literal)
throws InvalidLiteralException
DatatypegetValue in interface Datatype<aterm.ATermAppl>literal - the literalInvalidLiteralExceptionpublic boolean isPrimitive()
DatatypeisPrimitive in interface Datatype<aterm.ATermAppl>true if the datatype is primitive,
false elseCopyright © 2019. All rights reserved.