ptolemy.moml
Class LibraryBuilder

java.lang.Object
  extended by ptolemy.moml.LibraryBuilder

public abstract class LibraryBuilder
extends java.lang.Object

An abstract class that defines the interface for LibraryBuilder. The main purpose of a library builder is to create a moml library from something other than a moml document. The first implementation of this class is going to be to create a library from a directory of ksw files.

Since:
Ptolemy II 5.2
Version:
$Id: LibraryBuilder.java 43476 2006-08-21 23:54:24Z cxh $
Author:
Chad Berkley
Accepted Rating:
Red (berkley)
Proposed Rating:
Red (berkley)

Field Summary
protected  java.util.List _attributes
          Attributes that can be added to a LibraryBuilder via moml configuration.
 
Constructor Summary
LibraryBuilder()
          Construct a library builder.
 
Method Summary
 void addAttributes(java.util.List attributeList)
          Add a list of Attributes.
abstract  CompositeEntity buildLibrary(Workspace workspace)
          Build the library.
 java.util.List getAttributes()
          Get the list of Attributes associated with this LibraryBuilder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_attributes

protected java.util.List _attributes
Attributes that can be added to a LibraryBuilder via moml configuration.

Constructor Detail

LibraryBuilder

public LibraryBuilder()
Construct a library builder.

Method Detail

addAttributes

public void addAttributes(java.util.List attributeList)
Add a list of Attributes.

Parameters:
attributeList - The list of Attributes.

getAttributes

public java.util.List getAttributes()
Get the list of Attributes associated with this LibraryBuilder.

Returns:
The list of Attributes.

buildLibrary

public abstract CompositeEntity buildLibrary(Workspace workspace)
                                      throws java.lang.Exception
Build the library. This should be built in the form of a ComponentEntity See the VergilApplication code if you want an example of what the ComponentEntity should look like.

Parameters:
workspace - The workspace.
Returns:
ComponentEntity
Throws:
java.lang.Exception