Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

de.fraunhofer.isst.axbench.operations.AXLWriter Class Reference

Converter to aXLang (axl). More...

List of all members.

Public Member Functions

String abstractConnectionInstanceToAXL (AbstractConnectionInstance theGlobalConnectionInstance, String sIndent, Object...arrAdditional)
 Converts global connection instance to axl.
String abstractDataLinktoAXL (AbstractDataLink axlDataElementLink, String sIndent)
 Converts a data element link to aXLang.
 AXLWriter ()
 Constructor setting the operation parameters.
String toAXL (OperationInstance theGlobalOperationInstance, String sIndent, Object...arrAdditional)
 Converts global operation instance to axl.
String toAXL (SignalInstance theGlobalSignalInstance, String sIndent, Object...arrAdditional)
 Converts global signal instance to axl.
String toAXL (FunctionInstance theGlobalFunctionInstance, String sIndent, Object...arrAdditional)
 Converts global function instance to axl.
String toAXL (StorageInstance theGlobalStorageInstance, String sIndent, Object...arrAdditional)
 Converts global storage instance to axl.
String toAXL (DelegationUpInstance theGlobalDelegationInstance, String sIndent, Object...arrAdditional)
 Converts global delegation instance to axl.
String toAXL (DelegationDownInstance theGlobalDelegationInstance, String sIndent, Object...arrAdditional)
 Converts global delegation instance to axl.
String toAXL (DelegationInstance theGlobalDelegationInstance, String sIndent, Object...arrAdditional)
 Converts global delegation instance to axl.
String toAXL (ConnectionInstance theGlobalConnectionInstance, String sIndent, Object...arrAdditional)
 Converts global subcomponent instance to axl.
String toAXL (BooleanConstant theBooleanConstant, String sIndent, Object...arrAdditional)
 Converts boolean constant to axl.
String toAXL (SubComponentInstance theGlobalSubComponentInstance, String sIndent, Object...arrAdditional)
 Converts global subcomponent instance to axl.
String toAXL (PortInstance theGlobalPortInstance, String sIndent, Object...arrAdditional)
 Converts global port instance to axl.
String toAXL (ComponentInstance theGlobalComponentInstance, String sIndent, Object...arrAdditional)
 Converts global component instance to axl.
String toAXL (AspectRelationReplace theReplaceAspectRelation, String sIndent, Object...arrAdditional)
 Converts replace aspect relation to axl.
String toAXL (AspectRelationInner theInnerAspectRelation, String sIndent, Object...arrAdditional)
 Converts inner aspect relation to axl.
String toAXL (AspectRelationIdentity theIdentityAspectRelation, String sIndent, Object...arrAdditional)
 Converts identity aspect relation to axl.
String toAXL (AspectRelationCopy theCopyAspectRelation, String sIndent, Object...arrAdditional)
 Converts copy aspect relation to axl.
String toAXL (AspectMapping theAspectMapping, String sIndent, Object...arrAdditional)
 Converts aspect mapping to axl.
String toAXL (Activation theActivation, String sIndent, Object...arrAdditional)
 Converts activation to aXLang.
String toAXL (ActivityAttribute theActivityAttribute, String sIndent, Object...arrAdditional)
 Converts activity attribute to aXLang.
String toAXL (AspectComposition theAspectComposition, String sIndent, Object...arrAdditional)
 Converts aspect composition to axl.
String toAXL (DelegationDown axlDownDelegation, String sIndent, Object...arrAdditional)
 Converts a down delegation to aXLang.
String toAXL (TransactionModel theTransactionModel, String sIndent, Object...arrAdditional)
 Converts transaction model to aXLang.
String toAXL (Con2ConLink theCon2ConLink, String sIndent, Object...arrAdditional)
 Converts connection to hardware connection link to axl.
String toAXL (P2PLink theP2PLink, String sIndent, Object...arrAdditional)
 Converts port to hardware port link to axl.
String toAXL (SC2SCLink theSC2SCLink, String sIndent, Object...arrAdditional)
 Converts component to hardware component link to axl.
String toAXL (A2RMapping theA2RMapping, String sIndent, Object...arrAdditional)
 Converts application to hardware mapping to axl.
String toAXL (Feature2ArchitectureLink f2aLink, String sIndent, Object...arrAdditional)
 Converts feature to component link to axl.
String toAXL (F2RMapping theF2RMapping, String sIndent, Object...arrAdditional)
 Converts feature to application mapping to axl.
String toAXL (F2AMapping theF2AMapping, String sIndent, Object...arrAdditional)
 Converts feature to application mapping to axl.
