|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.hpl.jena.enhanced.EnhGraph
public class EnhGraph
TODO: remove the polymorphic aspect of EnhGraphs.
A specialisation of Polymorphic that models an extended graph - that is, one that
containsEnhanced nodes
or one that itself exposes additional
capabilities beyond the graph API.
WARNING. The polymorphic aspects of EnhGraph are not supported and are not expected to be supported in this way for the indefinite future.
Constructor Summary | |
---|---|
EnhGraph(Graph g,
Personality<RDFNode> p)
Construct an enhanced graph from the given underlying graph, and a factory for generating enhanced nodes. |
Method Summary | ||
---|---|---|
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. |
|
|
getNodeAs(Node n,
Class<X> interf)
Answer an enhanced node that wraps the given node and conforms to the given interface type. |
|
com.hp.hpl.jena.util.cache.CacheControl |
getNodeCacheControl()
Answer the cache controlle for this graph |
|
int |
hashCode()
Hashcode for an enhnaced graph is delegated to the underlyin graph. |
|
boolean |
isIsomorphicWith(EnhGraph eg)
Answer true if the given enhanced graph contains the same nodes and edges as this graph. |
|
void |
setNodeCache(com.hp.hpl.jena.util.cache.Cache cc)
Set the cache controller object for this graph |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 realisationsMethod Detail |
---|
public Graph asGraph()
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object o)
Note that this equality test does not look for correspondance between
the structures in the two graphs. To test whether another graph has the
same nodes and edges as this one, use isIsomorphicWith(com.hp.hpl.jena.enhanced.EnhGraph)
.
equals
in class Object
o
- An object to test for equality with this node
isIsomorphicWith(com.hp.hpl.jena.enhanced.EnhGraph)
public final boolean isIsomorphicWith(EnhGraph eg)
eg
- A graph to test
public <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 desired
public com.hp.hpl.jena.util.cache.CacheControl getNodeCacheControl()
public void setNodeCache(com.hp.hpl.jena.util.cache.Cache cc)
cc
- The cache controller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |