org.apache.clerezza.rdf.core.impl
Class SimpleGraph
java.lang.Object
java.util.AbstractCollection<Triple>
org.apache.clerezza.rdf.core.impl.AbstractTripleCollection
org.apache.clerezza.rdf.core.impl.AbstractGraph
org.apache.clerezza.rdf.core.impl.SimpleGraph
- All Implemented Interfaces:
- Iterable<Triple>, Collection<Triple>, Graph, TripleCollection
public class SimpleGraph
- extends AbstractGraph
- Author:
- reto
SimpleGraph
public SimpleGraph(TripleCollection tripleCollection)
- Creates a graph with the triples in tripleCollection
- Parameters:
tripleCollection - the collection of triples this Graph shall consist of
SimpleGraph
public SimpleGraph(TripleCollection tripleCollection,
boolean tripleCollectionWillNeverChange)
- Creates a graph with the triples in tripleCollection.
This construction allows to specify if the tripleCollection might change
in future. If tripleCollectionWillNeverChange is set to true it will
assume that the collection never changes, in this case the collection
isn't copied making things more efficient.
- Parameters:
tripleCollection - the collection of triples this Graph shall consist oftripleCollectionWillNeverChange - true if the caller promises tripleCollection will never change
SimpleGraph
public SimpleGraph(Iterator<Triple> tripleIter)
size
public int size()
- Specified by:
size in interface Collection<Triple>- Specified by:
size in class AbstractCollection<Triple>
performFilter
public Iterator<Triple> performFilter(NonLiteral subject,
UriRef predicate,
Resource object)
- Description copied from class:
AbstractTripleCollection
- A subclass of
AbstractTripleCollection should override
this method instead of filter for graph event support to be
added. The Iterator returned by filter will dispatch a
GraphEvent after invoking the remove method of the iterator returned by
this method.
- Specified by:
performFilter in class AbstractTripleCollection
- Returns:
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.