ajax.catalog
Class LibCatalog

java.lang.Object
  |
  +--ajax.catalog.LibCatalog

public class LibCatalog
extends java.lang.Object

LibCatalog stores functions and algorithms


Constructor Summary
LibCatalog()
          Constructor for the catalog.
 
Method Summary
 void addAlgorithm(Algorithm algo)
          This method add an algorithm to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.
 void addComposedType(ComposedType composedType)
          This method adds a composed type to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.
 void addConstantDeclaration(ConstantDeclaration constantDeclaration)
          This method adds a constant to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.
 void addFunction(Function function)
          This method adds a function to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.
 boolean exists(java.lang.String objname)
          Checks if a given object exists in the catalog
 Algorithm getAlgorithm(java.lang.String algoName)
          Given an algorithm name, this method looks for the corresponding algorithm in the catalog and returns the corresponding algorithm object. if not found it returns null.
 ComposedType getComposedType(java.lang.String composedTypeName)
          Given a composed type name, this method looks for the corresponding composed type in the catalog and returns the corresponding composed type object.
 java.util.Enumeration getComposedTypes()
          Returns an enumeration of functions.
 ConstantDeclaration getConstantDeclaration(java.lang.String constantName)
          Given a constant name, this method looks for the corresponding constant in the catalog and returns it.
 Function getFunction(java.lang.String functionName)
          Given a function name, this method looks for the corresponding function in the catalog and returns the corresponding function object. if not found it returns null.
 java.util.Enumeration getFunctions()
          Returns an enumeration of functions.
 void removeAlgorithm(java.lang.String algoName)
          Removes an algorithm from the catalog.
 void removeFunction(java.lang.String functionName)
          Removes a function from the catalog.
 java.lang.String toString()
          Converts the transformation into a human read-able object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LibCatalog

public LibCatalog()
Constructor for the catalog.
Method Detail

addComposedType

public void addComposedType(ComposedType composedType)
                     throws CatalogException
This method adds a composed type to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.

getComposedType

public ComposedType getComposedType(java.lang.String composedTypeName)
Given a composed type name, this method looks for the corresponding composed type in the catalog and returns the corresponding composed type object. If not found it returns null.

getComposedTypes

public java.util.Enumeration getComposedTypes()
Returns an enumeration of functions.

addConstantDeclaration

public void addConstantDeclaration(ConstantDeclaration constantDeclaration)
                            throws CatalogException
This method adds a constant to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.

getConstantDeclaration

public ConstantDeclaration getConstantDeclaration(java.lang.String constantName)
Given a constant name, this method looks for the corresponding constant in the catalog and returns it. If not found it returns null.

addFunction

public void addFunction(Function function)
                 throws CatalogException
This method adds a function to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.

removeFunction

public void removeFunction(java.lang.String functionName)
Removes a function from the catalog.

getFunction

public Function getFunction(java.lang.String functionName)
Given a function name, this method looks for the corresponding function in the catalog and returns the corresponding function object. if not found it returns null.

getFunctions

public java.util.Enumeration getFunctions()
Returns an enumeration of functions.

addAlgorithm

public void addAlgorithm(Algorithm algo)
                  throws CatalogException
This method add an algorithm to the catalog. verifies if there is already one defined with the same name if there is, throws an exception.
Parameters:
the - algorithm to add.

removeAlgorithm

public void removeAlgorithm(java.lang.String algoName)
Removes an algorithm from the catalog.
Parameters:
algoName - is the algorithm name.

getAlgorithm

public Algorithm getAlgorithm(java.lang.String algoName)
Given an algorithm name, this method looks for the corresponding algorithm in the catalog and returns the corresponding algorithm object. if not found it returns null.

exists

public boolean exists(java.lang.String objname)
Checks if a given object exists in the catalog

toString

public java.lang.String toString()
Converts the transformation into a human read-able object.
Overrides:
toString in class java.lang.Object