String toAXL (Bus theHWBus, String sIndent, Object...arrAdditional)
 Converts hardware bus to axl.
String toAXL (Signal theSignal, String sIndent, Object...arrAdditional)
 Converts signal to aXLang.
String toAXL (Parameter theParameter, String sIndent, Object...arrAdditional)
 Converts parameter to aXLang.
String toAXL (Operation theOperation, String sIndent, Object...arrAdditional)
 Converts operation to aXLang.
String toAXL (WritePort theWritePort, String sIndent, Object...arrAdditional)
 Converts write port to axl.
String toAXL (DoStatement theDoStatement, String sIndent, Object...arrAdditional)
 Converts do statement to axl.
String toAXL (WhileStatement theWhileStatement, String sIndent, Object...arrAdditional)
 Converts while statement to axl.
String toAXL (ForStatement theForStatement, String sIndent, Object...arrAdditional)
 Converts for statement to axl.
String toAXL (IfStatement theIfStatement, String sIndent, Object...arrAdditional)
 Converts if statement to axl.
String toAXL (PrefixExpression thePrefixExpression, String sIndent, Object...arrAdditional)
 Converts prefix expression to axl.
String toAXL (PostfixExpression thePostfixExpression, String sIndent, Object...arrAdditional)
 Converts postfix expression to axl.
String toAXL (InfixExpression theInfixExpression, String sIndent, Object...arrAdditional)
 Converts infix expression to axl.
String toAXL (ReadPort theReadPort, String sIndent, Object...arrAdditional)
 Converts read port to axl.
String toAXL (BracketsExpression theBracketsExpression, String sIndent, Object...arrAdditional)
 Converts brackets expression to axl.
String toAXL (VariableExpression theVariableExpression, String sIndent, Object...arrAdditional)
 Converts variable expression to axl.
String toAXL (NullConstant theNullConstant, String sIndent, Object...arrAdditional)
 Converts null constant to axl.
String toAXL (IntegerConstant theIntegerConstant, String sIndent, Object...arrAdditional)
 Converts integer constant to axl.
String toAXL (BusDelegation axlBusDelegation, String sIndent, Object...arrAdditional)
String toAXL (Assignment theAssignment, String sIndent, Object...arrAdditional)
 Converts assignment to axl.
String toAXL (OperationCallExpression axlElement, String sIndent, Object...arrAdditional)
 Converts operation call expression to axl.
String toAXL (ReturnStatement theReturnStatement, String sIndent, Object...arrAdditional)
 Converts return statement to axl.
String toAXL (OperationCall theOperationCall, String sIndent, Object...arrAdditional)
 Converts operation call to axl.
String toAXL (Execute theExecute, String sIndent, Object...arrAdditional)
 Converts executable behavior to aXLang.
String toAXL (Transaction theTransaction, String sIndent, Object...arrAdditional)
 Converts transaction to aXLang.
String toAXL (LocalFunctionInstance theLocalFunctionInstance, String sIndent, Object...arrAdditional)
 Converts local function instance to aXLang.
String toAXL (Behavior theBehavior, String sIndent, Object...arrAdditional)
 Converts behavior to aXLang.
String toAXL (StorageRWAccess theStorageRWAccess, String sIndent, Object...arrAdditional)
 Converts storage rw access to aXLang.
String toAXL (PortRWAccess thePortRWAccess, String sIndent, Object...arrAdditional)
 Converts port rw access to aXLang.
String toAXL (Function theFunction, String sIndent, Object...arrAdditional)
 Converts function to aXLang.
String toAXL (Storage axlStorage, String sIndent, Object...arrAdditional)
 Converts storage to aXLang.
String toAXL (FunctionLink theFunctionLink, String sIndent, Object...arrAdditional)
 Converts a function link to aXLang.
String toAXL (StorageLink theStorageLink, String sIndent, Object...arrAdditional)
 Converts a storage link to aXLang.
String toAXL (DelegationUpDataLink axlDataElementLink, String sIndent, Object...arrAdditional)
String toAXL (DelegationDownDataLink axlDataElementLink, String sIndent, Object...arrAdditional)
String toAXL (ConnectionDataLink axlDataElementLink, String sIndent, Object...arrAdditional)
String toAXL (CardinalityAssignment theCardinalityAssignment, String sIndent, Object...arrAdditional)
 Converts cardinality assignment to axl.
String toAXL (ResourceModel theResourceModel, String sIndent, Object...arrAdditional)
 Converts application model to aXLang.
