| com.hp.hpl.jena.graph.compose.CompositionBase com.hp.hpl.jena.graph.compose.Polyadic
All known Subclasses: com.hp.hpl.jena.graph.compose.MultiUnion,
Polyadic | abstract public class Polyadic extends CompositionBase (Code) | |
A base class for composition graphs that are composed from zero or more
sub-graphs (thus providing a basis for polyadic composition operators).
A distinguished graph is the designated graph for additions to the union.
By default, this is the first sub-graph of the composition, however any
of the graphs in the composition can be nominated to be the distinguished
graph.
author: Ian Dickinson, HP Labs author: (email) version: CVS $Id: Polyadic.java,v 1.20 2008/01/02 12:10:19 andy_seaborne Exp $ |
Constructor Summary | |
public | Polyadic()
Construct a composition of exactly no sub graphs. | public | Polyadic(Graph[] graphs) | public | Polyadic(Iterator graphs)
Construct a composition of all of the given graphs.
Parameters: graphs - An iterator of the sub-graphs of this composition. |
m_baseGraph | protected Graph m_baseGraph(Code) | | The distinguished graph for adding to. If null, use the 0'th graph in the list.
|
m_subGraphs | protected List m_subGraphs(Code) | | A list of the sub-graphs that this composition contains
|
Polyadic | public Polyadic()(Code) | |
Construct a composition of exactly no sub graphs.
|
Polyadic | public Polyadic(Graph[] graphs)(Code) | |
Construct a composition of all of the given graphs
Parameters: graphs - An array of the sub-graphs of this composition |
Polyadic | public Polyadic(Iterator graphs)(Code) | |
Construct a composition of all of the given graphs.
Parameters: graphs - An iterator of the sub-graphs of this composition. If graphs isa closable iterator, it will be automatically closed. |
addGraph | public void addGraph(Graph graph)(Code) | |
Add the given graph to this composition.
Parameters: graph - A sub-graph to add to this composition |
dependsOn | public boolean dependsOn(Graph graph)(Code) | |
Answer true if this graph contains the given graph as a sub-component.
Parameters: graph - A graph to test True if the graph is this graph, or is a sub-graph of this one. See Also: com.hp.hpl.jena.graph.Graph.dependsOn(Graph) |
getBaseGraph | public Graph getBaseGraph()(Code) | |
Answer the distinguished graph for the composition, which will be the graph
that receives triple adds and deletes. If no base graph is defined,
return null.
The distinguished updateable graph, or null if there are no graphsin this composition |
getRequiredBaseGraph | public Graph getRequiredBaseGraph()(Code) | |
Answer the distinguished graph for the composition, which will be the graph
that receives triple adds and deletes. If no base graph is defined, throw
a
JenaException .
The distinguished updateable graph, or null if there are no graphsin this composition |
getSubGraphs | public List getSubGraphs()(Code) | |
Answer a list of the graphs other than the updateable (base) graph
A list of all of the sub-graphs, excluding the base graph. |
removeGraph | public void removeGraph(Graph graph)(Code) | |
Remove the given graph from this composition. If the removed graph is the
designated updateable graph, the updatable graph goes back to the default
for this composition.
Parameters: graph - A sub-graph to remove from this composition |
setBaseGraph | public void setBaseGraph(Graph graph)(Code) | |
Set the designated updateable graph for this composition.
Parameters: graph - One of the graphs currently in this composition to be thedesignated graph to receive udpates exception: IllegalArgumentException - if graph is not one of the members ofthe composition |
|
|