Class XSDBaseStringType

All Implemented Interfaces:
RDFDatatype

public class XSDBaseStringType extends XSDDatatype
Base implementation for all string datatypes derived from xsd:string. The only purpose of this place holder is to support the isValidLiteral tests across string types.
  • Constructor Details

    • XSDBaseStringType

      public XSDBaseStringType(String typeName)
      Constructor.
      Parameters:
      typeName - the name of the XSD type to be instantiated, this is used to lookup a type definition from the Xerces schema factory.
    • XSDBaseStringType

      public XSDBaseStringType(String typeName, Class<?> javaClass)
      Constructor.
      Parameters:
      typeName - the name of the XSD type to be instantiated, this is used to lookup a type definition from the Xerces schema factory.
      javaClass - the java class for which this xsd type is to be treated as the cannonical representation
  • Method Details

    • isEqual

      public boolean isEqual(LiteralLabel value1, LiteralLabel value2)
      Compares two instances of values of the given datatype. This ignores lang tags and optionally allows plain literals to equate to strings. The latter option is currently set by a static global flag in LiteralLabel.
      Specified by:
      isEqual in interface RDFDatatype
      Overrides:
      isEqual in class XSDDatatype
    • cannonicalise

      public Object cannonicalise(Object value)
      Canonicalise a java Object value to a normal form. Used when objects are passed in as xsd:string type to ensure that indexing of typed literals works.
      Specified by:
      cannonicalise in interface RDFDatatype
      Overrides:
      cannonicalise in class BaseDatatype