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, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWith
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isURIResource, isValid, viewAs
addView, supports
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isURIResource, visitWith
asNode
public ContainerImpl(ModelCom model)
public boolean isAlt()
Container
public boolean isBag()
Container
public boolean isSeq()
Container
public Container add(RDFNode n)
Container
The 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)
Container
The 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)
Container
The 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)
Container
The 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)
Container
The 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)
Container
The 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)
Container
The 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)
Container
The 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)
Container
The 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)
Container
public boolean contains(boolean o)
Container
public boolean contains(long o)
Container
public boolean contains(char o)
Container
public boolean contains(float o)
Container
public boolean contains(double o)
Container
public boolean contains(Object o)
Container
public boolean contains(String o)
Container
public boolean contains(String o, String l)
Container
public NodeIterator iterator()
Container
Note 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()
Container
public Container remove(Statement s)
Container
The 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