java.lang.Object
org.apache.jena.graph.Node
org.apache.jena.graph.Node_Literal
- All Implemented Interfaces:
Serializable
An RDF node holding a literal value. Literals may have datatypes.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.graph.Node
Node.NotLiteral
-
Field Summary
Fields inherited from class org.apache.jena.graph.Node
ANY, noLangTag, noTextDirection
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Java rules for equals.Indexing object for literals.Answer the literal value of a literal node, or throw an UnsupportedOperationException if it's not a literal nodefinal RDFDatatype
Answer the RDF datatype object of this node's literal value, if it is a literal; otherwise die horribly.final String
Answer the data-type URI of this node's literal value, if it is a literal; otherwise die horribly.final String
Answer the language of this node's literal value, if it is a literal; otherwise die horribly.final String
Answer the lexical form of this node's literal value, if it is a literal; otherwise die horribly.final TextDirection
Return the initial text direction for an rdf:dirLangString literal.final Object
Answer the value of this node's literal value, if it is a literal; otherwise die horribly.int
hashCode()
boolean
Answer true iff this node is concrete, meaning a node that is data in an RDF Graph.boolean
Answer true iff this node is a literal node [subclasses override]boolean
Answer true iff this node accepts the other one as a match.boolean
Test that two nodes are equivalent as values.toString()
Answer a human-readable representation of this Node.Answer a human-readable representation of the Node.Visit a Node and dispatch on it to the appropriate method from the NodeVisitorv
.Methods inherited from class org.apache.jena.graph.Node
getBlankNodeLabel, getGraph, getLocalName, getName, getNameSpace, getTriple, getURI, hasURI, isBlank, isExt, isNodeGraph, isNodeTriple, isURI, isVariable, sameTermAs
-
Method Details
-
isConcrete
public boolean isConcrete()Description copied from class:Node
Answer true iff this node is concrete, meaning a node that is data in an RDF Graph.- Specified by:
isConcrete
in classNode
-
getLiteral
Description copied from class:Node
Answer the literal value of a literal node, or throw an UnsupportedOperationException if it's not a literal node- Overrides:
getLiteral
in classNode
-
getLiteralValue
Description copied from class:Node
Answer the value of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralValue
in classNode
-
getLiteralLexicalForm
Description copied from class:Node
Answer the lexical form of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralLexicalForm
in classNode
-
getLiteralLanguage
Description copied from class:Node
Answer the language of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralLanguage
in classNode
-
getLiteralTextDirection
Description copied from class:Node
Return the initial text direction for an rdf:dirLangString literal. Does not return null if the literal is a rdf:dirLangString literal. Returns null if the text direction is not set (and the datatype won't be rdf:dirLangString). Otherwise die horribly.- Overrides:
getLiteralTextDirection
in classNode
-
getLiteralDatatypeURI
Description copied from class:Node
Answer the data-type URI of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralDatatypeURI
in classNode
-
getLiteralDatatype
Description copied from class:Node
Answer the RDF datatype object of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralDatatype
in classNode
-
isLiteral
public boolean isLiteral()Description copied from class:Node
Answer true iff this node is a literal node [subclasses override] -
getIndexingValue
Indexing object for literals. Literal nodes defer their indexing value to the component literal.- Overrides:
getIndexingValue
in classNode
- See Also:
-
visitWith
Description copied from class:Node
Visit a Node and dispatch on it to the appropriate method from the NodeVisitorv
. -
hashCode
public int hashCode() -
equals
Description copied from class:Node
Java rules for equals. See also {#sameTermAs} and {#sameValueAs} Nodes only equal other Nodes that have equal labels. -
sameValueAs
Test that two nodes are equivalent as values. In some cases this may be the same as "same term", in others equals is stricter. For example, two xsd:int literals with the same value if they are "01" and "1".Default implementation is to use equals, subclasses should override this.
- Overrides:
sameValueAs
in classNode
-
matches
Description copied from class:Node
Answer true iff this node accepts the other one as a match. The default is an equality test; it is over-ridden in subclasses to provide the appropriate semantics for literals, ANY, and variables. -
toString
Description copied from class:Node
Answer a human-readable representation of this Node.
-