| java.lang.Object com.hp.hpl.jena.enhanced.Polymorphic com.hp.hpl.jena.enhanced.EnhGraph
All known Subclasses: com.hp.hpl.jena.rdf.model.impl.ModelCom, com.hp.hpl.jena.enhanced.test.TestModelImpl,
EnhGraph | public class EnhGraph extends Polymorphic (Code) | | A specialisation of Polymorphic that models an extended graph - that is, one that
contains
EnhNode Enhanced 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.
author: Jeremy Carroll (original code) author: Chris Dollin (original code) author: Ian Dickinson author: (refactoring and commentage) |
Constructor Summary | |
public | EnhGraph(Graph g, Personality p) Construct an enhanced graph from the given underlying graph, and
a factory for generating enhanced nodes. |
Method Summary | |
public Graph | asGraph() Answer the normal graph that this enhanced graph is wrapping. | protected boolean | canSupport(Class t) we can't convert to anything. | protected Polymorphic | convertTo(Class t) Answer an enhanced graph that presents this in a way which satisfies type
t. | final public boolean | equals(Object o) An enhanced graph is equal to another graph g iff the underlying graphs
are equal.
This is deemed to be a complete and correct interpretation of enhanced
graph equality, which is why this method has been marked final.
Note that this equality test does not look for correspondance between
the structures in the two graphs. | public EnhNode | getNodeAs(Node n, Class interf) Answer an enhanced node that wraps the given node and conforms to the given
interface type. | public CacheControl | getNodeCacheControl() | protected Personality | getPersonality() | final public int | hashCode() Hashcode for an enhnaced graph is delegated to the underlyin graph. | final public boolean | isIsomorphicWith(EnhGraph eg) Answer true if the given enhanced graph contains the same nodes and
edges as this graph. | public boolean | isValid() | public void | setNodeCache(Cache cc) |
enhNodes | protected Cache enhNodes(Code) | | Cache of enhanced nodes that have been created
|
graph | protected Graph graph(Code) | | The graph that this enhanced graph is wrapping
|
EnhGraph | public EnhGraph(Graph g, Personality p)(Code) | | Construct an enhanced graph from the given underlying graph, and
a factory for generating enhanced nodes.
Parameters: g - The underlying plain graph, may be null to defer binding to a given graph until later. Parameters: p - The personality factory, that maps types to realisations |
asGraph | public Graph asGraph()(Code) | | Answer the normal graph that this enhanced graph is wrapping.
A graph |
canSupport | protected boolean canSupport(Class t)(Code) | | we can't convert to anything.
|
convertTo | protected Polymorphic convertTo(Class t)(Code) | | Answer an enhanced graph that presents this in a way which satisfies type
t. This is a stub method that has not yet been implemented.
Parameters: t - A type A polymorphic instance, possibly but not necessarily this, that conforms to t. |
equals | final public boolean equals(Object o)(Code) | | An enhanced graph is equal to another graph g iff the underlying graphs
are equal.
This is deemed to be a complete and correct interpretation of enhanced
graph equality, which is why this method has been marked final.
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
EnhGraph.isIsomorphicWith .
Parameters: o - An object to test for equality with this node True if o is equal to this node. See Also: EnhGraph.isIsomorphicWith |
getNodeAs | public EnhNode getNodeAs(Node n, Class interf)(Code) | | Answer an enhanced node that wraps the given node and conforms to the given
interface type.
Parameters: n - A node (assumed to be in this graph) Parameters: interf - A type denoting the enhanced facet desired An enhanced node |
getNodeCacheControl | public CacheControl getNodeCacheControl()(Code) | | Answer the cache controlle for this graph
A cache controller object |
getPersonality | protected Personality getPersonality()(Code) | | Answer the personality object bound to this polymorphic instance
The personality object |
hashCode | final public int hashCode()(Code) | | Hashcode for an enhnaced graph is delegated to the underlyin graph.
The hashcode as an int |
isIsomorphicWith | final public boolean isIsomorphicWith(EnhGraph eg)(Code) | | Answer true if the given enhanced graph contains the same nodes and
edges as this graph. The default implementation delegates this to the
underlying graph objects.
Parameters: eg - A graph to test True if eg is a graph with the same structure as this. |
isValid | public boolean isValid()(Code) | | |
setNodeCache | public void setNodeCache(Cache cc)(Code) | | Set the cache controller object for this graph
Parameters: cc - The cache controller |
|
|