|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.graph.Node
com.hp.hpl.jena.graph.PlaceholderNode
A PlaceholderNode gives information about a node, mich may not be fully instanciated. In contrast to standard nodes a PlaceholderNode is mutable. It can be used to replace nodes within a larger structure. By inheriting from Node, it can be used in all Node-typed places.
Nested Class Summary |
Nested classes inherited from class com.hp.hpl.jena.graph.Node |
com.hp.hpl.jena.graph.Node.NodeMaker |
Field Summary | |
static int |
BlankNodeType
|
static int |
LiteralNodeType
|
protected com.hp.hpl.jena.graph.Node |
node
if not null, we allready know the value of the variable, but still have to check for other occourences. |
protected int |
nodeType
What is the type, an URI, a blank node or a literal? |
static int |
NotFixedNodeType
|
static int |
UriNodeType
|
static int |
VariableNodeType
|
Fields inherited from class com.hp.hpl.jena.graph.Node |
ANY, label, log, makeAnon, makeLiteral, makeURI, makeVariable, NULL, present, RDFprefix, THRESHOLD |
Constructor Summary | |
PlaceholderNode(java.lang.Object label)
|
Method Summary | |
boolean |
equals(java.lang.Object o)
|
com.hp.hpl.jena.rdf.model.AnonId |
getBlankNodeId()
get the blank node id if the node is blank, otherwise die horribly |
com.hp.hpl.jena.graph.impl.LiteralLabel |
getLiteral()
get the literal value of a literal node, otherwise die horribly |
java.lang.String |
getLocalName()
get the localname part of this node if it's a URI node, else die horribly |
java.lang.String |
getName()
get a variable nodes name, otherwise die horribly |
java.lang.String |
getNameSpace()
get the namespace part of this node if it's a URI node, else die horribly |
java.lang.String |
getURI()
get the URI of this node if it has one, else die horribly |
com.hp.hpl.jena.graph.Node |
givenNode()
|
int |
givenNodeType()
|
int |
hashCode()
|
boolean |
hasURI(java.lang.String uri)
answer true iff this node is a URI node with the given URI |
boolean |
isBlank()
is this a blank node - overridden in Node_Blank |
boolean |
isConcrete()
|
boolean |
isLiteral()
is this a literal node - overridden in Node_Literal |
boolean |
isURI()
is this a URI node - overridden in Node_URI |
boolean |
isVariable()
is this a variable node - overridden in Node_Variable |
boolean |
matches(com.hp.hpl.jena.graph.Node other)
Answer true iff this node accepts the other one as a match. |
static int |
nodeType(com.hp.hpl.jena.graph.Node n)
|
boolean |
sameValueAs(java.lang.Object o)
Test that two nodes are semantically equivalent. |
void |
setNode(com.hp.hpl.jena.graph.Node n)
|
java.lang.String |
toString()
Answer a human-readable representation of this Node. |
java.lang.String |
toString(boolean quoting)
Answer a human-readable representation of this Node where literals are quoted according to quoting but URIs are not compressed. |
java.lang.String |
toString(com.hp.hpl.jena.shared.PrefixMapping pm)
Answer a human-readable representation of the Node, quoting literals and compressing URIs. |
java.lang.String |
toString(com.hp.hpl.jena.shared.PrefixMapping pm,
boolean quoting)
Answer a human readable representation of this Node, quoting literals if specified, and compressing URIs using the prefix mapping supplied. |
static com.hp.hpl.jena.graph.Node |
unwrapNode(com.hp.hpl.jena.graph.Node n)
|
static com.hp.hpl.jena.graph.Node |
unwrapNode(PlaceholderNode n)
|
java.lang.Object |
visitWith(com.hp.hpl.jena.graph.NodeVisitor v)
|
Methods inherited from class com.hp.hpl.jena.graph.Node |
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected com.hp.hpl.jena.graph.Node node
protected int nodeType
public static final int NotFixedNodeType
public static final int BlankNodeType
public static final int UriNodeType
public static final int LiteralNodeType
public static final int VariableNodeType
Constructor Detail |
public PlaceholderNode(java.lang.Object label)
Method Detail |
public static com.hp.hpl.jena.graph.Node unwrapNode(com.hp.hpl.jena.graph.Node n)
public static com.hp.hpl.jena.graph.Node unwrapNode(PlaceholderNode n)
public static int nodeType(com.hp.hpl.jena.graph.Node n)
public com.hp.hpl.jena.graph.Node givenNode()
public int givenNodeType()
public void setNode(com.hp.hpl.jena.graph.Node n)
public java.lang.Object visitWith(com.hp.hpl.jena.graph.NodeVisitor v)
public boolean isConcrete()
public boolean equals(java.lang.Object o)
public boolean isLiteral()
public boolean isBlank()
public boolean isURI()
public boolean isVariable()
public com.hp.hpl.jena.rdf.model.AnonId getBlankNodeId()
public com.hp.hpl.jena.graph.impl.LiteralLabel getLiteral()
public java.lang.String getURI()
public java.lang.String getNameSpace()
public java.lang.String getLocalName()
public java.lang.String getName()
public boolean hasURI(java.lang.String uri)
public boolean sameValueAs(java.lang.Object o)
Default implementation is to use equals, subclasses should override this.
public int hashCode()
public boolean matches(com.hp.hpl.jena.graph.Node other)
other
- a node to test for matching
public java.lang.String toString()
public java.lang.String toString(boolean quoting)
quoting
but URIs are not compressed.
public java.lang.String toString(com.hp.hpl.jena.shared.PrefixMapping pm)
public java.lang.String toString(com.hp.hpl.jena.shared.PrefixMapping pm, boolean quoting)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |