Class ContainerImpl
- java.lang.Object
-
- org.apache.jena.enhanced.Polymorphic<RDFNode>
-
- org.apache.jena.enhanced.EnhNode
-
- org.apache.jena.rdf.model.impl.ResourceImpl
-
- org.apache.jena.rdf.model.impl.ContainerImpl
-
- All Implemented Interfaces:
FrontsNode
,Container
,RDFNode
,Resource
public class ContainerImpl extends ResourceImpl implements Container
An internal class not normally of interest to application developers. A base class on which the other containers are built.
-
-
Field Summary
-
Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
factory, rdfNodeFactory
-
-
Constructor Summary
Constructors Constructor Description ContainerImpl(java.lang.String uri, ModelCom model)
ContainerImpl(Node n, EnhGraph g)
ContainerImpl(ModelCom model)
Creates new ContainerImplContainerImpl(Resource r, ModelCom model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(java.lang.Object o)
Add a new value to a container.Container
add(java.lang.String o)
Add a new value to a container.Container
add(java.lang.String o, java.lang.String l)
Add a new value to a container.Container
add(RDFNode n)
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 valueboolean
contains(char o)
Determine whether the container contains a valueboolean
contains(double o)
Determine whether the container contains a valueboolean
contains(float o)
Determine whether the container contains a valueboolean
contains(long o)
Determine whether the container contains a valueboolean
contains(java.lang.Object o)
Determine whether the container contains a valueboolean
contains(java.lang.String o)
Determine whether the container contains a valueboolean
contains(java.lang.String o, java.lang.String l)
Determine whether the container contains a valueboolean
contains(RDFNode n)
Determine whether the container contains a valueboolean
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)
Container
remove(Statement s)
Remove a value from the container.int
size()
return the number values in the container.-
Methods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
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, visitWith
-
Methods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAs
-
Methods inherited from class org.apache.jena.enhanced.Polymorphic
addView, supports
-
Methods inherited from interface org.apache.jena.graph.FrontsNode
asNode
-
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith
-
Methods inherited from interface org.apache.jena.rdf.model.Resource
abort, 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, toString
-
-
-
-
Method Detail
-
isAlt
public boolean isAlt()
Description copied from interface:Container
Verify that the container is an Alt. This method will return true if the object is in a model and that model contains the triple < this, RDF.type, RDF.Alt > otherwise returns false.
-
isBag
public boolean isBag()
Description copied from interface:Container
Verify that the container is a Bag. This method will return true if the object is in a model and that model contains the triple < this, RDF.type, RDF.Bag > otherwise returns false.
-
isSeq
public boolean isSeq()
Description copied from interface:Container
Verify that the container is a Seq. This method will return true if the object is in a model and that model contains the triple < this, RDF.type, RDF.Seq > otherwise returns false.
-
add
public Container add(RDFNode n)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(boolean o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(long o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(char o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(float o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(double o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(java.lang.Object o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(java.lang.String o)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
add
public Container add(java.lang.String o, java.lang.String l)
Description copied from interface:Container
Add a new value to a container.The size of the container is extended by 1 and the new value is added as the last element of the container.
-
contains
public boolean contains(RDFNode n)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(boolean o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(long o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(char o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(float o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(double o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(java.lang.Object o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(java.lang.String o)
Description copied from interface:Container
Determine whether the container contains a value
-
contains
public boolean contains(java.lang.String o, java.lang.String l)
Description copied from interface:Container
Determine whether the container contains a value
-
iterator
public NodeIterator iterator()
Description copied from interface:Container
Return an iterator over the values.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.
-
size
public int size()
Description copied from interface:Container
return the number values in the container.
-
remove
public Container remove(Statement s)
Description copied from interface:Container
Remove a value from the 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.
-
listContainerMembers
public NodeIterator listContainerMembers(NodeIteratorFactory f)
Answer an iterator over the members of this container.- Parameters:
f
- the factory for constructing the final iterator- Returns:
- the member iterator
-
containerIndexOf
public int containerIndexOf(RDFNode n)
-
containerContains
public boolean containerContains(RDFNode n)
-
-