java.lang.Object
org.apache.jena.graph.Node
org.apache.jena.graph.Node_Concrete
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
-
Method Summary
Modifier and TypeMethodDescriptionbooleanNodes only equal other Nodes that have equal labels.Literal nodes defer their indexing value to the component literal.Answer the literal value of a literal node, or throw an UnsupportedOperationException if it's not a literal nodefinal RDFDatatypeAnswer the RDF datatype object of this node's literal value, if it is a literal; otherwise die horribly.final StringAnswer the data-type URI of this node's literal value, if it is a literal; otherwise die horribly.final booleanfinal StringAnswer the language of this node's literal value, if it is a literal; otherwise die horribly.final StringAnswer the lexical form of this node's literal value, if it is a literal; otherwise die horribly.final ObjectAnswer the value of this node's literal value, if it is a literal; otherwise die horribly.booleanAnswer true iff this node is a literal node [subclasses override]booleanAnswer true iff this node accepts the other one as a match.booleanTest that two nodes are semantically equivalent.toString(PrefixMapping pm, boolean quoting) Answer a human readable representation of this Node, quoting literals if specified, and compressing URIs using the prefix mapping supplied.Visit a Node and dispatch on it to the appropriate method from the NodeVisitorv.Methods inherited from class org.apache.jena.graph.Node_Concrete
isConcreteMethods inherited from class org.apache.jena.graph.Node
getBlankNodeId, getBlankNodeLabel, getGraph, getLocalName, getName, getNameSpace, getTriple, getURI, hashCode, hasURI, isBlank, isExt, isNodeGraph, isNodeTriple, isURI, isVariable, toString, toString, toString
-
Method Details
-
getLiteral
Description copied from class:NodeAnswer the literal value of a literal node, or throw an UnsupportedOperationException if it's not a literal node- Overrides:
getLiteralin classNode
-
getLiteralValue
Description copied from class:NodeAnswer the value of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralValuein classNode
-
getLiteralLexicalForm
Description copied from class:NodeAnswer the lexical form of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralLexicalFormin classNode
-
getLiteralLanguage
Description copied from class:NodeAnswer the language of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralLanguagein classNode
-
getLiteralDatatypeURI
Description copied from class:NodeAnswer the data-type URI of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralDatatypeURIin classNode
-
getLiteralDatatype
Description copied from class:NodeAnswer the RDF datatype object of this node's literal value, if it is a literal; otherwise die horribly.- Overrides:
getLiteralDatatypein classNode
-
getLiteralIsXML
public final boolean getLiteralIsXML()- Overrides:
getLiteralIsXMLin classNode
-
isLiteral
public boolean isLiteral()Description copied from class:NodeAnswer true iff this node is a literal node [subclasses override] -
getIndexingValue
Literal nodes defer their indexing value to the component literal.- Overrides:
getIndexingValuein classNode- See Also:
-
visitWith
Description copied from class:NodeVisit a Node and dispatch on it to the appropriate method from the NodeVisitorv. -
equals
Description copied from class:NodeNodes only equal other Nodes that have equal labels. -
sameValueAs
Test that two nodes are semantically equivalent. In some cases this may be the same as equals, in others equals is stricter. For example, two xsd:int literals with the same value but different language tag are semantically equivalent but distinguished by the java equality function in order to support round tripping.Default implementation is to use equals, subclasses should override this.
- Overrides:
sameValueAsin classNode
-
matches
Description copied from class:NodeAnswer 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.
-