Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.uml.generator

Class PreparedModelElement


public class PreparedModelElement

This class contains the prepared information for a model element. The information can directly be used in the code generation.
See also:
com.gentleware.poseidon.generator.PreparedElement
com.gentleware.poseidon.generator.ElementPreparator
ModelElementPreparator


 Attribute Summary
public static ConfigurationKey  KEY_TYPE_UNORDERED_MULTI
A general setting for the generation. 
public static ConfigurationKey  KEY_TYPE_ORDERED_MULTI
A general setting for the generation. 
public static ConfigurationKey  KEY_TYPE_SORTED_MULTI
A general setting for the generation. 
protected static String  DOCUMENTATION_TAG_NAME
 
arrow_up
 

 Constructor Summary
public   PreparedModelElement()
Creates a new instance of this type. 
arrow_up
 

 Method Summary
public String   check()
Does a test on the validity of the element. 
protected String   checkName()
Does . 
public String   checkVisibility()
Does nothing. 
public String   getDocs()
Get the comments of a ModelElement. 
public String   getNameOfElementAsString(Object element )
Returns a string with the element's name, ready for insertion into generated code. 
public List   getNamespaceList(boolean includeModel , boolean includeSelf )
Returns a list of all the namespaces needed to navigate from the top-level element down to the related model element. 
public String   getNamespaceListAsString(boolean includeModel , boolean includeSelf , String delimiter )
Returns a string reflecting the names of all the namespaces needed to navigate from the top-level element down to the related model element. 
public static List   getParentNamespaces( ModelElement element )
Returns a list of all namespaces beginning with the namespace of the related model element up to the top-most namespace of the model. 
public String   getParsedDocs()
Get the comments of a ModelElement as HTML-enriched string. 
public String   getPath(boolean includeModel , boolean includeSelf , String fileSeparator )
Builds and returns the file system path to a file representing the element related to this prepared element. 
public String   getPathAsString(boolean includeModel , boolean includeSelf )
Builds and returns the file system path to a file representing the element related to this prepared element. 
public String   getPlainDocs()
Get the comments of a ModelElement as plain string with stripped asteriks. 
public PreparedElement   getPreparedParent()
Returns the Prepared element of the object's name space. 
public String   getRelativePathToModel(boolean includeModel , boolean includeSelf , String fileSeparator )
Returns the string reflecting the path from the top-level model to the related model element. 
public String   getTaggedValue(String name )
Returns the tagged value with the given key as a string. 
public String   getVisibilityAsString()
Returns a string reflecting the visibility of the related model element. 
public void   init(Object element , ElementPreparator preparator )
Initializes this instance. 
public List   parseNamespace(String namespaceName )
Returns a list of namespace names contained in the given namespace name. 
arrow_up
 

 

 Attribute Detail

KEY_TYPE_UNORDERED_MULTI

public static ConfigurationKey KEY_TYPE_UNORDERED_MULTI

A general setting for the generation. 
arrow_up
 
 

KEY_TYPE_ORDERED_MULTI

public static ConfigurationKey KEY_TYPE_ORDERED_MULTI

A general setting for the generation. 
arrow_up
 
 

KEY_TYPE_SORTED_MULTI

public static ConfigurationKey KEY_TYPE_SORTED_MULTI

A general setting for the generation. 
arrow_up
 
 

DOCUMENTATION_TAG_NAME

protected static String DOCUMENTATION_TAG_NAME

 
arrow_up
 

 Constructor Detail

PreparedModelElement

public PreparedModelElement PreparedModelElement()

Creates a new instance of this type. 
arrow_up
 

 Method Detail

check

public String check()

Does a test on the validity of the element. The test for name and visibility are called subsequently.
Returns:
Concatenation of messages occuring while testing this prepared element.
 
arrow_up
 
 

checkName

protected String checkName()

Does ...
Returns:
A String with ...
 
arrow_up
 
 

checkVisibility

public String checkVisibility()

Does nothing. We allow null visibility.
Returns:
A String of size 0.
 
arrow_up
 
 

getDocs

public String getDocs()

Get the comments of a ModelElement. If the objects have no sensible type or no comment, default comments are returned.
Returns:
Comment of the element.
 
arrow_up
 
 

getNameOfElementAsString

public String getNameOfElementAsString(Object element )

Returns a string with the element's name, ready for insertion into generated code.
Parameters:
element - The element that is to be printed into the code.
Returns:
The insertion-ready name of the element.
 
