public abstract class AbstractModel extends AbstractSet<Statement> implements Model
| Constructor and Description |
|---|
AbstractModel() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Statement st) |
boolean |
addAll(Collection<? extends Statement> c) |
void |
clear() |
boolean |
clear(Resource... contexts)
Removes statements with the specified context exist in this model.
|
protected void |
closeIterator(Iterator<?> iter)
Cleans up any resources used by this iterator.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Set<Resource> |
contexts()
Returns a
Set view of the contexts contained in this model. |
boolean |
isEmpty() |
Set<Value> |
objects()
Returns a
Set view of the objects contained in this model. |
Set<IRI> |
predicates()
Returns a
Set view of the predicates contained in this model. |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
abstract void |
removeTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Called by aggregate sets when a term has been removed from a term iterator.
|
boolean |
retainAll(Collection<?> c) |
Set<Resource> |
subjects()
Returns a
Set view of the subjects contained in this model. |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
Model |
unmodifiable()
Returns an unmodifiable view of this model.
|
equals, hashCodeiterator, size, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, contains, contains, filter, filter, getStatements, remove, remove, removeNamespace, setNamespace, setNamespaceparallelStream, removeIf, streamgetNamespace, getNamespacespublic Model unmodifiable()
ModelUnsupportedOperationException.
unmodifiable in interface Modelpublic boolean add(Statement st)
add in interface Collection<Statement>add in interface Set<Statement>add in class AbstractCollection<Statement>public boolean isEmpty()
isEmpty in interface Collection<Statement>isEmpty in interface Set<Statement>isEmpty in class AbstractCollection<Statement>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Statement>containsAll in interface Set<Statement>containsAll in class AbstractCollection<Statement>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<Statement>removeAll in interface Set<Statement>removeAll in class AbstractSet<Statement>public Object[] toArray()
toArray in interface Collection<Statement>toArray in interface Set<Statement>toArray in class AbstractCollection<Statement>public <T> T[] toArray(T[] a)
toArray in interface Collection<Statement>toArray in interface Set<Statement>toArray in class AbstractCollection<Statement>public boolean addAll(Collection<? extends Statement> c)
addAll in interface Collection<Statement>addAll in interface Set<Statement>addAll in class AbstractCollection<Statement>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Statement>retainAll in interface Set<Statement>retainAll in class AbstractCollection<Statement>public void clear()
clear in interface Collection<Statement>clear in interface Set<Statement>clear in class AbstractCollection<Statement>public boolean clear(Resource... contexts)
Modelpublic boolean remove(Object o)
remove in interface Collection<Statement>remove in interface Set<Statement>remove in class AbstractCollection<Statement>public boolean contains(Object o)
contains in interface Collection<Statement>contains in interface Set<Statement>contains in class AbstractCollection<Statement>public Set<Resource> subjects()
ModelSet view of the subjects contained in this model. The set is backed by the model, so changes to
the model are reflected in the set, and vice-versa. If the model is modified while an iteration over the set is
in progress (except through the iterator's own remove operation), the results of the iteration are
undefined. The set supports element removal, which removes all statements from the model for which that element
is a subject value, via the Iterator.remove, Set.remove, removeAll, retainAll,
and clear operations. It does not support the add or addAll operations if the parameters
pred or obj are null.public Set<IRI> predicates()
ModelSet view of the predicates contained in this model. The set is backed by the model, so changes
to the model are reflected in the set, and vice-versa. If the model is modified while an iteration over the set
is in progress (except through the iterator's own remove operation), the results of the iteration are
undefined. The set supports element removal, which removes all statements from the model for which that element
is a predicate value, via the Iterator.remove, Set.remove, removeAll, retainAll,
and clear operations. It does not support the add or addAll operations if the parameters
subj or obj are null.predicates in interface Modelpublic Set<Value> objects()
ModelSet view of the objects contained in this model. The set is backed by the model, so changes to
the model are reflected in the set, and vice-versa. If the model is modified while an iteration over the set is
in progress (except through the iterator's own remove operation), the results of the iteration are
undefined. The set supports element removal, which removes all statements from the model for which that element
is an object value, via the Iterator.remove, Set.remove, removeAll, retainAll,
and clear operations. It does not support the add or addAll operations if the parameters
subj or pred are null.public Set<Resource> contexts()
ModelSet view of the contexts contained in this model. The set is backed by the model, so changes to
the model are reflected in the set, and vice-versa. If the model is modified while an iteration over the set is
in progress (except through the iterator's own remove operation), the results of the iteration are
undefined. The set supports element removal, which removes all statements from the model for which that element
is a context value, via the Iterator.remove, Set.remove, removeAll, retainAll,
and clear operations. It does not support the add or addAll operations if the parameters
subj , pred or obj are null.public abstract void removeTermIteration(Iterator<Statement> iter, Resource subj, IRI pred, Value obj, Resource... contexts)
iter - The iterator used to navigate the live set (never null)subj - the subject term to be removed or nullpred - the predicate term to be removed or nullobj - the object term to be removed or nullcontexts - an array of one context term to be removed or an empty arrayprotected void closeIterator(Iterator<?> iter)
iter - Iterator to clean upCopyright © 2015-2021 Eclipse Foundation. All Rights Reserved.