templates.library
Class FSATemplate

java.lang.Object
  extended by templates.library.FSATemplate
All Implemented Interfaces:
Template

public class FSATemplate
extends java.lang.Object
implements Template

Implementation of a Template which is based on an FSAModel.

Author:
Lenko Grigorov

Field Summary
protected  java.lang.String description
          The description of the template.
protected  EntityIcon icon
          The icon of the template.
protected  ides.api.model.fsa.FSAModel model
          The FSAModel underlying the template.
protected  java.lang.String tag
          The "ID" of the template.
 
Fields inherited from interface templates.library.Template
fsaFlavor, TEMPLATE_DESC, templateFlavor
 
Constructor Summary
FSATemplate(TemplateDescriptor td, ides.api.model.fsa.FSAModel model)
          Create a template based on an FSAModel, with the properties provided in the given TemplateDescriptor.
 
Method Summary
 java.lang.String getDescription()
          Retrieve the description of the template.
 EntityIcon getIcon()
          Retrieve the icon of the template.
 ides.api.model.fsa.FSAModel getModel()
          Retrieve the FSAModel on which the template is based.
 java.lang.String getName()
          Retrieve the "ID" of the template.
 ides.api.model.fsa.FSAModel instantiate()
          Create a new instance of the template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

protected java.lang.String tag
The "ID" of the template. This is a short string which will appear in the icon of the template.


description

protected java.lang.String description
The description of the template.


model

protected ides.api.model.fsa.FSAModel model
The FSAModel underlying the template.


icon

protected EntityIcon icon
The icon of the template.

Constructor Detail

FSATemplate

public FSATemplate(TemplateDescriptor td,
                   ides.api.model.fsa.FSAModel model)
Create a template based on an FSAModel, with the properties provided in the given TemplateDescriptor.

Parameters:
td - the descriptor with the properties for the new template
model - the FSA model on which the template should be based
Method Detail

getIcon

public EntityIcon getIcon()
Description copied from interface: Template
Retrieve the icon of the template. This icon can be used when visualizing the template.

Specified by:
getIcon in interface Template
Returns:
the icon of the template

getName

public java.lang.String getName()
Description copied from interface: Template
Retrieve the "ID" of the template. This is a short string which can be used to identify the template, e.g., by displaying it inside the template icon.

Specified by:
getName in interface Template
Returns:
the "ID" of the template

instantiate

public ides.api.model.fsa.FSAModel instantiate()
Description copied from interface: Template
Create a new instance of the template. The instance is a copy of the underlying model.

Specified by:
instantiate in interface Template
Returns:
a new instance of the template

getDescription

public java.lang.String getDescription()
Description copied from interface: Template
Retrieve the description of the template. This can be a longer piece of text including any notes about the template.

Specified by:
getDescription in interface Template
Returns:
the description of the template

getModel

public ides.api.model.fsa.FSAModel getModel()
Description copied from interface: Template
Retrieve the FSAModel on which the template is based.

Specified by:
getModel in interface Template
Returns:
the FSAModel on which the template is based