org.apache.clerezza.rdf.core.impl
Class SimpleMGraph

java.lang.Object
  extended by java.util.AbstractCollection<Triple>
      extended by org.apache.clerezza.rdf.core.impl.AbstractTripleCollection
          extended by 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

Constructor Summary
SimpleMGraph()
          Creates an empty SimpleMGraph
SimpleMGraph(Collection<Triple> baseCollection)
           
SimpleMGraph(Iterator<Triple> iterator)
           
SimpleMGraph(Set<Triple> baseSet)
           
 
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 class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.clerezza.rdf.core.MGraph
equals
 
Methods inherited from interface org.apache.clerezza.rdf.core.TripleCollection
addGraphListener, addGraphListener, filter, removeGraphListener
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

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)
Method Detail

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.