com.gmail.thejcwk.semantics
Class PhraseCollection

java.lang.Object
  extended by com.gmail.thejcwk.semantics.PhraseCollection
All Implemented Interfaces:
java.io.Serializable

public class PhraseCollection
extends java.lang.Object
implements java.io.Serializable

This class encapsulates management of a collection of phrases that should be rendered.

Version:
0.1
Author:
Jan Kroeze
See Also:
Serialized Form

Constructor Summary
PhraseCollection(java.io.File f)
          Constructs a new PhraseCollection from the specified file.
 
Method Summary
 void applyFilter(Filter filter)
          Applies a filter to this PhraseCollection.
 java.util.ArrayList<Filter> getFilters()
          Returns all the filters that have been applied to this collection.
 java.util.ArrayList<java.lang.String> getPhoneticRepresentations()
          Return an ArrayList containing all the phonetic representations in the collection.
 java.util.ArrayList<Phrase> getPhrases()
          Return an ArrayList containing all the phrases in the collection.
 java.util.ArrayList<java.lang.String> getSemanticFunctions()
          Return an ArrayList containing all the semantic functions in the collection.
 java.util.ArrayList<java.lang.String> getSyntacticFunctions()
          Return an ArrayList containing all the syntactic functions in the collection.
 void resetFilters()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhraseCollection

public PhraseCollection(java.io.File f)
                 throws javax.xml.parsers.ParserConfigurationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Constructs a new PhraseCollection from the specified file. By default, all phrases in the file will be included in the collection.

Parameters:
f - The file from which to get Phrases.
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Method Detail

applyFilter

public void applyFilter(Filter filter)
Applies a filter to this PhraseCollection.

Parameters:
filter -

getFilters

public java.util.ArrayList<Filter> getFilters()
Returns all the filters that have been applied to this collection. Returns an empty ArrayList if no filters have yet been applied.

Returns:
An ArrayList object.

resetFilters

public void resetFilters()

getPhoneticRepresentations

public java.util.ArrayList<java.lang.String> getPhoneticRepresentations()
Return an ArrayList containing all the phonetic representations in the collection.

Returns:
An ArrayList object.

getPhrases

public java.util.ArrayList<Phrase> getPhrases()
Return an ArrayList containing all the phrases in the collection.

Returns:
An ArrayList object.

getSemanticFunctions

public java.util.ArrayList<java.lang.String> getSemanticFunctions()
Return an ArrayList containing all the semantic functions in the collection.

Returns:
An ArrayList object.

getSyntacticFunctions

public java.util.ArrayList<java.lang.String> getSyntacticFunctions()
Return an ArrayList containing all the syntactic functions in the collection.

Returns:
An ArrayList object.