ubiware.util.saplbuilder
Class SaplDocument

java.lang.Object
  extended by ubiware.util.saplbuilder.StatementContainer
      extended by ubiware.util.saplbuilder.SaplDocument
All Implemented Interfaces:
java.lang.Iterable<Statement>

public class SaplDocument
extends StatementContainer

A SaplDocument is an consistent representation of a s-apl document

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

Field Summary
 
Fields inherited from class ubiware.util.saplbuilder.StatementContainer
statements
 
Constructor Summary
SaplDocument()
          Creates a SaplDocument with the initial capacity equal to 5.
SaplDocument(int initialCapacity)
          Creates a SaplDocument with the initial capacity as specified.
SaplDocument(StatementContainer sc)
          Creates a SaplDocument filled with statements from the provided statement container
 
Method Summary
 java.lang.String generateSapl()
          Generate the S-apl representation of this SaplDocument in a String.
 void generateSapl(java.lang.StringBuilder builder)
          generate a s-apl representation for the statements in this collection.
 
Methods inherited from class ubiware.util.saplbuilder.StatementContainer
addStatement, addStatement, addStatements, iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaplDocument

public SaplDocument()
Creates a SaplDocument with the initial capacity equal to 5.


SaplDocument

public SaplDocument(StatementContainer sc)
Creates a SaplDocument filled with statements from the provided statement container


SaplDocument

public SaplDocument(int initialCapacity)
Creates a SaplDocument with the initial capacity as specified.

Parameters:
initialCapacity - the initial capacity of the document.
Method Detail

generateSapl

public java.lang.String generateSapl()
Generate the S-apl representation of this SaplDocument in a String.

Returns:
A string containg S-APL code this Sapl document contains.

generateSapl

public void generateSapl(java.lang.StringBuilder builder)
Description copied from class: StatementContainer
generate a s-apl representation for the statements in this collection.

Overrides:
generateSapl in class StatementContainer