String toAXL (BusConnection axlBusConnection, String sIndent, Object...arrAdditional)
String toAXL (Activity theActivity, String sIndent, Object...arrAdditional)
 Converts activity to aXLang.
String toAXL (Block theBlock, String sIndent, Object...arrAdditional)
 Converts a block to axl.
String toAXL (Connection axlConnection, String sIndent, Object...arrAdditional)
 Converts a horizontal connection to aXLang.
String toAXL (SubComponent theSubComponent, String sIndent, Object...arrAdditional)
 Converts subcomponent to aXLang.
String toAXL (Port thePort, String sIndent, Object...arrAdditional)
 Converts port to aXLang.
String toAXL (XORComponent theXORComponent, String sIndent, Object...arrAdditional)
 Converts xor component to aXLang.
String toAXL (Component theComponent, String sIndent, Object...arrAdditional)
 Converts component to aXLang.
String toAXL (FeatureModel theFeatureModel, String sIndent, Object...arrAdditional)
 Converts feature model to aXLang.
String toAXL (DelegationUp axlUpDelegation, String sIndent, Object...arrAdditional)
 Converts an up delegation to aXLang.
String toAXL (ApplicationModel theApplicationModel, String sIndent, Object...arrAdditional)
 Converts application model to aXLang.
String toAXL (Configuration theConfiguration, String sIndent, Object...arrAdditional)
 Converts configuration to axl.
String toAXL (Feature theFeature, String sIndent, Object...arrAdditional)
 Converts feature to aXLang.
String toAXL (Model theModel, String sIndent, Object...arrAdditional)
 Converts model to aXLang.
String toAXL (AXLangAttribute axlAttribute, String sIndent, Object...arrAdditional)
 Converts attribute to aXLang.
String toAXLOrInclude (IAXLangElement axlElement, String sIndent, Object...arrAdditional)
 Returns aXLang representation valid for every element.
boolean writeFile (String theFilename, IAXLangElement theElement)
 Writes the given file and returns success/failure.

Static Public Attributes

static final String ID_IN_ELEMENT = "axlin"
 identifier of the input element
static final String ID_IN_FILE = "axlfile"
 identifier of the output file
static final String PARAM_FOR_ID_CHECK = "wholefilescontent"
static final String PARAM_OUT_WRITER = "stringbuildercontent"
 identifier of the output content

Protected Member Functions

Map< String, Object > executeConcreteOperation (Map< String, Object > theInputParameters)
 Writes an element.

Private Member Functions

