Class ContainerImpl

All Implemented Interfaces:
FrontsNode, Container, RDFNode, Resource
Direct Known Subclasses:
AltImpl, BagImpl, SeqImpl

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.
  • Constructor Details

    • ContainerImpl

      public ContainerImpl(ModelCom model)
      Creates new ContainerImpl
    • ContainerImpl

      public ContainerImpl(String uri, ModelCom model)
    • ContainerImpl

      public ContainerImpl(Resource r, ModelCom model)
    • ContainerImpl

      public ContainerImpl(Node n, EnhGraph g)
  • Method Details

    • 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.
      Specified by:
      isAlt in interface Container
    • 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.
      Specified by:
      isBag in interface Container
    • 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.
      Specified by:
      isSeq in interface Container
    • 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.

      Specified by:
      add in interface Container
      Parameters:
      n - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • 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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • 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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • 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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • 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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • 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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • add

      public Container add(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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • add

      public Container add(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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      Returns:
      this object so that calls may be cascaded.
    • add

      public Container add(String o, 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.

      Specified by:
      add in interface Container
      Parameters:
      o - The value to be added.
      l - The language of the string to be added
      Returns:
      this object so that calls may be cascaded.
    • contains

      public boolean contains(RDFNode n)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      n - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(boolean o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(long o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(char o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(float o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(double o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(Object o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(String o)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      Returns:
      true if and only if the container contains o
    • contains

      public boolean contains(String o, String l)
      Description copied from interface: Container
      Determine whether the container contains a value
      Specified by:
      contains in interface Container
      Parameters:
      o - the value being tested for
      l - the language of the string tested
      Returns:
      true if and only if the container contains o
    • 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.

      Specified by:
      iterator in interface Container
      Returns:
      Return an iterator over the values.
    • size

      public int size()
      Description copied from interface: Container
      return the number values in the container.
      Specified by:
      size in interface Container
      Returns:
      the number of values int 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.

      Specified by:
      remove in interface Container
      Parameters:
      s - The statement to be removed from the model.
      Returns:
      this container to enable cascading calls.
    • remove

      public Container remove(int index, RDFNode object)
    • listContainerMembers

      public NodeIterator listContainerMembers()
      Answer an iterator over the members of this container.
      Returns:
      the member iterator
    • containerIndexOf

      public int containerIndexOf(RDFNode n)
    • containerContains

      public boolean containerContains(RDFNode n)