com.hp.hpl.jena.graph
Class Node_Literal

java.lang.Object
  extended bycom.hp.hpl.jena.graph.Node
      extended bycom.hp.hpl.jena.graph.Node_Concrete
          extended bycom.hp.hpl.jena.graph.Node_Literal

public class Node_Literal
extends Node_Concrete

Author:
kers

Field Summary
 
Fields inherited from class com.hp.hpl.jena.graph.Node
ANY
 
Constructor Summary
Node_Literal(java.lang.Object label)
           
 
Method Summary
 boolean equals(java.lang.Object other)
          Nodes only equal other Nodes that have equal labels.
 com.hp.hpl.jena.graph.impl.LiteralLabel getLiteral()
          get the literal value of a literal node, otherwise die horribly
 boolean isLiteral()
          is this a literal node - overridden in Node_Literal
 boolean matches(Node x)
          Answer true iff this node accepts the other one as a match.
 boolean sameValueAs(java.lang.Object o)
          Test that two nodes are semantically equivalent.
 java.lang.Object visitWith(NodeVisitor v)
          Visit a Node and dispatch on it to the appropriate method from the NodeVisitor v.
 
Methods inherited from class com.hp.hpl.jena.graph.Node_Concrete
isConcrete
 
Methods inherited from class com.hp.hpl.jena.graph.Node
cache, create, create, create, createAnon, createAnon, createLiteral, createLiteral, createLiteral, createURI, createVariable, getBlankNodeId, getName, getTriple, getURI, hashCode, isBlank, isURI, isVariable, nullLiteralsGenerateWarnings, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node_Literal

public Node_Literal(java.lang.Object label)
Method Detail

getLiteral

public com.hp.hpl.jena.graph.impl.LiteralLabel getLiteral()
Description copied from class: Node
get the literal value of a literal node, otherwise die horribly

Overrides:
getLiteral in class Node

isLiteral

public boolean isLiteral()
Description copied from class: Node
is this a literal node - overridden in Node_Literal

Overrides:
isLiteral in class Node

visitWith

public java.lang.Object visitWith(NodeVisitor v)
Description copied from class: Node
Visit a Node and dispatch on it to the appropriate method from the NodeVisitor v.

Specified by:
visitWith in class Node
Parameters:
v - the visitor to apply to the node
Returns:
the value returned by the applied method

equals

public boolean equals(java.lang.Object other)
Description copied from class: Node
Nodes only equal other Nodes that have equal labels.

Specified by:
equals in class Node

sameValueAs

public boolean sameValueAs(java.lang.Object o)
Test that two nodes are semantically equivalent. In some cases this may be the sames 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:
sameValueAs in class Node

matches

public boolean matches(Node x)
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.

Overrides:
matches in class Node
Parameters:
x - a node to test for matching
Returns:
true iff this node accepts the other as a match


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.