String a2rLinkToAxl (A2RLink a2rLink, String sIndent)
String correctPathString (String thePath)
 Corrects the path (replaces '\' with '/').
String findFileName (IAXLangElement theElement)
 Returns filename of the given element.
String findIncludedFileName (IAXLangElement element)
 Returns included filename of the given element.
String getAttributeBlock (IAXLangElement theElement)
 Returns a string representation of path in path notation.
String getIncludeFilename (IAXLangElement axlElement)
 Returns filename if the element has to be included, null otherwise.
Map< String, Object > handleFileOutputStreams (StringBuilder sbAXLText, IAXLangElement theElement) throws FileNotFoundException
 Writes directly to the file output streams of the session that are not opened inside the editor.
String toAXL (AbstractConnection axlConnection, String sIndent, String sourceSubComponentID, String sourcePortID, String targetSubComponentID, String targetPortID)
 Converts an abstract connection to aXLang (for horizontal connections, delegations down and up.
String toAXL (IGlobalInstance theGlobalInstance, String sIndent, String sType, Object...arrAdditional)
 Converts global instance to axl.
String toAXL (Cardinality theCardinality)
 Returns axl representation of cardinality.
String toAXL (AspectRelation theAspectRelation, String sIndent, String sType)
 Converts aspect relation to axl.
String toAXL (ComposedExpression theComposedExpression, String sLeft, String sRight, String sSpace)
 Converts composed expression to axl.

Private Attributes

String sOldModelFilename = null
 if the outputfile is another than the inputfile (model) , the oldmodelfilename has to be saved

Static Private Attributes

static final String FORMAT_BLOCK = "{0}{1} '{'\n{2}{0}'}'\n"
 block formatting
static final String FORMAT_LINE = "{0}{1};\n"
 line formatting
static final String INDENT = "\t"
 indentation for pretty formatting
static final String PATH_SEPARATOR = "."
 separator symbol for the syntactic representation of element paths

Detailed Description

Converter to aXLang (axl).

All toAXL methods are public because of the call via reflection API in toAXLOrInclude(IAXLangElement, String).

There has to be a toAXL method for all elements, for their class hierarchy is not recognized in the reflection API. Example: toAXL(XORComponent, String)

This is clearer than automatically changing the element type as in version 0.8.0, because new elements have to be taken care of explicitly.

Author:
ekleinod
mgrosse
mmark
nschult
cknoppek
skaegebein
Version:
0.10.0
Since:
0.3

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.operations.AXLWriter.AXLWriter (  ) 

Constructor setting the operation parameters.

Input parameters:

  • one aXLang element
  • output file

Member Function Documentation

String de.fraunhofer.isst.axbench.operations.AXLWriter.a2rLinkToAxl ( A2RLink  a2rLink,
String  sIndent 
) [private]
String de.fraunhofer.isst.axbench.operations.AXLWriter.abstractConnectionInstanceToAXL ( AbstractConnectionInstance  theGlobalConnectionInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global connection instance to axl.

Parameters:
theGlobalConnectionInstance aXLang global connection instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.abstractDataLinktoAXL ( AbstractDataLink  axlDataElementLink,
String  sIndent 
)

Converts a data element link to aXLang.

Parameters:
axlDataElementLink aXLang data element link
sIndent text indentation
Returns:
AXL representation
Author:
ekleinod
mgrosse
mmark
nschult
cknoppek
skaegebein
Version:
0.9.0
Since:
0.3
String de.fraunhofer.isst.axbench.operations.AXLWriter.correctPathString ( String  thePath  )  [private]

Corrects the path (replaces '\' with '/').

Parameters:
thePath path to correct
Returns:
corrected path
Map<String, Object> de.fraunhofer.isst.axbench.operations.AXLWriter.executeConcreteOperation ( Map< String, Object >  theInputParameters  )  [protected]

Writes an element.

Parameters:
theInputParameters map of the input parameters (empty map allowed)
Returns:
map of the output parameters (empty map allowed)
String de.fraunhofer.isst.axbench.operations.AXLWriter.findFileName ( IAXLangElement  theElement  )  [private]

Returns filename of the given element.

If the element does not contain a filename, it's parent(s) filenames are used.

Parameters:
theElement element to get filename for
Returns:
filename of element
Return values:
filename of parent(s) if element does not have one
null if no filename was found
String de.fraunhofer.isst.axbench.operations.AXLWriter.findIncludedFileName ( IAXLangElement  element  )  [private]

Returns included filename of the given element.

If the element does not contain an included filename, it's parent(s) included filenames are used.

Parameters:
theElement element to get included filename for
Returns:
included filename of element
Return values:
included filename of parent(s) if element does not have one
null if no included filename was found
String de.fraunhofer.isst.axbench.operations.AXLWriter.getAttributeBlock ( IAXLangElement  theElement  )  [private]

Returns a string representation of path in path notation.

Parameters:
thePath path
Returns:
path notation of path Returns attribute block for element.
Parameters:
theElement aXLang element
Returns:
attribute block
String de.fraunhofer.isst.axbench.operations.AXLWriter.getIncludeFilename ( IAXLangElement  axlElement  )  [private]

Returns filename if the element has to be included, null otherwise.

  1. check if its a generated axl file inside a temp folder (ekleinod)
  2. correct the file- and includedfilename (\-->//)
  3. cloned elements don't contains any meta information-->no filename, no includedfilename
  4. xor elements can't be divided into different files
  5. the model is included or could be that its an axlin - axlout and the outputfile is another one (as the current model file) --> change the axlElement meta information (filename) to the correct filepath
  6. the current included filename is inside the absolute path of the current file
  7. normal include file handling
    1. build up the new file path
    2. create a new AXLFile and add it to the current one (in the next loop,this created file will be read in)
    3. return the includefilepath, which will be written to the current axl file
      Parameters:
      axlElement aXLang element
      Returns:
      filename if element is included
      Return values:
      null otherwise
Map<String, Object> de.fraunhofer.isst.axbench.operations.AXLWriter.handleFileOutputStreams ( StringBuilder  sbAXLText,
IAXLangElement  theElement 
) throws FileNotFoundException [private]

Writes directly to the file output streams of the session that are not opened inside the editor.

Parameters:
sbAXLText aXLang representation of element
theElement element to write
Exceptions:
FileNotFoundException if file was not found
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ConnectionInstance  theGlobalConnectionInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global subcomponent instance to axl.

Parameters:
theGlobalConnectionInstance aXLang global connection instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationInstance  theGlobalDelegationInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global delegation instance to axl.

Parameters:
theGlobalDelegationInstance aXLang global delegation instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( SubComponentInstance  theGlobalSubComponentInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global subcomponent instance to axl.

Parameters:
theGlobalSubComponentInstance aXLang global subcomponent instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( PortInstance  theGlobalPortInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global port instance to axl.

Parameters:
theGlobalPortInstance aXLang global port instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ComponentInstance  theGlobalComponentInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global component instance to axl.

Parameters:
theGlobalComponentInstance aXLang global component instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( IGlobalInstance  theGlobalInstance,
String  sIndent,
String  sType,
Object...  arrAdditional 
) [private]

Converts global instance to axl.

Parameters:
theGlobalInstance aXLang global instance
sIndent text indentation
sType instance type
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectRelationReplace  theReplaceAspectRelation,
String  sIndent,
Object...  arrAdditional 
)

Converts replace aspect relation to axl.

Parameters:
theReplaceAspectRelation aXLang replace aspect relation
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectRelationInner  theInnerAspectRelation,
String  sIndent,
Object...  arrAdditional 
)

Converts inner aspect relation to axl.

Parameters:
theInnerAspectRelation aXLang inner aspect relation
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectRelationIdentity  theIdentityAspectRelation,
String  sIndent,
Object...  arrAdditional 
)

Converts identity aspect relation to axl.

Parameters:
theIdentityAspectRelation aXLang identity aspect relation
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectRelationCopy  theCopyAspectRelation,
String  sIndent,
Object...  arrAdditional 
)

Converts copy aspect relation to axl.

Parameters:
theCopyAspectRelation aXLang copy aspect relation
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectRelation  theAspectRelation,
String  sIndent,
String  sType 
) [private]

Converts aspect relation to axl.

Parameters:
theAspectRelation aXLang aspect relation
sIndent text indentation
sType relation type
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectMapping  theAspectMapping,
String  sIndent,
Object...  arrAdditional 
)

Converts aspect mapping to axl.

Parameters:
theAspectMapping aXLang aspect mapping
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Cardinality  theCardinality  )  [private]

