Interface LiteralLabel


public interface LiteralLabel
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Answer true iff this literal is syntactically equal to other.
    Answer the datatype of this literal, null if it is untyped.
    Answer the datatype URI of this literal, null if it untyped.
    int
    Answer the default hash value, suitable for datatypes which have values which support hashCode() naturally: it is derived from its value if it is well-formed and otherwise from its lexical form.
    Answer the value used to index this literal TODO Consider pushing indexing decisions down to the datatype
    Answer the lexical form of this literal, constructing it on-the-fly (and remembering it) if necessary.
    Answer a suitable instance of a Java class representing this literal's value.
    int
    Answer the hashcode of this literal, derived from its value if it's well-formed and otherwise its lexical form.
    boolean
    Answer true iff this is a well-formed literal.
    boolean
    Answer true iff the wellformed flag is true.
    boolean
    Answer true iff this is a well-formed XML literal.
    Answer the language associated with this literal (the empty string if there's no language).
    boolean
    Answer true if this literal represents the same (abstract) value as the other one.
     
    toString(boolean quoting)
    Answer a human-acceptable representation of this literal value.
  • Method Details

    • isXML

      boolean isXML()
      Answer true iff this is a well-formed XML literal.
    • isWellFormed

      boolean isWellFormed()
      Answer true iff this is a well-formed literal.
    • isWellFormedRaw

      boolean isWellFormedRaw()
      Answer true iff the wellformed flag is true. Does not test for datatype.
    • toString

      String toString(boolean quoting)
      Answer a human-acceptable representation of this literal value. This is NOT intended for a machine-processed result.
    • toString

      String toString()
      Overrides:
      toString in class Object
    • getLexicalForm

      String getLexicalForm()
      Answer the lexical form of this literal, constructing it on-the-fly (and remembering it) if necessary.
    • getIndexingValue

      Object getIndexingValue()
      Answer the value used to index this literal TODO Consider pushing indexing decisions down to the datatype
    • language

      String language()
      Answer the language associated with this literal (the empty string if there's no language).
    • getValue

      Object getValue() throws DatatypeFormatException
      Answer a suitable instance of a Java class representing this literal's value. May throw an exception if the literal is ill-formed.
      Throws:
      DatatypeFormatException
    • getDatatype

      RDFDatatype getDatatype()
      Answer the datatype of this literal, null if it is untyped.
    • getDatatypeURI

      String getDatatypeURI()
      Answer the datatype URI of this literal, null if it untyped.
    • equals

      boolean equals(Object other)
      Answer true iff this literal is syntactically equal to other. Note: this is not sameValueAs.
      Overrides:
      equals in class Object
    • sameValueAs

      boolean sameValueAs(LiteralLabel other)
      Answer true if this literal represents the same (abstract) value as the other one. Two literals that are .equals are sameValueAs.
    • hashCode

      int hashCode()
      Answer the hashcode of this literal, derived from its value if it's well-formed and otherwise its lexical form.
      Overrides:
      hashCode in class Object
    • getDefaultHashcode

      int getDefaultHashcode()
      Answer the default hash value, suitable for datatypes which have values which support hashCode() naturally: it is derived from its value if it is well-formed and otherwise from its lexical form.