Class ElementHelper
java.lang.Object
com.nomagic.magicdraw.magicreport.helper.ElementHelper
This class provides the function to help the report in order to handle elements.
- Since:
- June 26, 2007
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsStereotype
(Element element, String stereotypeName) Returns true if element contains a stereotype for the specified stereotype name.static String
getElementType
(BaseElement element) Return type of element in all lower case format.static String
getMetaClassName
(Element element) Return meta class name.static String
getPathVariable
(String name) It is used for getting path variable by using variable name.static Object
getProperty
(Element element, String propertyName) Get the property for custom tags that are not included in Open API.static String
getSortKey
(BaseElement input) It is use for getting SortKey.static boolean
hasProperty
(Element element, String propertyName) Returns true when a property with a given name is specified on this element, false otherwise.static String
resolveFileNameVariable
(String content, com.nomagic.magicdraw.magicreport.ui.bean.ReportBean reportBean) Used for resolving the variable in output report file name in to value.static String
resolvePathVariable
(String content) It is used for resolving the path variable into the real path.
-
Constructor Details
-
ElementHelper
public ElementHelper()
-
-
Method Details
-
getSortKey
It is use for getting SortKey.- Parameters:
input
- BaseElement.- Returns:
- string
-
getPathVariable
It is used for getting path variable by using variable name.- Parameters:
name
- that variable name- Returns:
- the path
-
resolvePathVariable
It is used for resolving the path variable into the real path.- Parameters:
content
- the content that includes the path variable- Returns:
- the content that are resolved into the real path.
-
resolveFileNameVariable
public static String resolveFileNameVariable(String content, com.nomagic.magicdraw.magicreport.ui.bean.ReportBean reportBean) Used for resolving the variable in output report file name in to value.- Parameters:
content
- the content that includes the variable.reportBean
- reportBean object- Returns:
- the content that are resolved into real value.
-
hasProperty
Returns true when a property with a given name is specified on this element, false otherwise.- Parameters:
element
- element to testpropertyName
- property name- Returns:
- true when a property with a given name is specified on this element, false otherwise.
-
getProperty
public static Object getProperty(Element element, String propertyName) throws com.nomagic.magicdraw.magicreport.helper.PropertyNotFoundException Get the property for custom tags that are not included in Open API.- Parameters:
element
- the object that will be gotten that data.propertyName
- the field of the element.- Returns:
- the data of that field in the element.
- Throws:
com.nomagic.magicdraw.magicreport.helper.PropertyNotFoundException
- when a request property name is not found on target element.
-
getMetaClassName
Return meta class name.- Parameters:
element
- element- Returns:
- meta class name
-
getElementType
Return type of element in all lower case format.- Parameters:
element
- MagicDraw base element- Returns:
- element type
-
containsStereotype
Returns true if element contains a stereotype for the specified stereotype name.- Parameters:
element
- element to teststereotypeName
- stereotype name to be tested- Returns:
- true if element contains a stereotype for the specified stereotype name.
-