arrow_up
 
 

getNamespaceList

public List getNamespaceList(boolean includeModel , boolean includeSelf )

Returns a list of all the namespaces needed to navigate from the top-level element down to the related model element.
Parameters:
includeModel - Declares whether the top-level model should be included.
includeSelf - Declares whether the element itself should be included.
Returns:
A List of namespace names.
 
arrow_up
 
 

getNamespaceListAsString

public String getNamespaceListAsString(boolean includeModel , boolean includeSelf , String delimiter )

Returns a string reflecting the names of all the namespaces needed to navigate from the top-level element down to the related model element. The namespace names are separated by the given delimiter.
Parameters:
includeModel - Declares whether the top-level model should be included.
includeSelf - Declares whether the element itself should be included.
delimiter - String to be used for separating the namespace names.
Returns:
A string containing all namespace names separated by the given delimiter.
 
arrow_up
 
 

getParentNamespaces

public static List getParentNamespaces( ModelElement element )

Returns a list of all namespaces beginning with the namespace of the related model element up to the top-most namespace of the model.
Parameters:
element - The model element, this list should be created for.
Returns:
A List of all namespaces from the related model element to the top-level model.
 
arrow_up
 
 

getParsedDocs

public String getParsedDocs()

Get the comments of a ModelElement as HTML-enriched string. If the objects have no sensible type or no comment, default comments are returned.
Returns:
Comment of the element enriched with HTML tags.
 
arrow_up
 
 

getPath

public String getPath(boolean includeModel , boolean includeSelf , String fileSeparator )

Builds and returns the file system path to a file representing the element related to this prepared element. The resulting string gives a file system compatible representation of the namespace structure.
Parameters:
includeModel - Should the name of the model itself be part of this path.
includeSelf - Should the name of the element itself be part of this path.
fileSeparator - The string that should be used as separator for this path.
Returns:
The complete path to the file.
 
arrow_up
 
 

getPathAsString

public String getPathAsString(boolean includeModel , boolean includeSelf )

Builds and returns the file system path to a file representing the element related to this prepared element. The os-dependent default setting for the file separator is used. The resulting string gives a file system compatible representation of the namespace structure.
Parameters:
includeModel - Should the name of the model itself be part of this path.
includeSelf - Should the name of the element itself be part of this path.
Returns:
The complete path to the file.
 
arrow_up
 
 

getPlainDocs

public String getPlainDocs()

Get the comments of a ModelElement as plain string with stripped asteriks.
Returns:
Comment of the element with removed asteriks
 
arrow_up
 
 

getPreparedParent

public PreparedElement getPreparedParent()

Returns the Prepared element of the object's name space.
Returns:
Null or the Prep element of the owning namespace.
 
arrow_up
 
 

getRelativePathToModel

public String getRelativePathToModel(boolean includeModel , boolean includeSelf , String fileSeparator )

Returns the string reflecting the path from the top-level model to the related model element.
Parameters:
includeModel - Declares whether the top-level model should be part of the path.
includeSelf - Declared whether the model element itself should be part of the path.
fileSeparator - The string used to separate the namespace names.
Returns:
The path from the model to the related model element.
 
arrow_up
 
 

getTaggedValue

public String getTaggedValue(String name )

Returns the tagged value with the given key as a string.
Parameters:
name - The key of the tagged value.
Returns:
The string representation of the tagged value.
 
arrow_up
 
 

getVisibilityAsString

public String getVisibilityAsString()

Returns a string reflecting the visibility of the related model element.
Returns:
A String with the java visibility plus a space, or an empty string.
 
arrow_up
 
 

init

public void init(Object element , ElementPreparator preparator )

Initializes this instance. It will be related to the given object and handled by the given preparator. The information of the given object will be prepared here.
Parameters:
element - The object this instance should be related to.
preparator - The preparator handling this instance.
 
arrow_up
 
 

parseNamespace

public List parseNamespace(String namespaceName )

Returns a list of namespace names contained in the given namespace name. Anamespace name can contain a number of subnames, that should be reflected as individual namespaces in the ode generation (e.g. "com.gentleware" should be treated as "com" and "gentleware" in order to get the file paths right).
Parameters:
namespaceName - The namespace name that should be parsed for subnames.
Returns:
A List of namespace names.
 
arrow_up
 

Created  2003 - 3 - 4

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2001 Gentleware AG, Vogt-Kölln-Str.30, 22527 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.