org.ilrt.inkling.api
Class UnionGraph
java.lang.Object
|
+--org.ilrt.inkling.api.Graph
|
+--org.ilrt.inkling.api.UnionGraph
- All Implemented Interfaces:
- GraphInterface, SimpleQueryInterface
- public class UnionGraph
- extends Graph
- implements GraphInterface
An aggregate inmemory Graph, acting much like an SQLGraph.
This keeps a reference to each Graph added but also a central triple
store containing all the triples from all Graphs.
Use add(), remove()
For example (from UnionGraphAddRemoveTest):
Graph g = new
Graph(null,
"http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf",Util.RDFXML);
g.load();
UnionGraph ug=new UnionGraph();
ug.add(g);
assertEquals(g.size(),ug.size());
ug.remove(g);
|
Method Summary |
void |
add(Graph graph)
Add a Graph to the UnionGraph |
java.util.Hashtable |
getGraphs()
Get the list of Graphs held in the UnionGraph |
void |
remove(Graph graph)
Removes all the triples and the ID |
| Methods inherited from class org.ilrt.inkling.api.Graph |
ask, ask, askForObjects, askForSubjects, askQuery, askSquish, delete, getBase, getDefault, getEdges, getID, getNodes, getObjects, getPredicates, getSize, getStatements, getSubjects, getType, inspect, load, load, removeAll, setBase, setID, setType, size, tell, tellAll |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnionGraph
public UnionGraph()
getGraphs
public java.util.Hashtable getGraphs()
- Get the list of Graphs held in the UnionGraph
add
public void add(Graph graph)
- Add a Graph to the UnionGraph
remove
public void remove(Graph graph)
- Removes all the triples and the ID