Package com.stardog.stark.io.datatypes

# Class RDFDatatypesHandler

java.lang.Object
com.stardog.stark.io.datatypes.RDFDatatypesHandler

All Implemented Interfaces:
  `DatatypeHandler`

public final class RDFDatatypesHandler extends Object implements DatatypeHandler

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `KEY`
  Identifier for datatypes defined in the `RDF` vocabulary.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RDFDatatypesHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isRecognizedDatatype(IRI theURI)`
  Checks if the given datatype `IRI` is recognized by this `DatatypeHandler`.
  `String`
  `key()`
  A unique key for this datatype handler to identify it in the
  `boolean`
  `verifyDatatype(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`

- ## Field Details

  - ### KEY

    public static final String KEY
    Identifier for datatypes defined in the `RDF` vocabulary.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### RDFDatatypesHandler

    public RDFDatatypesHandler()

- ## Method Details

  - ### isRecognizedDatatype

    public boolean isRecognizedDatatype(@Nonnull IRI theURI)
    Checks if the given datatype `IRI` is recognized by this `DatatypeHandler`.
    Specified by:
      `isRecognizedDatatype` in interface `DatatypeHandler`
    Parameters:
      `theURI` - The datatype URI to check.
    Returns:
      `true` if the datatype is syntactically valid and could be used with `DatatypeHandler.verifyDatatype(String, Datatype)` and `DatatypeHandler.normalizeDatatype(String, Datatype)`.

  - ### key

    public String key()
    A unique key for this datatype handler to identify it in the
    Specified by:
      `key` in interface `DatatypeHandler`
    Returns:
      A unique string key.

  - ### verifyDatatype

    public boolean verifyDatatype(@Nonnull 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 interface `DatatypeHandler`
    Parameters:
      `theValue` - Literal value matching the given datatype URI.
      `theDatatype` - A datatype that matched with `DatatypeHandler.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