Package org.apache.jena.graph.impl
Interface LiteralLabel
-
public interface LiteralLabel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Answer true iff this literal is syntactically equal toother
.RDFDatatype
getDatatype()
Answer the datatype of this literal, null if it is untyped.java.lang.String
getDatatypeURI()
Answer the datatype URI of this literal, null if it untyped.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.java.lang.Object
getIndexingValue()
Answer the value used to index this literal TODO Consider pushing indexing decisions down to the datatypejava.lang.String
getLexicalForm()
Answer the lexical form of this literal, constructing it on-the-fly (and remembering it) if necessary.java.lang.Object
getValue()
Answer a suitable instance of a Java class representing this literal's value.int
hashCode()
Answer the hashcode of this literal, derived from its value if it's well-formed and otherwise its lexical form.boolean
isWellFormed()
Answer true iff this is a well-formed literal.boolean
isWellFormedRaw()
Answer true iff the wellformed flag is true.boolean
isXML()
Answer true iff this is a well-formed XML literal.java.lang.String
language()
Answer the language associated with this literal (the empty string if there's no language).boolean
sameValueAs(LiteralLabel other)
Answer true if this literal represents the same (abstract) value as the other one.java.lang.String
toString()
java.lang.String
toString(boolean quoting)
Answer a human-acceptable representation of this literal value.
-
-
-
Method Detail
-
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
java.lang.String toString(boolean quoting)
Answer a human-acceptable representation of this literal value. This is NOT intended for a machine-processed result.
-
toString
java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getLexicalForm
java.lang.String getLexicalForm()
Answer the lexical form of this literal, constructing it on-the-fly (and remembering it) if necessary.
-
getIndexingValue
java.lang.Object getIndexingValue()
Answer the value used to index this literal TODO Consider pushing indexing decisions down to the datatype
-
language
java.lang.String language()
Answer the language associated with this literal (the empty string if there's no language).
-
getValue
java.lang.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
java.lang.String getDatatypeURI()
Answer the datatype URI of this literal, null if it untyped.
-
equals
boolean equals(java.lang.Object other)
Answer true iff this literal is syntactically equal toother
. Note: this is notsameValueAs
.- Overrides:
equals
in classjava.lang.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 classjava.lang.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.
-
-