public abstract class AbstractGraph extends AbstractCollection<Triple> implements Graph
Graph
implementing
iterator
and contains
calling filter
.Constructor and Description |
---|
AbstractGraph()
Constructs a LocalbleMGraph for an Graph.
|
AbstractGraph(ReadWriteLock lock) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Triple e) |
boolean |
addAll(Collection<? extends Triple> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object obj)
Returns true if
other describes the same graph and will
always describe the same graph as this instance, false otherwise. |
Iterator<Triple> |
filter(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object)
Filters triples given a pattern.
|
ImmutableGraph |
getImmutableGraph()
Returns an ImutableGraph describing the graph at the current point in
time.
|
ReadWriteLock |
getLock()
The lock provided by this methods allows to create read- and write-locks
that span multiple method calls.
|
boolean |
isEmpty() |
Iterator<Triple> |
iterator() |
protected boolean |
performAdd(Triple e) |
protected boolean |
performAddAll(Collection<? extends Triple> c) |
protected void |
performClear() |
protected boolean |
performContains(Object o) |
protected boolean |
performContainsAll(Collection<?> c) |
protected abstract Iterator<Triple> |
performFilter(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object) |
ImmutableGraph |
performGetImmutableGraph() |
protected boolean |
performIsEmpty() |
protected Iterator<Triple> |
performIterator() |
protected boolean |
performRemove(Object o) |
protected boolean |
performRemoveAll(Collection<?> c) |
protected boolean |
performRetainAll(Collection<?> c) |
protected abstract int |
performSize() |
protected Object[] |
performToArray() |
protected <T> T[] |
performToArray(T[] a) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
toString
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hashCode, parallelStream, removeIf, spliterator, stream
public AbstractGraph()
providedMGraph
- a non-lockable graphpublic AbstractGraph(ReadWriteLock lock)
public ReadWriteLock getLock()
Graph
java.util.concurrent.locks.ReentrantReadWriteLock
.
Immutable instances (such as instances of ImmutableGraph
)
or instances used in transaction where concurrent acces of the same
instance is not an issue may return a no-op ReadWriteLock (i.e. one
which returned ReadLock and WriteLock instances of which the methods do
not do anything)public ImmutableGraph getImmutableGraph()
Graph
this
is an instance of ImmutableGraph this can
safely return this
.getImmutableGraph
in interface Graph
public ImmutableGraph performGetImmutableGraph()
public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
Graph
public int size()
size
in interface Collection<Triple>
size
in class AbstractCollection<Triple>
public boolean isEmpty()
isEmpty
in interface Collection<Triple>
isEmpty
in class AbstractCollection<Triple>
public boolean contains(Object o)
contains
in interface Collection<Triple>
contains
in class AbstractCollection<Triple>
public Iterator<Triple> iterator()
iterator
in interface Iterable<Triple>
iterator
in interface Collection<Triple>
iterator
in class AbstractCollection<Triple>
public Object[] toArray()
toArray
in interface Collection<Triple>
toArray
in class AbstractCollection<Triple>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<Triple>
toArray
in class AbstractCollection<Triple>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<Triple>
containsAll
in class AbstractCollection<Triple>
public boolean add(Triple e)
add
in interface Collection<Triple>
add
in class AbstractCollection<Triple>
public boolean remove(Object o)
remove
in interface Collection<Triple>
remove
in class AbstractCollection<Triple>
public boolean addAll(Collection<? extends Triple> c)
addAll
in interface Collection<Triple>
addAll
in class AbstractCollection<Triple>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<Triple>
removeAll
in class AbstractCollection<Triple>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<Triple>
retainAll
in class AbstractCollection<Triple>
public void clear()
clear
in interface Collection<Triple>
clear
in class AbstractCollection<Triple>
public boolean equals(Object obj)
Graph
other
describes the same graph and will
always describe the same graph as this instance, false otherwise.
It returns true if this == other or if it
is otherwise guaranteed that changes to one of the instances are
immediately reflected in the other or if both graphs are immutable.protected abstract Iterator<Triple> performFilter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
protected abstract int performSize()
protected boolean performIsEmpty()
protected Object[] performToArray()
protected boolean performRemove(Object o)
protected boolean performAddAll(Collection<? extends Triple> c)
protected boolean performRemoveAll(Collection<?> c)
protected boolean performRetainAll(Collection<?> c)
protected void performClear()
protected boolean performContains(Object o)
protected boolean performContainsAll(Collection<?> c)
protected <T> T[] performToArray(T[] a)
protected boolean performAdd(Triple e)
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.