org.andromda.core.translation.library
Class Library

java.lang.Object
  extended byorg.andromda.core.namespace.BaseNamespaceComponent
      extended byorg.andromda.core.common.BasePlugin
          extended byorg.andromda.core.translation.library.Library
All Implemented Interfaces:
NamespaceComponent, Plugin

public class Library
extends BasePlugin

The AndroMDA Translation Library implementation of the Plugin. Library instances are configured from META-INF/andromda-translation-library.xml files discovered on the classpath.

Author:
Chad Brandon

Constructor Summary
Library()
          The default Library constructor.
 
Method Summary
 void addLibraryTranslation(LibraryTranslation libraryTranslation)
          Adds a new LibraryTranslation.
 LibraryTranslation getLibraryTranslation(String name)
          Retrieves the LibraryTranslation with the specified name.
 Map getLibraryTranslations()
          Gets the LibraryTranslation instances (keyed by name) which are part of this Library.
 void populateTemplateContext(Map templateContext)
          Populates the templateContext with the properties and template objects defined in the plugin's descriptor.
 void setTranslator(String translatorClass)
          Sets the translatorClass that will perform the translation processing.
 
Methods inherited from class org.andromda.core.common.BasePlugin
addMacrolibrary, addPropertyReference, addTemplateObject, getContents, getLogger, getMergeLocation, getPropertyReferences, getTemplateEngine, getTemplateObjects, initialize, setTemplateEngineClass, shutdown, toString
 
Methods inherited from class org.andromda.core.namespace.BaseNamespaceComponent
getNamespace, getResource, setNamespace, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.andromda.core.namespace.NamespaceComponent
getNamespace, getResource, setNamespace, setResource
 

Constructor Detail

Library

public Library()
The default Library constructor.

Method Detail

addLibraryTranslation

public void addLibraryTranslation(LibraryTranslation libraryTranslation)
Adds a new LibraryTranslation.

Parameters:
libraryTranslation -

getLibraryTranslations

public Map getLibraryTranslations()
Gets the LibraryTranslation instances (keyed by name) which are part of this Library.

Returns:
Map

getLibraryTranslation

public LibraryTranslation getLibraryTranslation(String name)
Retrieves the LibraryTranslation with the specified name.

Parameters:
name -
Returns:
LibraryTranslation the LibraryTranslation corresponding to the name.

setTranslator

public void setTranslator(String translatorClass)
Sets the translatorClass that will perform the translation processing.

Parameters:
translatorClass - the Class for the Translator implementation.

populateTemplateContext

public void populateTemplateContext(Map templateContext)
Description copied from class: BasePlugin
Populates the templateContext with the properties and template objects defined in the plugin's descriptor. If the templateContext is null, a new Map instance will be created before populating the context.

Overrides:
populateTemplateContext in class BasePlugin
Parameters:
templateContext - the context of the template to populate.
See Also:
BasePlugin.populateTemplateContext(java.util.Map)


Copyright © 2003-2006 The AndroMDA Team. All Rights Reserved.