Returns axl representation of cardinality.

Parameters:
cardinality 
Returns:
axl representation of cardinality
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Execute  theExecute,
String  sIndent,
Object...  arrAdditional 
)

Converts executable behavior to aXLang.

Parameters:
theExecute aXLang executable behavior
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Activation  theActivation,
String  sIndent,
Object...  arrAdditional 
)

Converts activation to aXLang.

Todo:
EK: access methods
Parameters:
theActivation aXLang activation
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ActivityAttribute  theActivityAttribute,
String  sIndent,
Object...  arrAdditional 
)

Converts activity attribute to aXLang.

Todo:
EK: access methods
Parameters:
theActivityAttribute aXLang activity attribute
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Activity  theActivity,
String  sIndent,
Object...  arrAdditional 
)

Converts activity to aXLang.

Todo:
EK: access methods
Parameters:
theActivity aXLang activity
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Transaction  theTransaction,
String  sIndent,
Object...  arrAdditional 
)

Converts transaction to aXLang.

Parameters:
axlElement aXLang transaction
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( TransactionModel  theTransactionModel,
String  sIndent,
Object...  arrAdditional 
)

Converts transaction model to aXLang.

Todo:
EK: access methods
Parameters:
axlElement aXLang transaction model
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Con2ConLink  theCon2ConLink,
String  sIndent,
Object...  arrAdditional 
)

Converts connection to hardware connection link to axl.

Parameters:
theCon2ConLink aXLang connection to hardware connection
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( P2PLink  theP2PLink,
String  sIndent,
Object...  arrAdditional 
)

Converts port to hardware port link to axl.

Parameters:
theP2PLink aXLang port to hardware port link
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( PortRWAccess  thePortRWAccess,
String  sIndent,
Object...  arrAdditional 
)

Converts port rw access to aXLang.

Parameters:
thePortRWAccess aXLang port rw access
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( SC2SCLink  theSC2SCLink,
String  sIndent,
Object...  arrAdditional 
)

Converts component to hardware component link to axl.

Parameters:
theSC2SCLink aXLang component to hardware component link
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( A2RMapping  theA2RMapping,
String  sIndent,
Object...  arrAdditional 
)

Converts application to hardware mapping to axl.

Parameters:
theA2RMapping aXLang application to hardware mapping
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Feature2ArchitectureLink  f2aLink,
String  sIndent,
Object...  arrAdditional 
)

Converts feature to component link to axl.

Parameters:
theF2SCLink aXLang feature to component link
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationUpInstance  theGlobalDelegationInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global delegation instance to axl.

