|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.uml14.UMLDefaultHelper
org.andromda.core.uml14.UMLStaticHelper
org.andromda.core.simpleuml.SimpleOOHelper
com.finalist.mmbase.uml.MMBaseHelper
public class MMBaseHelper
Helper class to get access to the UML model.
| Field Summary |
|---|
| Fields inherited from class org.andromda.core.uml14.UMLDefaultHelper |
|---|
model, typeMappings |
| Constructor Summary | |
|---|---|
MMBaseHelper()
|
|
| Method Summary | |
|---|---|
boolean |
checkModelElementVisibility(java.lang.Object modelElement,
java.lang.String visibility)
Function to test visibility on a ModelElement. |
java.util.Collection |
getAllAttributes(java.lang.Object object)
Get a list of all attributes in the class and interface. |
java.util.Collection |
getAllAttributes(java.lang.Object object,
java.lang.String clazz,
java.lang.String interfazes,
java.lang.String generalizations,
java.lang.String visibilitiy)
Returns a Collection of MMBaseInterfaceVO with all attributes related to a class: Class attributes, Interface attributes.. |
java.util.Collection |
getAllGeneralizations(java.lang.Object object,
int level)
Get a list of all Classifier objects (superclasses) for a given Classifier object. |
java.util.Collection |
getAllRelationAttributes(java.lang.String relationName,
java.lang.String clazz,
java.lang.String interfazes,
java.lang.String generalizations,
java.lang.String visibilitiy)
|
MMBaseAssociationHelper |
getAssociationHelper()
Give access to the association helper. |
java.lang.String |
getAttributeDocumentation(java.lang.Object object)
Get documentation set on an attribute. |
java.lang.String |
getAttributeName(java.lang.Object object)
Get the name of an attribute |
boolean |
getAttributeRequired(java.lang.Object object)
Get the type of an attribute. |
boolean |
getAttributeStereoType(java.lang.Object object)
Get if attribute is required |
java.lang.String |
getAttributeType(java.lang.Object object)
Get the type of an attribute. |
static java.util.Collection |
getBasicBuilders()
Get a list with the names of the basic builders needed by MMBase. |
static java.util.Collection |
getBasicRelationBuilders()
Get a list with the names of the basic relation builders needed by MMBase. |
java.util.Collection |
getClassAttributes(java.lang.Object object,
java.lang.String visibilitiy)
Returns a Collection of MMBaseInterfaceVO with all attributes of the specified class |
java.lang.String |
getClassSubTitle(java.lang.Object object)
Returns the tagged value of title on a class |
java.lang.String |
getClassTitle(java.lang.Object object)
Returns the tagged value of title on a class in XML format |
static java.lang.String |
getDate()
Get the current date. |
java.lang.String |
getDependencyName(java.lang.Object object)
Returns the name of a dependency element |
java.lang.String |
getDependencyStereoType(java.lang.Object modelElement)
Determine the stereotype that is set on a dependency. |
MMBaseDocumentationHelper |
getDocumentationHelper()
Give acces to the Documentation helper |
java.util.Collection |
getGeneralizationAttributes(java.lang.Object object,
java.lang.String visibilitiy)
Returns a Collection of MMBaseInterfaceVO with all attributes of the interfaces the class implements This has to be implemented. |
java.lang.String |
getGeneralizationName(java.lang.Object object)
Returns the name of the super class |
java.util.Collection |
getInterfaceAttributes(java.lang.Object object,
java.lang.String visibilitiy)
Returns a Collection of MMBaseInterfaceVO with all attributes of the interfaces the class implements problem: unexpected class cast exceptions on certain relation classes... |
java.lang.String |
getIsPosrelSpecialization(java.lang.String relationName)
Function to determin if relation is a specialization of posrel |
java.lang.String |
getJavaDoc(java.lang.Object value)
Get the javadoc from a model element and strip all paragraphs. |
static java.lang.String |
getMMBaseDatabaseSize(java.lang.String type)
Map the type on a database size. |
static java.lang.String |
getMMBaseDatabaseType(java.lang.String type)
Map a type to a MMBase Database type. |
static java.lang.String |
getMMBaseGuiSize(java.lang.String type)
Map the type on a database size. |
static java.lang.String |
getMMBaseGuiType(java.lang.String type)
Map the type to a GUI type |
static java.lang.String |
getNormalizedMMBaseType(java.lang.String type)
Return the type in lowercase and remove any package names. |
java.lang.String |
getOperationType(java.lang.Object object)
Returns the name of a model element fully qualified by the name of the package that contains it. |
java.util.Collection |
getOptions(java.lang.Object o)
|
java.util.HashMap |
getProfile()
Give access to the UML Profile constants |
MMBaseRelationHelper |
getRelationHelper()
Give access to the relation helper. |
java.util.Collection |
getSortedModelClassifiers()
Same as getModelElements, but now the model elements are sorted by name. |
java.util.Collection |
getSortedRelationElements()
Get all model elements with the Relation stereotype. |
java.util.Collection |
getStereotypeNames(java.lang.Object modelElement)
This method is needed to trigger code generation for the whole model, since nog stereotype is set on the model itself. |
java.lang.String |
getVersion(java.lang.Object object)
Funcrion to obtain the varsion for a builder class. |
protected boolean |
isOptionList(java.lang.String name)
Checks if the ModelElement with the specified name is indeed an OptionList * |
boolean |
isPackage(java.lang.Object modelElement)
Checks if the ModelElement is a UML Package. |
boolean |
isSystemAttribute(java.lang.Object attribute)
Function to test the 'system' flaf on an MMBaseAttributeVo instance. |
static java.lang.String |
javaDocToText(java.lang.Object value)
Convert javadoc text to plaint text. |
static java.util.Collection |
sortValuesByKeys(java.util.HashMap map)
Sort a HashMap based on it's keys and return a Collection with the values |
static java.lang.String |
toClassName(java.lang.String packageName,
java.lang.String className)
Determine the fully qualified class name. |
static java.lang.String |
toLowerCase(java.lang.String arg)
Convert to Lowercase |
static java.lang.String |
toUpperCase(java.lang.String arg)
Convert to Uppercase |
| Methods inherited from class org.andromda.core.simpleuml.SimpleOOHelper |
|---|
convertToType, findAttributeJDBCType, findAttributeSQLFieldLength, findAttributeSQLType, findClassById, findFullyQualifiedName, findPackageName, formatHTMLStringAsParagraphs, getAssociationData, getAttributesAsList, getComponentInterfaceName, getEjbRefViewType, getHomeInterfaceName, getModel, getModelElements, getOperationCall, getOperationParameterNames, getOperationSignature, getOperationTypedParameterList, getPrimaryKeyAttribute, getStereotype |
| Methods inherited from class org.andromda.core.uml14.UMLStaticHelper |
|---|
findTagValue, findTagValue, findTagValue, getAbstractions, getAssociationEnds, getAttributes, getDependencies, getFullyQualifiedName, getGeneralization, getOperations, getTaggedValues |
| Methods inherited from class org.andromda.core.uml14.UMLDefaultHelper |
|---|
getName, getPackageName, setModel, setTypeMappings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.andromda.core.common.ScriptHelper |
|---|
getName, getPackageName, setModel, setTypeMappings |
| Constructor Detail |
|---|
public MMBaseHelper()
| Method Detail |
|---|
public MMBaseAssociationHelper getAssociationHelper()
public MMBaseRelationHelper getRelationHelper()
public java.util.HashMap getProfile()
public MMBaseDocumentationHelper getDocumentationHelper()
public java.util.Collection getStereotypeNames(java.lang.Object modelElement)
getStereotypeNames in interface org.andromda.core.common.ScriptHelpergetStereotypeNames in class org.andromda.core.uml14.UMLDefaultHelpermodelElement - the model element
ScriptHelper.getStereotypeNames(java.lang.Object)public java.lang.String getDependencyStereoType(java.lang.Object modelElement)
modelElement - the model element
public java.lang.String getDependencyName(java.lang.Object object)
object - model element
public static final java.lang.String getDate()
public static final java.lang.String toLowerCase(java.lang.String arg)
arg - the argument
public static final java.lang.String toUpperCase(java.lang.String arg)
arg - the argument
public static final java.lang.String toClassName(java.lang.String packageName,
java.lang.String className)
packageName - package nameclassName - class name
public java.lang.String getOperationType(java.lang.Object object)
object - model element
public java.util.Collection getClassAttributes(java.lang.Object object,
java.lang.String visibilitiy)
object - model elementvisibilitiy - the visibility
public java.util.Collection getAllGeneralizations(java.lang.Object object,
int level)
object - Classifierlevel - Restrict the recursion level.
public java.lang.String getGeneralizationName(java.lang.Object object)
object - model element
public java.util.Collection getGeneralizationAttributes(java.lang.Object object,
java.lang.String visibilitiy)
object - model elementvisibilitiy - the visibility
public java.util.Collection getInterfaceAttributes(java.lang.Object object,
java.lang.String visibilitiy)
object - model elementvisibilitiy - the visibility
public java.util.Collection getAllAttributes(java.lang.Object object,
java.lang.String clazz,
java.lang.String interfazes,
java.lang.String generalizations,
java.lang.String visibilitiy)
object - model elementclazz - should the attributes of the class itself also be included? Default is true.interfazes - should the attributes of the interface also be included? Default is false.generalizations - should the attributes of super classes also be included? The default is true.visibilitiy - specify the visiblity of the attributes that should be collected. If null,
all attributes are returned. Other valueas are: public, private and protected.
public java.util.Collection getAllAttributes(java.lang.Object object)
object - the object
public java.util.Collection getAllRelationAttributes(java.lang.String relationName,
java.lang.String clazz,
java.lang.String interfazes,
java.lang.String generalizations,
java.lang.String visibilitiy)
relationName - Name of the relation for which all attributes should be returned.clazz - do we want the class attributes? true or false.interfazes - do we want the interface attributes? true or false.generalizations - do we want the generatlization attributes? true or false.visibilitiy - threshold for the visibility. private will get all attributes.
public java.util.Collection getSortedModelClassifiers()
public java.util.Collection getSortedRelationElements()
public java.lang.String getAttributeName(java.lang.Object object)
object - the object
public java.lang.String getAttributeType(java.lang.Object object)
object - the object
public boolean getAttributeRequired(java.lang.Object object)
object - the object
public boolean getAttributeStereoType(java.lang.Object object)
object - the object
public java.lang.String getAttributeDocumentation(java.lang.Object object)
object - the object
public java.lang.String getJavaDoc(java.lang.Object value)
value - UML Model element
public static final java.lang.String javaDocToText(java.lang.Object value)
value - object with HTML formatting. Can be a String or a Tagged value.
public static java.lang.String getNormalizedMMBaseType(java.lang.String type)
type - the type
public static java.lang.String getMMBaseDatabaseType(java.lang.String type)
type - the type
public static java.lang.String getMMBaseGuiType(java.lang.String type)
type - the type
public static final java.lang.String getMMBaseDatabaseSize(java.lang.String type)
type - the type
public static final java.lang.String getMMBaseGuiSize(java.lang.String type)
type - the type
public boolean isPackage(java.lang.Object modelElement)
modelElement - The name of the ModelElement.
protected boolean isOptionList(java.lang.String name)
name - The name of the ModelElement.
public java.util.Collection getOptions(java.lang.Object o)
o - UMLModelElement object with the stereotype "OptionList"
containing information about the list.
public static java.util.Collection sortValuesByKeys(java.util.HashMap map)
map - Hashamp with String object pairs that has to be sorted.
public static java.util.Collection getBasicRelationBuilders()
public static java.util.Collection getBasicBuilders()
public java.lang.String getClassTitle(java.lang.Object object)
object - model element
public java.lang.String getClassSubTitle(java.lang.Object object)
object - model element
public boolean isSystemAttribute(java.lang.Object attribute)
attribute - must be instance of MMBaseAttributeVo
public boolean checkModelElementVisibility(java.lang.Object modelElement,
java.lang.String visibility)
modelElement - is the object to be checkedvisibility - is the level of visibility it can be checked on
[private|protected|package|public]
public java.lang.String getVersion(java.lang.Object object)
object - is a ModelElement that will be tested for the tagged value
public java.lang.String getIsPosrelSpecialization(java.lang.String relationName)
relationName - the name of a relation type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||