public class EnhGraph extends Object
EnhGraph
wraps a plain graph
and contains enhanced nodes
that wrap the
plain nodes of the plain graph. All the enhanced nodes in
the enhanced graph share the same polymorphic personality.Constructor and Description 

EnhGraph(Graph g,
Personality<RDFNode> p)
Construct an enhanced graph from the given underlying graph, and
a factory for generating enhanced nodes.

Modifier and Type  Method and Description 

Graph 
asGraph()
Answer the normal graph that this enhanced graph is wrapping.

boolean 
equals(Object o)
An enhanced graph is equal to another graph g iff the underlying graphs
are equal.

<X extends RDFNode> 
getNodeAs(Node n,
Class<X> interf)
Answer an enhanced node that wraps the given node and conforms to the given
interface type.

int 
hashCode()
Hashcode for an enhanced graph is delegated to the underlying graph.

boolean 
isIsomorphicWith(EnhGraph eg)
Answer true if the given enhanced graph contains the same nodes and
edges as this graph.

void 
setNodeCache(Cache<Node,RDFNode> cc)
Set the cache controller object for this graph

public EnhGraph(Graph g, Personality<RDFNode> p)
g
 The underlying plain graph, may be null to defer binding to a given
graph until later.p
 The personality factory, that maps types to realisationspublic Graph asGraph()
public final int hashCode()
public final boolean equals(Object o)
Note that this equality test does not look for correspondence between
the structures in the two graphs. To test whether another graph has the
same nodes and edges as this one, use isIsomorphicWith(org.apache.jena.enhanced.EnhGraph)
.
equals
in class Object
o
 An object to test for equality with this nodeisIsomorphicWith(org.apache.jena.enhanced.EnhGraph)
public final boolean isIsomorphicWith(EnhGraph eg)
eg
 A graph to testpublic <X extends RDFNode> X getNodeAs(Node n, Class<X> interf)
n
 A node (assumed to be in this graph)interf
 A type denoting the enhanced facet desiredLicenced under the Apache License, Version 2.0