Parameters:
theGlobalDelegationInstance aXLang global delegation instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( F2AMapping  theF2AMapping,
String  sIndent,
Object...  arrAdditional 
)

Converts feature to application mapping to axl.

Parameters:
theF2AMapping aXLang feature to application mapping
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Bus  theHWBus,
String  sIndent,
Object...  arrAdditional 
)

Converts hardware bus to axl.

Parameters:
theHWBus aXLang hardware bus
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Signal  theSignal,
String  sIndent,
Object...  arrAdditional 
)

Converts signal to aXLang.

Parameters:
theSignal aXLang signal
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Parameter  theParameter,
String  sIndent,
Object...  arrAdditional 
)

Converts parameter to aXLang.

Parameters:
theParameter aXLang parameter
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Operation  theOperation,
String  sIndent,
Object...  arrAdditional 
)

Converts operation to aXLang.

Parameters:
theOperation aXLang operation
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( WritePort  theWritePort,
String  sIndent,
Object...  arrAdditional 
)

Converts write port to axl.

Parameters:
theWritePort aXLang write port
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DoStatement  theDoStatement,
String  sIndent,
Object...  arrAdditional 
)

Converts do statement to axl.

Parameters:
theDoStatement aXLang do statement
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( StorageInstance  theGlobalStorageInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global storage instance to axl.

Parameters:
theGlobalStorageInstance aXLang global storage instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ForStatement  theForStatement,
String  sIndent,
Object...  arrAdditional 
)

Converts for statement to axl.

Parameters:
theForStatement aXLang for statement
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( IfStatement  theIfStatement,
String  sIndent,
Object...  arrAdditional 
)

Converts if statement to axl.

Parameters:
theIfStatement aXLang if statement
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ComposedExpression  theComposedExpression,
String  sLeft,
String  sRight,
String  sSpace 
) [private]

Converts composed expression to axl.

Parameters:
theComposedExpression aXLang infix expression
sLeft left expression
sRight right expression
sSpace space between expressions and operator
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( PrefixExpression  thePrefixExpression,
String  sIndent,
Object...  arrAdditional 
)

Converts prefix expression to axl.

Parameters:
thePrefixExpression aXLang prefix expression
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( PostfixExpression  thePostfixExpression,
String  sIndent,
Object...  arrAdditional 
)

Converts postfix expression to axl.

Parameters:
thePostfixExpression aXLang postfix expression
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( InfixExpression  theInfixExpression,
String  sIndent,
Object...  arrAdditional 
)

Converts infix expression to axl.

Parameters:
theInfixExpression aXLang infix expression
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ReadPort  theReadPort,
String  sIndent,
Object...  arrAdditional 
)

Converts read port to axl.

Parameters:
theReadPort aXLang read port
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( BracketsExpression  theBracketsExpression,
String  sIndent,
Object...  arrAdditional 
)

Converts brackets expression to axl.

Parameters:
theBracketsExpression aXLang brackets expression
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( VariableExpression  theVariableExpression,
String  sIndent,
Object...  arrAdditional 
)

Converts variable expression to axl.

Parameters:
theVariableExpression aXLang variable expression
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( NullConstant  theNullConstant,
String  sIndent,
Object...  arrAdditional 
)

Converts null constant to axl.

Parameters:
theNullConstant aXLang null constant
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( IntegerConstant  theIntegerConstant,
String  sIndent,
Object...  arrAdditional 
)

Converts integer constant to axl.

Parameters:
theIntegerConstant aXLang integer constant
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( BooleanConstant  theBooleanConstant,
String  sIndent,
Object...  arrAdditional 
)

Converts boolean constant to axl.

Parameters:
theBooleanConstant aXLang boolean constant
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Assignment  theAssignment,
String  sIndent,
Object...  arrAdditional 
)

Converts assignment to axl.

Parameters:
theAssignment aXLang assignment
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( OperationCallExpression  axlElement,
String  sIndent,
Object...  arrAdditional 
)

Converts operation call expression to axl.

Parameters:
axlElement aXLang element
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ReturnStatement  theReturnStatement,
String  sIndent,
Object...  arrAdditional 
)

Converts return statement to axl.

Parameters:
theReturnStatement aXLang return statement
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( OperationCall  theOperationCall,
String  sIndent,
Object...  arrAdditional 
)

Converts operation call to axl.

Parameters:
theOperationCall aXLang operation call
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Block  theBlock,
String  sIndent,
Object...  arrAdditional 
)

Converts a block to axl.

