ubiware.util.saplbuilder
Class StatementContainer

java.lang.Object
  extended by ubiware.util.saplbuilder.StatementContainer
All Implemented Interfaces:
java.lang.Iterable<Statement>
Direct Known Subclasses:
Container, SaplDocument

public abstract class StatementContainer
extends java.lang.Object
implements java.lang.Iterable<Statement>

A collection to which Statements can be added.

Since:
17 Aug 2010
Author:
Michael Cochez for Ubiware project

Field Summary
(package private)  java.util.List<Statement> statements
           
 
Constructor Summary
StatementContainer(int initialCapacity)
          Create a StatementContainer with the specified initial capacity.
 
Method Summary
 void addStatement(Statement statement)
          Add a statement to the collection.
 void addStatement(Subject subject, Predicate predicate, Object object)
          Same as addStatement(Statement) with a newly created Statement
 void addStatements(StatementContainer sc)
          Add all statements in from the statement container.
(package private)  void generateSapl(java.lang.StringBuilder builder)
          generate a s-apl representation for the statements in this collection.
 java.util.Iterator<Statement> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statements

final java.util.List<Statement> statements
Constructor Detail

StatementContainer

public StatementContainer(int initialCapacity)
Create a StatementContainer with the specified initial capacity.

Parameters:
initialCapacity -
Method Detail

addStatement

public void addStatement(Subject subject,
                         Predicate predicate,
                         Object object)
Same as addStatement(Statement) with a newly created Statement

Parameters:
subject -
predicate -
object -

addStatement

public void addStatement(Statement statement)
Add a statement to the collection.

Parameters:
statement -

addStatements

public void addStatements(StatementContainer sc)
Add all statements in from the statement container.

Parameters:
statement - Statement container whose content will be added to this container

generateSapl

void generateSapl(java.lang.StringBuilder builder)
generate a s-apl representation for the statements in this collection.

Parameters:
builder -

iterator

public java.util.Iterator<Statement> iterator()
Specified by:
iterator in interface java.lang.Iterable<Statement>