Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.graph.compose
Class MultiUnion

    java.lang.Object
      com.hp.hpl.jena.graph.impl.GraphBase
          com.hp.hpl.jena.graph.compose.CompositionBase
              com.hp.hpl.jena.graph.compose.Polyadic
                  com.hp.hpl.jena.graph.compose.MultiUnion

All Implemented Interfaces:
  Graph, GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform

    public class MultiUnion

extends Polyadic

A graph implementation that presents the union of zero or more subgraphs, one of which is distinguished as the updateable graph.

Version:
  CVS $Id: MultiUnion.java,v 1.28 2008/01/02 12:10:20 andy_seaborne Exp $
Author:
  Ian Dickinson, HP Labs (email)

Nested Class Summary
`static class` | `MultiUnion.MultiUnionStatisticsHandler`

Field Summary

Fields inherited from interface com.hp.hpl.jena.graph.Graph
`emptyGraph`

Constructor Summary
`MultiUnion()` Construct a union of exactly no sub graphs.
`MultiUnion(Graph[] graphs)` Construct a union of all of the given graphs
`MultiUnion(java.util.Iterator graphs)` Construct a union of all of the given graphs.

Method Summary
`void` | `addGraph(Graph graph)` Add the given graph to this union.
`Reifier` | `getReifier()` Unions share the reifiers of their base graphs.
`boolean` | `graphBaseContains(Triple t)` Answer true if at least one of the graphs in this union contain the given triple.
`ExtendedIterator` | `graphBaseFind(TripleMatch t)` Answer an iterator over the triples in the union of the graphs in this composition.
`void` | `performAdd(Triple t)` Add the given triple to the union model; the actual component model to be updated will be the designated (or default) updateable graph.
`void` | `performDelete(Triple t)` Delete the given triple from the union model; the actual component model to be updated will be the designated (or default) updateable graph.
`QueryHandler` | `queryHandler()` Answer a QueryHandler bound to this graph.

Methods inherited from class com.hp.hpl.jena.graph.compose.Polyadic
`close, dependsOn, getBaseGraph, getBulkUpdateHandler, getCapabilities, getPrefixMapping, getRequiredBaseGraph, getSubGraphs, getTransactionHandler, removeGraph, setBaseGraph`

Methods inherited from class com.hp.hpl.jena.graph.compose.CompositionBase
`butNot, ifIn, ifIn, recording, reject, rejecting, rejecting`

Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
`add, contains, contains, delete, find, find, forTestingOnly_graphBaseFind, getEventManager, getStatisticsHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, size, toString, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MultiUnion

    public MultiUnion()

  Construct a union of exactly no sub graphs.

### MultiUnion

    public MultiUnion(Graph[] graphs)

  Construct a union of all of the given graphs

  Parameters:
    `graphs` - An array of the sub-graphs of this union

### MultiUnion

    public MultiUnion(java.util.Iterator graphs)

  Construct a union of all of the given graphs.

  Parameters:
    `graphs` - An iterator of the sub-graphs of this union. If graphs is a closable iterator, it will be automatically closed.

Method Detail

### getReifier

    public Reifier getReifier()

  Unions share the reifiers of their base graphs. THIS WILL CHANGE.

  Specified by:
    `getReifier` in interface `Graph`
  Overrides:
    `getReifier` in class `com.hp.hpl.jena.graph.impl.GraphBase`

### performAdd

    public void performAdd(Triple t)

  Add the given triple to the union model; the actual component model to be updated will be the designated (or default) updateable graph.

  Specified by:
    `performAdd` in interface `com.hp.hpl.jena.graph.impl.GraphWithPerform`
  Overrides:
    `performAdd` in class `com.hp.hpl.jena.graph.impl.GraphBase`
  Parameters:
    `t` - A triple to add to the union graph
  Throws:
    `JenaException` - if the union does not contain any sub-graphs yet

### performDelete

    public void performDelete(Triple t)

  Delete the given triple from the union model; the actual component model to be updated will be the designated (or default) updateable graph.

  Specified by:
    `performDelete` in interface `com.hp.hpl.jena.graph.impl.GraphWithPerform`
  Overrides:
    `performDelete` in class `com.hp.hpl.jena.graph.impl.GraphBase`
  Parameters:
    `t` - A triple to from the union graph
  Throws:
    `JenaException` - if the union does not contain any sub-graphs yet

### graphBaseContains

    public boolean graphBaseContains(Triple t)

  Answer true if at least one of the graphs in this union contain the given triple.

  Overrides:
    `graphBaseContains` in class `com.hp.hpl.jena.graph.impl.GraphBase`
  Parameters:
    `t` - A triple
  Returns:
    True if any of the graphs in the union contain t

### queryHandler

    public QueryHandler queryHandler()

  Description copied from class: `com.hp.hpl.jena.graph.impl.GraphBase`
  Answer a QueryHandler bound to this graph. The default implementation returns the same SimpleQueryHandler each time it is called; sub-classes may override if they need specialised query handlers.

  Specified by:
    `queryHandler` in interface `Graph`
  Overrides:
    `queryHandler` in class `com.hp.hpl.jena.graph.impl.GraphBase`

### graphBaseFind

    public ExtendedIterator graphBaseFind(TripleMatch t)

  Answer an iterator over the triples in the union of the graphs in this composition. Note that the requirement to remove duplicates from the union means that this will be an expensive operation for large (and especially for persistent) graphs.

  Specified by:
    `graphBaseFind` in class `com.hp.hpl.jena.graph.impl.GraphBase`
  Parameters:
    `t` - The matcher to match against
  Returns:
    An iterator of all triples matching t in the union of the graphs.

### addGraph

    public void addGraph(Graph graph)

  Add the given graph to this union. If it is already a member of the union, don't add it a second time.

  Overrides:
    `addGraph` in class `Polyadic`
  Parameters:
    `graph` - A sub-graph to add to this union

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP