net.sf.opendse.model
Class Specification

java.lang.Object
  extended by net.sf.opendse.model.Specification
All Implemented Interfaces:
IAttributes

public class Specification
extends java.lang.Object
implements IAttributes

The Specification consists of an Application, Architecture, Mappings, and Routings.


Field Summary
protected  Application<?,?> application
           
protected  Architecture<?,?> architecture
           
protected  Attributes attributes
           
protected  Mappings<?,?> mappings
           
protected  Routings<?,?,?> routings
           
 
Constructor Summary
Specification(Application<?,?> application, Architecture<?,?> architecture, Mappings<?,?> mappings)
          Constructs the specification.
Specification(Application<?,?> application, Architecture<?,?> architecture, Mappings<?,?> mappings, Routings<?,?,?> routings)
          Constructs the specification.
 
Method Summary
protected static Routings<?,?,?> fill(Application<?,?> application, Architecture<?,?> architecture)
           
<A extends Application<Task,Dependency>>
A
getApplication()
          Returns the application.
<A extends Architecture<Resource,Link>>
A
getArchitecture()
          Returns the architecture.
<O> O
getAttribute(java.lang.String identifier)
          Returns the attribute
 java.util.Set<java.lang.String> getAttributeNames()
          Returns the attribute names.
 Parameter getAttributeParameter(java.lang.String identifier)
          Return the parameter definition or null if the attribute is not defined as parameter.
 Attributes getAttributes()
          Returns the map of all pairs of attributes.
<M extends Mappings<Task,Resource>>
M
getMappings()
          Returns the mappings.
<R extends Routings<Task,Resource,Link>>
R
getRoutings()
          Returns the routings.
 boolean isDefined(java.lang.String identifier)
          Tests whether an attribute is defined.
 void setAttribute(java.lang.String identifier, java.lang.Object object)
          Sets the attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

architecture

protected Architecture<?,?> architecture

application

protected Application<?,?> application

mappings

protected Mappings<?,?> mappings

routings

protected Routings<?,?,?> routings

attributes

protected Attributes attributes
Constructor Detail

Specification

public Specification(Application<?,?> application,
                     Architecture<?,?> architecture,
                     Mappings<?,?> mappings)
Constructs the specification. The routings are the architecture for each task.

Parameters:
application - the application
architecture - the architecture
mappings - the mappings

Specification

public Specification(Application<?,?> application,
                     Architecture<?,?> architecture,
                     Mappings<?,?> mappings,
                     Routings<?,?,?> routings)
Constructs the specification.

Parameters:
application - the application
architecture - the architecture
mappings - the mappings
routings - the routings
Method Detail

fill

protected static Routings<?,?,?> fill(Application<?,?> application,
                                      Architecture<?,?> architecture)

getArchitecture

public <A extends Architecture<Resource,Link>> A getArchitecture()
Returns the architecture.

Type Parameters:
A - the type of architecture
Returns:
the architecture

getApplication

public <A extends Application<Task,Dependency>> A getApplication()
Returns the application.

Type Parameters:
A - the type of application
Returns:
the application

getMappings

public <M extends Mappings<Task,Resource>> M getMappings()
Returns the mappings.

Type Parameters:
M - the type of mappings
Returns:
the mappings

getRoutings

public <R extends Routings<Task,Resource,Link>> R getRoutings()
Returns the routings.

Type Parameters:
R - the type of routings
Returns:
the routings

setAttribute

public void setAttribute(java.lang.String identifier,
                         java.lang.Object object)
Description copied from interface: IAttributes
Sets the attribute.

Specified by:
setAttribute in interface IAttributes
Parameters:
identifier - the identifier of the attribute
object - the value of the attribute

getAttribute

public <O> O getAttribute(java.lang.String identifier)
Description copied from interface: IAttributes
Returns the attribute

Specified by:
getAttribute in interface IAttributes
Type Parameters:
O - the type of the attribute
Parameters:
identifier - the identifier of the attribute
Returns:
the value of the value of the attribute

getAttributeParameter

public Parameter getAttributeParameter(java.lang.String identifier)
Description copied from interface: IAttributes
Return the parameter definition or null if the attribute is not defined as parameter.

Specified by:
getAttributeParameter in interface IAttributes
Parameters:
identifier - the identifier of the attribute
Returns:
the parameter

getAttributes

public Attributes getAttributes()
Description copied from interface: IAttributes
Returns the map of all pairs of attributes.

Specified by:
getAttributes in interface IAttributes
Returns:
the attribute map

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Description copied from interface: IAttributes
Returns the attribute names.

Specified by:
getAttributeNames in interface IAttributes
Returns:
the attribute names

isDefined

public boolean isDefined(java.lang.String identifier)
Description copied from interface: IAttributes
Tests whether an attribute is defined.

Specified by:
isDefined in interface IAttributes
Parameters:
identifier - the identifier of the attribute
Returns:
true if defined