String libraryBuilderClassName = alternateLibraryBuilderAttribute
.getExpression();
// Dynamically load the library builder and build the library
Class libraryBuilderClass = Class.forName(libraryBuilderClassName);
LibraryBuilder libraryBuilder = (LibraryBuilder) libraryBuilderClass
.newInstance();
// Set the attributes defined in the moml to the attributes of the
// LibraryBuilder
libraryBuilder.addAttributes(alternateLibraryBuilderAttribute
.attributeList());
try {
library = libraryBuilder.buildLibrary(libraryContainer
.workspace());
} catch (Exception ex) {
ex.printStackTrace();
throw new Exception("Cannot create library with "
+ "LibraryBuilder: ", ex);