org.apache.clerezza.rdf.core.impl
Class SimpleMGraph
java.lang.Object
java.util.AbstractCollection<Triple>
org.apache.clerezza.rdf.core.impl.AbstractTripleCollection
org.apache.clerezza.rdf.core.impl.SimpleMGraph
- All Implemented Interfaces:
- Iterable<Triple>, Collection<Triple>, MGraph, TripleCollection
public class SimpleMGraph
- extends AbstractTripleCollection
- implements MGraph
- Author:
- reto
|
Method Summary |
Graph |
getGraph()
Returns the graph |
boolean |
performAdd(Triple e)
A subclass of AbstractTripleCollection should override
this method instead of add for graph event support to be
added. |
Iterator<Triple> |
performFilter(NonLiteral subject,
UriRef predicate,
Resource object)
A subclass of AbstractTripleCollection should override
this method instead of filter for graph event support to be
added. |
void |
setCheckConcurrency(boolean bool)
Specifies whether or not to throw ConcurrentModificationExceptions,
if this simple triple collection is modified concurrently. |
int |
size()
|
| Methods inherited from class org.apache.clerezza.rdf.core.impl.AbstractTripleCollection |
add, addGraphListener, addGraphListener, contains, dispatchEvent, filter, iterator, performRemove, remove, removeAll, removeGraphListener |
| Methods inherited from interface org.apache.clerezza.rdf.core.MGraph |
equals |
| Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
SimpleMGraph
public SimpleMGraph()
- Creates an empty SimpleMGraph
SimpleMGraph
public SimpleMGraph(Set<Triple> baseSet)
SimpleMGraph
public SimpleMGraph(Collection<Triple> baseCollection)
SimpleMGraph
public SimpleMGraph(Iterator<Triple> iterator)
getGraph
public Graph getGraph()
- Description copied from interface:
MGraph
- Returns the graph
- Specified by:
getGraph in interface MGraph
- Returns:
- graph
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:
performAdd
public boolean performAdd(Triple e)
- Description copied from class:
AbstractTripleCollection
- A subclass of
AbstractTripleCollection should override
this method instead of add for graph event support to be
added.
- Overrides:
performAdd in class AbstractTripleCollection
- Parameters:
e - The triple to be added to the triple collection
- Returns:
setCheckConcurrency
public void setCheckConcurrency(boolean bool)
- Specifies whether or not to throw
ConcurrentModificationExceptions,
if this simple triple collection is modified concurrently. Concurrency
check is set to false by default.
- Parameters:
bool - Specifies whether or not to check concurrent modifications.
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.