 All Implemented Interfaces:
Graph
,GraphWithPerform
 Direct Known Subclasses:
MultiUnion
A base class for composition graphs that are composed from zero or more subgraphs (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 subgraph of the composition, however any of the graphs in the composition can be nominated to be the distinguished graph.

Field Summary
Fields inherited from class org.apache.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
Fields inherited from interface org.apache.jena.graph.Graph
emptyGraph

Constructor Summary

Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given graph to this composition.void
close()
Close the graph by closing all of the subgraphs.boolean
Answer true if this graph contains the given graph as a subcomponent.Answer the distinguished graph for the composition, which will be the graph that receives triple adds and deletes.Answer the capabilities of this graph; the default is an AllCapabilities object (the same one each time, not that it matters  Capabilities should be immutable).Answer the distinguished graph for the composition, which will be the graph that receives triple adds and deletes.Answer a list of the graphs other than the updateable (base) graphAnswer a transaction handler bound to this graph.void
removeGraph
(Graph graph) Remove the given graph from this composition.void
setBaseGraph
(Graph graph) Set the designated updateable graph for this composition.Methods inherited from class org.apache.jena.graph.compose.CompositionBase
butNot, ifIn, ifIn, recording, reject, rejecting, rejecting
Methods inherited from class org.apache.jena.graph.impl.GraphBase
add, clear, contains, contains, delete, find, find, forTestingOnly_graphBaseFind, getEventManager, getPrefixMapping, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, performAdd, performDelete, remove, size, toString, toString

Constructor Details

Polyadic
public Polyadic()Construct a composition of exactly no sub graphs.

Polyadic
Construct a composition of all of the given graphs
 Parameters:
graphs
 An array of the subgraphs of this composition

Polyadic
Construct a composition of all of the given graphs.
 Parameters:
graphs
 An iterator of the subgraphs of this composition. If graphs is a closable iterator, it will be automatically closed.


Method Details

close
public void close()Close the graph by closing all of the subgraphs.

dependsOn
Answer true if this graph contains the given graph as a subcomponent.

addGraph
Add the given graph to this composition.
 Parameters:
graph
 A subgraph to add to this composition

removeGraph
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 subgraph to remove from this composition

getBaseGraph
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.
 Returns:
 The distinguished updateable graph, or null if there are no graphs in this composition

getRequiredBaseGraph
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
. Returns:
 The distinguished updateable graph, or null if there are no graphs in this composition

setBaseGraph
Set the designated updateable graph for this composition.
 Parameters:
graph
 One of the graphs currently in this composition to be the designated graph to receive udpates Throws:
IllegalArgumentException
 if graph is not one of the members of the composition

getSubGraphs
Answer a list of the graphs other than the updateable (base) graph
 Returns:
 A list of all of the subgraphs, excluding the base graph.

getTransactionHandler
Description copied from class:GraphBase
Answer a transaction handler bound to this graph. The default is SimpleTransactionHandler, which handles no transactions. Specified by:
getTransactionHandler
in interfaceGraph
 Overrides:
getTransactionHandler
in classGraphBase

getCapabilities
Description copied from class:GraphBase
Answer the capabilities of this graph; the default is an AllCapabilities object (the same one each time, not that it matters  Capabilities should be immutable). Specified by:
getCapabilities
in interfaceGraph
 Overrides:
getCapabilities
in classGraphBase
