Package com.stardog.stark.io.datatypes
Class GeoSPARQLDatatypeHandler
- java.lang.Object
-
- com.stardog.stark.io.datatypes.GeoSPARQLDatatypeHandler
-
- All Implemented Interfaces:
DatatypeHandler
public final class GeoSPARQLDatatypeHandler extends java.lang.Object implements DatatypeHandler
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description GeoSPARQLDatatypeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRecognizedDatatype(IRI datatypeUri)
Checks if the given datatypeIRI
is recognized by this `DatatypeHandler`.java.lang.String
key()
A unique key for this datatype handler to identify it in theboolean
verifyDatatype(java.lang.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, wait
-
Methods inherited from interface com.stardog.stark.io.DatatypeHandler
normalizeDatatype
-
-
-
-
Method Detail
-
isRecognizedDatatype
public boolean isRecognizedDatatype(@Nonnull IRI datatypeUri)
Checks if the given datatypeIRI
is recognized by this `DatatypeHandler`.- Specified by:
isRecognizedDatatype
in interfaceDatatypeHandler
- Parameters:
datatypeUri
- 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)
.
-
verifyDatatype
public boolean verifyDatatype(@Nonnull java.lang.String theValue, @Nonnull Datatype theDatatype)
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:
verifyDatatype
in 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
InvalidLiteral
exception if the datatype is not recognized
-
key
public java.lang.String key()
A unique key for this datatype handler to identify it in the- Specified by:
key
in interfaceDatatypeHandler
- Returns:
- A unique string key.
-
-