Package org.apache.jena.graph.impl
Interface LiteralLabel
public interface LiteralLabel
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Answer true iff this literal is syntactically equal toother
.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 datatypeAnswer the lexical form of this literal, constructing it on-the-fly (and remembering it) if necessary.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
Answer true iff this is a well-formed literal.boolean
Answer true iff the wellformed flag is true.boolean
isXML()
Answer true iff this is a well-formed XML literal.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.toString()
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
Answer a human-acceptable representation of this literal value. This is NOT intended for a machine-processed result. -
toString
String toString() -
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
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
Answer true iff this literal is syntactically equal toother
. Note: this is notsameValueAs
. -
sameValueAs
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. -
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.
-