public class ContainerImpl extends ResourceImpl implements Container
factory, rdfNodeFactory| Constructor and Description |
|---|
ContainerImpl(ModelCom model)
Creates new ContainerImpl
|
ContainerImpl(Node n,
EnhGraph g) |
ContainerImpl(Resource r,
ModelCom model) |
ContainerImpl(String uri,
ModelCom model) |
| Modifier and Type | Method and Description |
|---|---|
Container |
add(boolean o)
Add a new value to a container.
|
Container |
add(char o)
Add a new value to a container.
|
Container |
add(double o)
Add a new value to a container.
|
Container |
add(float o)
Add a new value to a container.
|
Container |
add(long o)
Add a new value to a container.
|
Container |
add(Object o)
Add a new value to a container.
|
Container |
add(RDFNode n)
Add a new value to a container.
|
Container |
add(String o)
Add a new value to a container.
|
Container |
add(String o,
String l)
Add a new value to a container.
|
boolean |
containerContains(RDFNode n) |
int |
containerIndexOf(RDFNode n) |
boolean |
contains(boolean o)
Determine whether the container contains a value
|
boolean |
contains(char o)
Determine whether the container contains a value
|
boolean |
contains(double o)
Determine whether the container contains a value
|
boolean |
contains(float o)
Determine whether the container contains a value
|
boolean |
contains(long o)
Determine whether the container contains a value
|
boolean |
contains(Object o)
Determine whether the container contains a value
|
boolean |
contains(RDFNode n)
Determine whether the container contains a value
|
boolean |
contains(String o)
Determine whether the container contains a value
|
boolean |
contains(String o,
String l)
Determine whether the container contains a value
|
boolean |
isAlt()
Verify that the container is an Alt.
|
boolean |
isBag()
Verify that the container is a Bag.
|
boolean |
isSeq()
Verify that the container is a Seq.
|
NodeIterator |
iterator()
Return an iterator over the values.
|
NodeIterator |
listContainerMembers(NodeIteratorFactory f)
Answer an iterator over the members of this container.
|
Container |
remove(int index,
RDFNode object)
Remove the given value at the given index.
|
Container |
remove(Statement s)
Remove a value from the container.
|
int |
size()
return the number values in the container.
|
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, begin, commit, getId, getLocalName, getModel, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWithas, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAsaddView, supportsabort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toStringas, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWithasNodepublic ContainerImpl(ModelCom model)
public boolean isAlt()
Containerpublic boolean isBag()
Containerpublic boolean isSeq()
Containerpublic Container add(RDFNode n)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(boolean o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(long o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(char o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(float o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(double o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(Object o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(String o)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public Container add(String o, String l)
ContainerThe size of the container is extended by 1 and the new value is added as the last element of the container.
public boolean contains(RDFNode n)
Containerpublic boolean contains(boolean o)
Containerpublic boolean contains(long o)
Containerpublic boolean contains(char o)
Containerpublic boolean contains(float o)
Containerpublic boolean contains(double o)
Containerpublic boolean contains(Object o)
Containerpublic boolean contains(String o)
Containerpublic boolean contains(String o, String l)
Containerpublic NodeIterator iterator()
ContainerNote the iterator returned is not a standard java.util.iterator.
It has a close method which SHOULD be called if the
application has not completed the iteration, but no longer requires
the iterator. This will enable the freeing of resources in, for
example, implementations which store their models in a database.
public int size()
Containerpublic Container remove(Statement s)
ContainerThe predicate of the statement s identifies the
ordinal of the value to be removed. Once removed, the values in the
container with a higher ordinal value are renumbered. The renumbering
algorithm depends on the type of container.
public Container remove(int index, RDFNode object)
index - The index at which the value should be removed.object - The object at that index to be removedpublic NodeIterator listContainerMembers(NodeIteratorFactory f)
f - the factory for constructing the final iteratorpublic int containerIndexOf(RDFNode n)
public boolean containerContains(RDFNode n)
Licenced under the Apache License, Version 2.0