@OpenApiAll
public class ElementHelper
extends java.lang.Object
Constructor and Description |
---|
ElementHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsStereotype(Element element,
java.lang.String stereotypeName)
Returns true if element contains a stereotype for the specified stereotype name.
|
static java.lang.String |
getElementType(BaseElement element)
Return type of element in all lower case format.
|
static java.lang.String |
getMetaClassName(Element element)
Return meta class name.
|
static java.lang.String |
getPathVariable(java.lang.String name)
It is used for getting path variable by using variable name.
|
static java.lang.Object |
getProperty(Element element,
java.lang.String propertyName)
Get the property for custom tags that are not included in Open API.
|
static java.lang.String |
getSortKey(BaseElement input)
It is use for getting SortKey.
|
static boolean |
hasProperty(Element element,
java.lang.String propertyName)
Returns true when a property with a given name is specified on this element, false otherwise.
|
static java.lang.String |
resolveFileNameVariable(java.lang.String content,
com.nomagic.magicdraw.magicreport.ui.bean.ReportBean reportBean)
Used for resolving the variable in output report file name in to value.
|
static java.lang.String |
resolvePathVariable(java.lang.String content)
It is used for resolving the path variable into the real path.
|
public static java.lang.String getSortKey(BaseElement input)
input
- BaseElement.public static java.lang.String getPathVariable(java.lang.String name)
name
- that variable namepublic static java.lang.String resolvePathVariable(java.lang.String content)
content
- the content that includes the path variablepublic static java.lang.String resolveFileNameVariable(java.lang.String content, com.nomagic.magicdraw.magicreport.ui.bean.ReportBean reportBean)
content
- the content that includes the variable.reportBean
- reportBean objectpublic static boolean hasProperty(Element element, java.lang.String propertyName)
element
- element to testpropertyName
- property namepublic static java.lang.Object getProperty(Element element, java.lang.String propertyName) throws com.nomagic.magicdraw.magicreport.helper.PropertyNotFoundException
element
- the object that will be gotten that data.propertyName
- the field of the element.PropertyNotFoundException
- when a request property name is not found on target element.public static java.lang.String getMetaClassName(Element element)
element
- elementpublic static java.lang.String getElementType(BaseElement element)
element
- MagicDraw base elementpublic static boolean containsStereotype(Element element, java.lang.String stereotypeName)
element
- element to teststereotypeName
- stereotype name to be tested