public abstract class CompositionBase extends org.apache.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.
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
emptyGraph
Constructor and Description |
---|
CompositionBase() |
Modifier and Type | Method and Description |
---|---|
static <T> org.apache.jena.util.iterator.ClosableIterator<T> |
butNot(org.apache.jena.util.iterator.ClosableIterator<T> a,
org.apache.jena.util.iterator.ClosableIterator<? extends T> b)
Answer an iterator over the elements of iterator a that are not members of iterator b.
|
static <T> java.util.function.Predicate<T> |
ifIn(org.apache.jena.util.iterator.ClosableIterator<T> i)
Answer a
Predicate that will accept any object that is an element of
iterator i. |
static java.util.function.Predicate<Triple> |
ifIn(Graph g)
Answer a
Predicate that will accept any triple that is an edge of
graph g. |
static <T> org.apache.jena.util.iterator.ExtendedIterator<T> |
recording(org.apache.jena.util.iterator.ClosableIterator<T> i,
Set<T> seen)
Answer an iterator that will record every element delived by
next() in
the set seen . |
static <T> java.util.function.Predicate<T> |
reject(org.apache.jena.util.iterator.ClosableIterator<? extends T> i)
Answer a
Predicate that will reject any element that is a member of iterator i. |
static org.apache.jena.util.iterator.ExtendedIterator<Triple> |
rejecting(org.apache.jena.util.iterator.ExtendedIterator<Triple> i,
Graph seen)
Answer an iterator over the elements of
i that are not in
the graph seen . |
static org.apache.jena.util.iterator.ExtendedIterator<Triple> |
rejecting(org.apache.jena.util.iterator.ExtendedIterator<Triple> i,
Set<Triple> seen)
Answer an iterator over the elements of iterator i that are not in the set
seen . |
add, clear, close, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getCapabilities, getEventManager, getPrefixMapping, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, notifyAdd, notifyDelete, performAdd, performDelete, remove, size, toString, toString
public static <T> java.util.function.Predicate<T> reject(org.apache.jena.util.iterator.ClosableIterator<? extends T> i)
Answer a Predicate
that will reject any element that is a member of iterator i.
As a side-effect, i will be closed.
i
- A closable iteratorpublic static <T> org.apache.jena.util.iterator.ClosableIterator<T> butNot(org.apache.jena.util.iterator.ClosableIterator<T> a, org.apache.jena.util.iterator.ClosableIterator<? extends T> 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.
a
- An iterator that will be filtered by rejecting the elements of bb
- A closable iteratorpublic static <T> org.apache.jena.util.iterator.ExtendedIterator<T> recording(org.apache.jena.util.iterator.ClosableIterator<T> i, Set<T> seen)
Answer an iterator that will record every element delived by next()
in
the set seen
.
i
- A closable iteratorseen
- A set that will record each element of i in turnpublic static org.apache.jena.util.iterator.ExtendedIterator<Triple> rejecting(org.apache.jena.util.iterator.ExtendedIterator<Triple> i, Set<Triple> seen)
Answer an iterator over the elements of iterator i that are not in the set seen
.
i
- An extended iteratorseen
- A set of objectsseen
.public static org.apache.jena.util.iterator.ExtendedIterator<Triple> rejecting(org.apache.jena.util.iterator.ExtendedIterator<Triple> i, Graph seen)
i
that are not in
the graph seen
.public static <T> java.util.function.Predicate<T> ifIn(org.apache.jena.util.iterator.ClosableIterator<T> i)
Answer a Predicate
that will accept any object that is an element of
iterator i. As a side-effect, i will be evaluated and closed.
i
- A closable iteratorpublic static java.util.function.Predicate<Triple> ifIn(Graph g)
Answer a Predicate
that will accept any triple that is an edge of
graph g.
g
- A graphLicenced under the Apache License, Version 2.0