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 CompositionBase

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

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

Direct Known Subclasses:
  Dyadic, Polyadic

    public abstract class CompositionBase

extends com.hp.hpl.jena.graph.impl.GraphBase

Base class for graphs that are composed of multiple sub-graphs. This is to provide a home for shared functionality that was previously in `Dyadic` before refactoring.

Version:
  CVS $Id: CompositionBase.java,v 1.15 2008/01/02 12:10:19 andy_seaborne Exp $
Author:
  Ian Dickinson, moved kers' code from Dyadic to this class, added commentage, Chris Dollin (kers)

Field Summary

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

Constructor Summary
`CompositionBase()`

Method Summary
`static ClosableIterator` | `butNot(ClosableIterator a, ClosableIterator b)` Answer an iterator over the elements of iterator a that are not members of iterator b.
`static Filter` | `ifIn(ClosableIterator i)` Answer a `Filter` that will accept any object that is an element of iterator i.
`static Filter` | `ifIn(Graph g)` Answer a `Filter` that will accept any triple that is an edge of graph g.
`static ExtendedIterator` | `recording(ClosableIterator i, java.util.Set seen)` Answer an iterator that will record every element delived by `next()` in the set `seen`.
`static Filter` | `reject(ClosableIterator i)` Answer a `Filter` that will reject any element that is a member of iterator i.
`static ExtendedIterator` | `rejecting(ExtendedIterator i, Graph seen)` Answer an iterator over the elements of `i` that are not in the graph `seen`.
`static ExtendedIterator` | `rejecting(ExtendedIterator i, java.util.Set seen)` Answer an iterator over the elements of iterator i that are not in the set `seen`.

Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
`add, close, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, performAdd, performDelete, queryHandler, size, toString, toString`

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

Constructor Detail

### CompositionBase

    public CompositionBase()

Method Detail

### reject

    public static Filter reject(ClosableIterator i)

  Answer a `Filter` that will reject any element that is a member of iterator i. As a side-effect, i will be closed.

  Parameters:
    `i` - A closable iterator
  Returns:
    A Filter that will accept any object not a member of i.

### butNot

    public static ClosableIterator butNot(ClosableIterator a,
                                          ClosableIterator b)

  Answer an iterator over the elements of iterator a that are not members of iterator b. As a side-effect, iterator b will be closed.

  Parameters:
    `a` - An iterator that will be filtered by rejecting the elements of b
    `b` - A closable iterator
  Returns:
    The iteration of elements in a but not in b.

### recording

    public static ExtendedIterator recording(ClosableIterator i,
                                             java.util.Set seen)

  Answer an iterator that will record every element delived by `next()` in the set `seen`.

  Parameters:
    `i` - A closable iterator
    `seen` - A set that will record each element of i in turn
  Returns:
    An iterator that records the elements of i.

### rejecting

    public static ExtendedIterator rejecting(ExtendedIterator i,
                                             java.util.Set seen)

  Answer an iterator over the elements of iterator i that are not in the set `seen`.

  Parameters:
    `i` - An extended iterator
    `seen` - A set of objects
  Returns:
    An iterator over the elements of i that are not in the set `seen`.

### rejecting

    public static ExtendedIterator rejecting(ExtendedIterator i,
                                             Graph seen)

  Answer an iterator over the elements of `i` that are not in the graph `seen`.

### ifIn

    public static Filter ifIn(ClosableIterator i)

  Answer a `Filter` that will accept any object that is an element of iterator i. As a side-effect, i will be evaluated and closed.

  Parameters:
    `i` - A closable iterator
  Returns:
    A Filter that will accept any object in iterator i.

### ifIn

    public static Filter ifIn(Graph g)

  Answer a `Filter` that will accept any triple that is an edge of graph g.

  Parameters:
    `g` - A graph
  Returns:
    A Filter that will accept any triple that is an edge in g.

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