Package org.eclipse.rdf4j.model.impl
Class EmptyModel
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<Statement>
-
- org.eclipse.rdf4j.model.impl.AbstractModel
-
- org.eclipse.rdf4j.model.impl.EmptyModel
-
- All Implemented Interfaces:
Serializable,Iterable<Statement>,Collection<Statement>,Set<Statement>,Model,NamespaceAware
public class EmptyModel extends AbstractModel
Blocks access to the statements of the model, allowing only changes to the model's namespaces.- Author:
- James Leigh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmptyModel(Model model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Resource subj, IRI pred, Value obj, Resource... contexts)booleancontains(Resource subj, IRI pred, Value obj, Resource... contexts)Modelfilter(Resource subj, IRI pred, Value obj, Resource... contexts)Optional<Namespace>getNamespace(String prefix)Set<Namespace>getNamespaces()Iterator<Statement>iterator()booleanremove(Resource subj, IRI pred, Value obj, Resource... contexts)Optional<Namespace>removeNamespace(String prefix)voidremoveTermIteration(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.NamespacesetNamespace(String prefix, String name)voidsetNamespace(Namespace namespace)intsize()-
Methods inherited from class org.eclipse.rdf4j.model.impl.AbstractModel
add, addAll, clear, clear, closeIterator, contains, containsAll, contexts, isEmpty, objects, predicates, remove, removeAll, retainAll, subjects, toArray, toArray, unmodifiable
-
Methods inherited from class java.util.AbstractSet
equals, hashCode
-
Methods inherited from class java.util.AbstractCollection
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.eclipse.rdf4j.model.Model
getStatements
-
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
-
-
-
Constructor Detail
-
EmptyModel
public EmptyModel(Model model)
-
-
Method Detail
-
setNamespace
public void setNamespace(Namespace namespace)
-
size
public int size()
- Specified by:
sizein interfaceCollection<Statement>- Specified by:
sizein interfaceSet<Statement>- Specified by:
sizein classAbstractCollection<Statement>
-
removeTermIteration
public void removeTermIteration(Iterator<Statement> iter, Resource subj, IRI pred, Value obj, Resource... contexts)
Description copied from class:AbstractModelCalled by aggregate sets when a term has been removed from a term iterator. Exactly one of the last four terms will be non-empty.- Specified by:
removeTermIterationin classAbstractModel- Parameters:
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 array
-
-