Parameters:
theBlock aXLang block
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( SubComponent  theSubComponent,
String  sIndent,
Object...  arrAdditional 
)

Converts subcomponent to aXLang.

Parameters:
theSubComponent aXLang subcomponent
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( LocalFunctionInstance  theLocalFunctionInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts local function instance to aXLang.

Parameters:
theLocalFunctionInstance aXLang local function instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Behavior  theBehavior,
String  sIndent,
Object...  arrAdditional 
)

Converts behavior to aXLang.

Parameters:
theBehavior aXLang behavior
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( StorageRWAccess  theStorageRWAccess,
String  sIndent,
Object...  arrAdditional 
)

Converts storage rw access to aXLang.

Parameters:
theStorageRWAccess aXLang storage rw access
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( XORComponent  theXORComponent,
String  sIndent,
Object...  arrAdditional 
)

Converts xor component to aXLang.

Parameters:
theXORComponent aXLang xor component
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Component  theComponent,
String  sIndent,
Object...  arrAdditional 
)

Converts component to aXLang.

Parameters:
theComponent aXLang component
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Storage  axlStorage,
String  sIndent,
Object...  arrAdditional 
)

Converts storage to aXLang.

Parameters:
axlStorage aXLang storage
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( FunctionLink  theFunctionLink,
String  sIndent,
Object...  arrAdditional 
)

Converts a function link to aXLang.

Parameters:
theFunctionLink the function link
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( StorageLink  theStorageLink,
String  sIndent,
Object...  arrAdditional 
)

Converts a storage link to aXLang.

Parameters:
theStorageLink the storage link
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationUpDataLink  axlDataElementLink,
String  sIndent,
Object...  arrAdditional 
)
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( WhileStatement  theWhileStatement,
String  sIndent,
Object...  arrAdditional 
)

Converts while statement to axl.

Parameters:
theWhileStatement aXLang while statement
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ConnectionDataLink  axlDataElementLink,
String  sIndent,
Object...  arrAdditional 
)
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ApplicationModel  theApplicationModel,
String  sIndent,
Object...  arrAdditional 
)

Converts application model to aXLang.

Parameters:
theApplicationModel aXLang application model
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( BusDelegation  axlBusDelegation,
String  sIndent,
Object...  arrAdditional 
)
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( BusConnection  axlBusConnection,
String  sIndent,
Object...  arrAdditional 
)
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationUp  axlUpDelegation,
String  sIndent,
Object...  arrAdditional 
)

Converts an up delegation to aXLang.

Parameters:
axlUpDelegation aXLang up delegation
sIndent text indentation
Returns:
AXL representation
Author:
ekleinod
mgrosse
mmark
nschult
cknoppek
skaegebein
Version:
0.9.0
Since:
0.3
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationDown  axlDownDelegation,
String  sIndent,
Object...  arrAdditional 
)

Converts a down delegation to aXLang.

Parameters:
axlDownDelegation aXLang down delegation
sIndent text indentation
Returns:
AXL representation
Author:
ekleinod
mgrosse
mmark
nschult
cknoppek
skaegebein
Version:
0.9.0
Since:
0.3
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Connection  axlConnection,
String  sIndent,
Object...  arrAdditional 
)

Converts a horizontal connection to aXLang.

Parameters:
axlConnection aXLang connection
sIndent text indentation
Returns:
AXL representation
Author:
ekleinod
mgrosse
mmark
nschult
cknoppek
skaegebein
Version:
0.9.0
Since:
0.3
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AbstractConnection  axlConnection,
String  sIndent,
String  sourceSubComponentID,
String  sourcePortID,
String  targetSubComponentID,
String  targetPortID 
) [private]

Converts an abstract connection to aXLang (for horizontal connections, delegations down and up.

Parameters:
axlConnection the connection
sourceSubComponentID the identifier of the source subcomponent if it exists, else 'this'
sourcePortID the identifier of the source port
targetSubComponentID the identifier of the target subcomponent if it exists, else 'this'
targetPortID the identifier of the target port
sIndent indentation
Returns:
the aXLang representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Model  theModel,
String  sIndent,
Object...  arrAdditional 
)

Converts model to aXLang.

Parameters:
theModel aXLang model
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Port  thePort,
String  sIndent,
Object...  arrAdditional 
)

Converts port to aXLang.

Parameters:
thePort aXLang port
sIndent text indentation
Returns:
AXL representation
Author:
ekleinod
mgrosse
mmark
nschult
cknoppek
skaegebein
Version:
0.9.0
Since:
0.3
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( F2RMapping  theF2RMapping,
String  sIndent,
Object...  arrAdditional 
)

