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 TypeMethodDescriptionbooleanJava 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 TextDirectionReturn the base direction for a literal.final 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 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.inthashCode()booleanAnswer true iff this node is concrete, meaning a node that is data in an RDF Graph.booleanAnswer true iff this node is a literal node [subclasses override]booleansameValueAs(Node other) Test that two nodes represent the same value.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, isTripleTerm, isURI, isVariable, sameTermAs
-
Method Details
-
isConcrete
public boolean isConcrete()Description copied from class:NodeAnswer true iff this node is concrete, meaning a node that is data in an RDF Graph.- Specified by:
isConcretein classNode
-
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
-
getLiteralBaseDirection
Description copied from class:NodeReturn the base direction for a literal. Returns null if the node is a literal and does not have a base direction. Otherwise die horribly.- Overrides:
getLiteralBaseDirectionin 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
-
isLiteral
public boolean isLiteral()Description copied from class:NodeAnswer 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:
getIndexingValuein classNode- See Also:
-
visitWith
Description copied from class:NodeVisit a Node and dispatch on it to the appropriate method from the NodeVisitorv. -
hashCode
public int hashCode() -
equals
Description copied from class:NodeJava rules for equals. See also {#sameTermAs} and {#sameValueAs}..equalsis "same RDF Term" with all the rules of Java equality such as "null" handling. -
sameValueAs
Description copied from class:NodeTest that two nodes represent the same value.In some cases this may be the same as
Node.sameTermAs(org.apache.jena.graph.Node). For example, two xsd:int literals with the same value but different lexical form are semantically equivalent but distinguished by the java equals function.The default implementation is to use
TheNode.equals(java.lang.Object); subclasses should override this.Nodeargument must not be null.- Overrides:
sameValueAsin classNode
-
toString
Description copied from class:NodeAnswer a human-readable representation of this Node.
-