Package com.stardog.stark.io.datatypes
Class RDFDatatypesHandler
java.lang.Object
com.stardog.stark.io.datatypes.RDFDatatypesHandler
- All Implemented Interfaces:
DatatypeHandler
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRecognizedDatatype(IRI theURI) Checks if the given datatypeIRIis recognized by this `DatatypeHandler`.key()A unique key for this datatype handler to identify it in thebooleanverifyDatatype(String theValue, Datatype theDatatype) Verifies that the datatype is valid, including a check on the structure of the literal value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.stardog.stark.io.DatatypeHandler
normalizeDatatype
-
Field Details
-
KEY
Identifier for datatypes defined in theRDFvocabulary.- See Also:
-
-
Constructor Details
-
RDFDatatypesHandler
public RDFDatatypesHandler()
-
-
Method Details
-
isRecognizedDatatype
Checks if the given datatypeIRIis recognized by this `DatatypeHandler`.- Specified by:
isRecognizedDatatypein interfaceDatatypeHandler- Parameters:
theURI- The datatype URI to check.- Returns:
- `true` if the datatype is syntactically valid and could be used with
DatatypeHandler.verifyDatatype(String, Datatype)andDatatypeHandler.normalizeDatatype(String, Datatype).
-
key
A unique key for this datatype handler to identify it in the- Specified by:
keyin interfaceDatatypeHandler- Returns:
- A unique string key.
-
verifyDatatype
Verifies that the datatype is valid, including a check on the structure of the literal value.This method must only be called after verifying that
DatatypeHandler.isRecognizedDatatype(IRI)returns true for the given datatype URI.- Specified by:
verifyDatatypein interfaceDatatypeHandler- Parameters:
theValue- Literal value matching the given datatype URI.theDatatype- A datatype that matched withDatatypeHandler.isRecognizedDatatype(IRI)- Returns:
- True if the datatype URI is recognized by this datatype handler,
and it is verified to be syntactically valid. An implementation may throw
InvalidLiteralexception if the datatype is not recognized
-