Converts feature to application mapping to axl.

Parameters:
theF2AMapping aXLang feature to application mapping
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Function  theFunction,
String  sIndent,
Object...  arrAdditional 
)

Converts function to aXLang.

Parameters:
theFunction aXLang function
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( CardinalityAssignment  theCardinalityAssignment,
String  sIndent,
Object...  arrAdditional 
)

Converts cardinality assignment to axl.

Parameters:
theCardinalityAssignment aXLang cardinality assignment
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationDownDataLink  axlDataElementLink,
String  sIndent,
Object...  arrAdditional 
)
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( OperationInstance  theGlobalOperationInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global operation instance to axl.

Parameters:
theGlobalOperationInstance aXLang global operation instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Configuration  theConfiguration,
String  sIndent,
Object...  arrAdditional 
)

Converts configuration to axl.

Parameters:
theConfiguration aXLang configuration
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( Feature  theFeature,
String  sIndent,
Object...  arrAdditional 
)

Converts feature to aXLang.

Parameters:
theFeature aXLang feature
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( FeatureModel  theFeatureModel,
String  sIndent,
Object...  arrAdditional 
)

Converts feature model to aXLang.

Parameters:
theFeatureModel aXLang feature model
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AXLangAttribute  axlAttribute,
String  sIndent,
Object...  arrAdditional 
)

Converts attribute to aXLang.

Parameters:
axlElement aXLang element
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( AspectComposition  theAspectComposition,
String  sIndent,
Object...  arrAdditional 
)

Converts aspect composition to axl.

Parameters:
theAspectComposition aXLang aspect composition
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( ResourceModel  theResourceModel,
String  sIndent,
Object...  arrAdditional 
)

Converts application model to aXLang.

Parameters:
theApplicationModel aXLang application model
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( SignalInstance  theGlobalSignalInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global signal instance to axl.

Parameters:
theGlobalSignalInstance aXLang global signal instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( FunctionInstance  theGlobalFunctionInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global function instance to axl.

Parameters:
theGlobalFunctionInstance aXLang global function instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXL ( DelegationDownInstance  theGlobalDelegationInstance,
String  sIndent,
Object...  arrAdditional 
)

Converts global delegation instance to axl.

Parameters:
theGlobalDelegationInstance aXLang global delegation instance
sIndent text indentation
Returns:
AXL representation
String de.fraunhofer.isst.axbench.operations.AXLWriter.toAXLOrInclude ( IAXLangElement  axlElement,
String  sIndent,
Object...  arrAdditional 
)

Returns aXLang representation valid for every element.

  • checks if file is included
    • yes -> return include String
    • no
      • print description
      • return aXLang representation
Parameters:
axlElement aXLang element
sIndent text indentation
Returns:
AXL representation
boolean de.fraunhofer.isst.axbench.operations.AXLWriter.writeFile ( String  theFilename,
IAXLangElement  theElement 
)

Writes the given file and returns success/failure.

This method is a convenience method for using the AXLWriter.

Usage (create object in order to access the generated messages):

AXLWriter theWriter = new AXLWriter();
boolean isSuccess = theWriter.writeFile("xyz.axl");
theWriter.getAXLMessages(MessageType.ERROR);

Usage (no access to the generated messages):

boolean isSuccess = new AXLWriter().writeFile("xyz.axl");
if (isSuccess) {
	...
}
Parameters:
theFilename filename
theElement element to write
Returns:
success
Return values:
true successfully written
false failure during write

Member Data Documentation

final String de.fraunhofer.isst.axbench.operations.AXLWriter.FORMAT_BLOCK = "{0}{1} '{'\n{2}{0}'}'\n" [static, private]

block formatting

final String de.fraunhofer.isst.axbench.operations.AXLWriter.FORMAT_LINE = "{0}{1};\n" [static, private]

line formatting

identifier of the input element

identifier of the output file

final String de.fraunhofer.isst.axbench.operations.AXLWriter.INDENT = "\t" [static, private]

indentation for pretty formatting

final String de.fraunhofer.isst.axbench.operations.AXLWriter.PARAM_FOR_ID_CHECK = "wholefilescontent" [static]
final String de.fraunhofer.isst.axbench.operations.AXLWriter.PARAM_OUT_WRITER = "stringbuildercontent" [static]

identifier of the output content

separator symbol for the syntactic representation of element paths

if the outputfile is another than the inputfile (model) , the oldmodelfilename has to be saved