public class PrintApplicationModel extends AbstractImplementation implements ExecutableIF
Argument Keyword | Datatype | Default | Description |
---|---|---|---|
Filename | String | none | The name of the file to be written. If not specified the implementation will dump the model to stdout. |
TargetRef | String | target | The reference name to the session. |
SessionFormat | String | Model: %s\n | The format for the session header information used by the method java.io.PrintStream.printf(); |
HeaderFormat | String | as you can see | The format for the element header information used by the method java.io.PrintStream.printf(); |
AttributeFormat | String | %-30s [%30s](%4s) %1s%1s%1s %s\n | The format for the attribute line used by the method java.io.PrintStream.printf(); |
RelationFormat | String | %s %-26s [%30s]( %s) %s %s\n | The format for the relation line used by the method java.io.PrintStream.printf(); |
Modifier and Type | Class and Description |
---|---|
protected class |
PrintApplicationModel.Element |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
attributeFormat |
protected java.lang.String |
filename |
protected java.lang.String |
headerFormat |
protected java.io.PrintStream |
printer |
protected java.lang.String |
relationFormat |
protected java.lang.String |
sessionFormat |
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
PrintApplicationModel() |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute the implementation.
|
protected void |
getElements(java.util.Map<java.lang.String,PrintApplicationModel.Element> map,
ApplicationElement aeObj,
java.lang.String path)
Get child elements.
|
java.lang.String |
getPath(ApplicationElement ae) |
protected AoSession |
getSession()
Get the session.
|
void |
init()
Initialize the implementation.
|
protected void |
printAttribute(ApplicationAttribute attr)
Print an application attribute.
|
protected void |
printElement(PrintApplicationModel.Element elem)
Print an application element.
|
protected void |
printRelation(ApplicationRelation rel)
Print an application relation.
|
void |
terminate()
Terminate the implementation.
|
protected static java.lang.String |
toString(Relationship in) |
protected static java.lang.String |
toString(RelationType in) |
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext, setDescriptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getDescriptor, setArguments, setContext, setDescriptor
protected java.lang.String attributeFormat
protected java.lang.String relationFormat
protected java.lang.String headerFormat
protected java.lang.String sessionFormat
protected java.lang.String filename
protected java.io.PrintStream printer
public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractImplementation
InitializationFailedException
- if the initialization fails.public void execute() throws ExecutableException
execute
in interface ExecutableIF
ExecutableException
- if execution fails.public void terminate() throws TerminationException
terminate
in interface ExecutableIF
TerminationException
- if termination fails.protected AoSession getSession()
protected void getElements(java.util.Map<java.lang.String,PrintApplicationModel.Element> map, ApplicationElement aeObj, java.lang.String path) throws AoException
map
- the map to collection the elements.AoException
protected void printElement(PrintApplicationModel.Element elem) throws AoException
printer
- the print streamaeObj
- the applicaiton element.AoException
protected void printAttribute(ApplicationAttribute attr) throws AoException
printer
- the print streamaeObj
- the application element.AoException
protected void printRelation(ApplicationRelation rel) throws AoException
printer
- the print streamaeObj
- the application relation.AoException
public java.lang.String getPath(ApplicationElement ae) throws AoException
AoException
protected static java.lang.String toString(Relationship in)
protected static java.lang.String toString(RelationType in)