Class ReportHelper
- All Implemented Interfaces:
com.nomagic.magicreport.engine.ITool
,com.nomagic.magicreport.IVariable
,Serializable
,Cloneable
$report
For example:
<code> #foreach ($rel in $report.getRelationships($package)) $rel.name #end </code>
- Since:
- Jun 13, 2007e
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.nomagic.magicreport.engine.ITool
com.nomagic.magicreport.engine.ITool.HTMLString, com.nomagic.magicreport.engine.ITool.RetainedString, com.nomagic.magicreport.engine.ITool.Void
-
Field Summary
Fields inherited from class com.nomagic.magicreport.engine.Tool
context, properties
Fields inherited from interface com.nomagic.magicreport.engine.ITool
VOID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncollectRelationships
(Element element) Gets direct relationships of specified element.collectRelationships
(Element element, boolean includeIndirect) Gets relationships of specified element.collectRelationships
(Element element, boolean includeIndirect, boolean isRecursive) Gets relationships of specified element.boolean
containsStereotype
(Element element, String stereotypeName) Returns true if element contains a stereotype (include all derived stereotype) for the specified stereotype name.boolean
containsStereotype
(Element element, String stereotypeName, boolean includeDerived) Returns true if element contains a stereotype for the specified stereotype name.createValueSpecificationText
(ValueSpecification specification) Create text represents the ValueSpecification element.void
ensureLoad
(Diagram diagram) filter
(Collection<Element> elementList, String propertyName, Collection<?> propertyValue) Return the collection from the element list filtered by specified property name.filterClassName
(Collection<BaseElement> elementList, Collection<String> shortNameForClassTypes) Return the collection from the element list filtered by short name for class types.filterDiagram
(Collection<Diagram> diagramList, Collection<String> digramTypes) Return the collection from the diagram list filtered by types.filterElement
(Collection<BaseElement> elementList, Collection<String> humanTypes) Return the collection from the element list filtered by human types.filterElementByElementFilters
(List<Element> elements, List<com.nomagic.magicdraw.ui.ElementFilter> elementFilters) filterElementByStereotypeName
(Collection<BaseElement> elementList, Collection<String> stereotypesNames) Return the collection from the element list filtered by stereotype.filterElementType
(Collection<BaseElement> elementList, Collection<String> elementTypes) Return the collection from the element list filtered by element types.filterVisibleElement
(List<Element> elements) filterVisibleElement
(List<Element> elements, boolean includeAuxiliaryResources) findDiagramByName
(String elementName) findElementByName
(Collection<Element> source, String regex) Search and return the elements from name by regular expression.findElementInCollection
(Collection<? extends Element> col, String elementName) Search and return the element in the collection by element name.findRelationship
(Package modelPackage) Search and return a collection of relationship element inside package.findRelationship
(Package modelPackage, boolean recursive) Search and return a collection of relationship element inside package.getActorNumber
(Element element) Return the actor ID of Actor.getAllCustomizationsByElement
(Element element) Get all customizations from specific element.getAllCustomizationsByElement
(Element element, Object aStereotype) Get all customizations from specific stereotype on element.getAllCustomizationsByTarget
(Object targetElement) Get all customizations from specific target element of customization element.getAlternativeFlows
(UseCase useCase) Find and return all alternative flows from given use case.getAppliedStereotypeByName
(Element element, String stereotypeName) Returns stereotype assigned to element.getAppliedStereotypeByString
(Element element, String stereotype) Deprecated.getAttachedFile
(Element element) Get file from attached file.getAttachedImage
(Element element) getAttachedImage
(Element element, String cannotRenderImageMsg) Get image from attached image.getBaseClassAssociations
(Classifier classifier) Gets the classifier associations.static List<Classifier>
getBaseClassifiers
(Classifier classifier) Return classifier based elements.getBaseClassInheritableAttributes
(Classifier classifier) Gets the classifier inheritable attributes.getBaseClassInheritableOperations
(Classifier classifier) Gets the classifier inheritable operations.getBaseClassPorts
(Classifier classifier) Gets the classifier port.getBaseRealizedInterfaces
(BehavioredClassifier behavioredClassifier) Gets the behavior classifier realized interfaces.getBaseRelations
(Classifier classifier) Gets the classifier relations.getBasicFlows
(UseCase useCase) Find and return a list of basic flows from given use case.getClientElement
(Element element) Gets relationship client.getComment
(Element element) Returns documentation of given element.com.nomagic.magicreport.Image
getCustomImage
(PresentationElement presentationElement) Return original image of Image property from presentationElementcom.nomagic.magicreport.Image
getCustomImage
(Element element) Return original image of Image propertygetCustomImageInformation
(Element element) Return a CustomImageHolder informationgetCustomizationProperty
(Element element, Object aStereotype, String propertyName) Return property value from Customization element of the specified stereotype, on the element.getCustomizationPropertyString
(Element element, Object aStereotype, String propertyName) Return property value as string from Customization element of the specified stereotype, on the element.com.nomagic.magicdraw.ui.ElementFilter
getDerivedClassifiers
(Classifier parentClassifier) Returns classifier derived elements.Gets presentation elements from this diagram.getDiagramElements
(Diagram diagram) Gets elements from this diagram.getDiagramType
(Diagram diagram) Gets diagram type.getDSLProperty
(Element element, String propertyName) Get DSL Property.getElementComment
(Element element) Returns comment annotated to this element.getElementName
(Object element) Gets name of the element.getElementProperties
(Element element) Get all properties from specific element.getElementProperties
(Element element, String mode) Collects properties that appears in element's specification dialog tree at specific view mode (Standard/Expert/All)getElementPropertiesName
(Element element) Get name of all properties from specific element.getElementPropertiesNameWithMode
(Element element) Get name of all properties from specific element and current mode.getElementPropertiesNameWithMode
(Element element, String mode) Get name of all properties from specific element and specific mode.getElementURL
(Element element) Retrieve MagicDraw's element URL.getExceptionalFlows
(UseCase useCase) Find and return a basic flow from given use case.com.nomagic.magicdraw.ui.ElementFilter
com.nomagic.magicdraw.ui.ElementFilter
com.nomagic.magicreport.Image
getIconFor
(BaseElement element) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, boolean allowDuplicate) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, boolean allowDuplicate, Map<String, String> iconProperty) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, String prefix, String suffix, boolean hashCode) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, String prefix, String suffix, boolean hashCode, boolean allowDuplicate) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, String prefix, String suffix, boolean hashCode, boolean allowDuplicate, Map<String, String> iconProperty) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, String prefix, String suffix, boolean hashCode, Map<String, String> iconProperty) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(BaseElement element, Map<String, String> iconProperty) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(String type) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(String type, String prefix, String suffix, boolean hashCode) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(String type, String prefix, String suffix, boolean hashCode, Map<String, String> iconProperty) Return image icon for element.com.nomagic.magicreport.Image
getIconFor
(String type, Map<String, String> iconProperty) Return image icon for element.getIconId
(BaseElement element, String prefix, String suffix, boolean hashCode, boolean allowDuplicate, ResizableIcon icon) getImageFor
(Element element) Create image from element.getImageFor
(Element element, int dpi) Create image from element.getImageFor
(Object object, boolean allowDuplicate) Create image from object.getImageFor
(Object object, boolean allowDuplicate, String cannotRenderImageMsg) Create image from object.getImageFor
(Object object, boolean allowDuplicate, String cannotRenderImageMsg, int dpi) Create image from object.getIncludeUseCase
(UseCase useCase) Gets use case included element.getInnerElement
(Element element) Return a collection of inner element.getInteractionMessageType
(Message message) Gets interaction message type.getMetaClass
(Element element) Get meta class of specific elementgetMetaClass
(Stereotype stereotype) Get stereotype meta class.getOwnedElementsIncludingAdditional
(Element element, boolean includePureOwned) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.getOwnedElementsIncludingAdditional
(Element element, boolean includePureOwned, boolean excludeRelationship) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.getOwnedElementsIncludingAdditional
(Element element, boolean includePureOwned, boolean excludeRelationship, boolean excludeAuxiliaryResources) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.getOwnedElementsIncludingAdditional
(Element element, boolean includePureOwned, boolean excludeRelationship, boolean excludeAuxiliaryResources, boolean excludeInvisibleElement) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.static String
getPackageQualifiedName
(NamedElement namedElement, String separator) Get a qualified name by consider only Package and given element.getPackages
(boolean includeSmartPackage) getPresentationDiagramElements
(Diagram diagram) Gets presentation element in the diagram.getPresentationDiagramElements
(Diagram diagram, boolean includeNonManipulator) Gets presentation element in the diagram.com.nomagic.magicdraw.magicreport.helper.Polygon
Gets the bounds of this element in the form of a Polygon object.com.nomagic.magicdraw.magicreport.helper.Polygon
getPresentationElementBounds
(PresentationElement element, ImageExportResult exportResult) Gets the bounds of this element in the form of a Polygon object.List<com.nomagic.magicdraw.magicreport.helper.Polygon>
getPresentationElementBounds
(Diagram diagram, Element element) Gets the bounds of this element in the form of a Polygon object.getPresentationElementRectangle
(Diagram diagram, Element element) Gets the bounds of this element in the form of a Rectangle object.getPresentationElements
(Diagram diagram) Deprecated.getProperty
(Element element, String propertyName) Get the element property value.Set<com.nomagic.magicdraw.propertygroup.PropertyGroup>
getPropertyGroupsByElement
(Element element, boolean addAlwaysVisible) Get set ofPropertyGroup
by specific element.Collection<com.nomagic.magicdraw.propertygroup.PropertyGroup>
getPropertyGroupsByStereotype
(Class stereotype) Get collection ofPropertyGroup
by specific stereotype.getQProperties
(Element element, String propertyName) Get list of properties for element with DSL property groups, and each property group has its own property.getQProperty
(Element element, String propertyName) Get a property for element with DSL property groups, and each property group has its own property.static String
getQualifiedName
(NamedElement namedElement, String separator) Get a qualified name.Deprecated.result from this method is incorrect.getRecievingOperationalNode
(Element element) Get needline association ends.getRelationship
(Element element) Gets direct relationships of specified element.getRelationship
(Element element, boolean recursive) Gets direct relationships of specified element.getRelationship
(Element element, boolean recursive, boolean includeIndirect) Gets relationships of specified element.getRelativeActor
(Element element) Gets element relative actor.static Node
getRootNodeOfContainmentTree
(boolean startWithPrimaryModel) Get root node from containment tree.Get root node from diagram tree.getSendingOperationalNode
(Element element) Get needline association ends.getSlotProperty
(Element element, String classifierName) Get slot property by classifier name If there are more than one classifier matching with specified parameters, return only the property of first matching classifier.getSlotValue
(Element element, String classifierName, String definingFeatureName) Get slot value by classifier name and definingFeature name.getStereotypeProperty
(Element element, Stereotype stereotype, String propertyName) Gets stereotype property.getStereotypeProperty
(Element element, Stereotype stereotype, String propertyName, boolean checkMultiplicity) Gets stereotype property.getStereotypeProperty
(Element element, String stereotypeName, String propertyName) Gets stereotype property.getStereotypeProperty
(Element element, String stereotypeName, String propertyName, boolean checkMultiplicity) Gets stereotype property.static Object
getStereotypeProperty
(Element element, String profileName, String stereotypeName, String propertyName) Get Stereotype Property.getStereotypePropertyList
(Element element, String stereotypeName, String propertyName) Deprecated.value return from this method is improperly converted.static String
getStereotypePropertyString
(Element element, Stereotype stereotype, String propertyName) Gets stereotype property as String value.static String
getStereotypePropertyString
(Element element, Stereotype stereotype, String propertyName, String separator) Gets stereotype property as String value.static String
getStereotypePropertyString
(Element element, String stereotypeName, String propertyName) Gets stereotype property as String value.static String
getStereotypePropertyString
(Element element, String profileName, String stereotypeName, String propertyName) Gets stereotype property as String value.static String
getStereotypePropertyString
(Element element, String profileName, String stereotypeName, String propertyName, String separator) Gets stereotype property as String value.Deprecated.value return from this method is improperly converted.getStereotypes
(Element element) Gets all stereotypes applied to element.getSupplierElement
(Element element) Gets relationship supplier.getTemplateFile
(Element element) Get template file from element.getTemplateFile
(String templateFileName, String templateLocation, String extension, Object marker) Get Template file from template file name/path.getUCOwnerNumber
(Element element) Return the use case number or use case ID of element.getUsageElements
(Map<BaseElement, List<com.nomagic.magicdraw.uml.DependencyType>> usagesMap, Element element) Gets the element usages from usage map.getUsageRepresentationText
(BaseElement be, boolean addFullPath) Formats the usage subject.Map<BaseElement,
List<com.nomagic.magicdraw.uml.DependencyType>> Returns Usage Map of MD and then use getUsageElements method for returning the usage of the specified element.Deprecated.getUseCaseNumber
(Element element) Return the use case number or use case ID of element.Return a list of element used by this element (except diagram).com.nomagic.magicdraw.ui.ElementFilter
static boolean
hasBaseClassifier
(Classifier classifier, String baseClassifier) Checks if element has base classifier with given name.boolean
hasProperty
(Element element, String propertyName) Returns true when a property with a given name is specified on this element, false otherwise.boolean
hasStereotype
(Element element) Checks if element has stereotypes.boolean
hasStereotype
(Element element, String stereotype) Deprecated.boolean
isAssignableFrom
(Element element, String classTypeName) A function for checking super type of the specific element.boolean
isAttachedFile
(Element element) Check if element is attached file.boolean
isAttachedImage
(Element element) Check if element is attached image.boolean
isDerivedClassifier
(Classifier parent, Classifier child) Checks if child is derived from parent by generalization.boolean
Test and return true if object is null, empty string or empty collection.boolean
Test and return true if object is null, empty string or empty collection.boolean
isInvisibleElement
(BaseElement element) boolean
isInvisibleElement
(BaseElement element, boolean isTypeFilter) boolean
isInvisibleElement
(BaseElement element, com.nomagic.magicdraw.ui.ElementFilter elementFilter) boolean
isNamedElement
(Element element) Returns whether the element anNamedElement
.boolean
Test and return true if object is null.boolean
isRelationship
(Element element) Test and return true if element is relationship.boolean
A function for checking super type of the specific element.boolean
A function for checking super type of the specific element.static Object
parseObjectForPrinting
(Object value) Parses Strings and Collections of Stringscom.nomagic.magicdraw.magicreport.helper.Hyperlink
Convertcom.nomagic.magicdraw.hyperlinks.Hyperlink
toHyperlink
.void
setActiveValidationEnabled
(boolean enable) trimString
(String s) Deprecated.replaced with $s.trim()Methods inherited from class com.nomagic.magicreport.engine.Tool
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.nomagic.magicreport.engine.ITool
clearTool
-
Field Details
-
ICON_PROPERTY_RETINASCALING
- See Also:
-
-
Constructor Details
-
ReportHelper
public ReportHelper()
-
-
Method Details
-
getDSLProperty
Get DSL Property.- Parameters:
element
- the element.propertyName
- the property name.- Returns:
- the property value.
-
getStereotypeProperty
Gets stereotype property.- Parameters:
element
- the element.stereotypeName
- the stereotype name.propertyName
- the property name.- Returns:
- the property value.
- See Also:
-
getStereotypeProperty
public Object getStereotypeProperty(Element element, String stereotypeName, String propertyName, boolean checkMultiplicity) Gets stereotype property.- Parameters:
element
- the element.stereotypeName
- the stereotype name.propertyName
- the property name.checkMultiplicity
- check multiplicity before return value- Returns:
- the property value.
- See Also:
-
parseObjectForPrinting
Parses Strings and Collections of Strings -
getStereotypeProperty
Gets stereotype property.- Parameters:
element
- the element.stereotype
- the stereotype.propertyName
- the property name.- Returns:
- the property value.
- See Also:
-
getStereotypeProperty
public Object getStereotypeProperty(Element element, Stereotype stereotype, String propertyName, boolean checkMultiplicity) Gets stereotype property.- Parameters:
element
- the element.stereotype
- the stereotype.propertyName
- the property name.checkMultiplicity
- check multiplicity before return value- Returns:
- the property value.
- See Also:
-
getStereotypeProperty
public static Object getStereotypeProperty(Element element, String profileName, String stereotypeName, String propertyName) Get Stereotype Property.- Parameters:
element
- the element.profileName
- profile namestereotypeName
- the stereotype name.propertyName
- the property name.- Returns:
- the property value.
-
getStereotypePropertyList
@Deprecated public List<Object> getStereotypePropertyList(Element element, String stereotypeName, String propertyName) Deprecated.value return from this method is improperly converted.Gets stereotype property value as list of strings.- Parameters:
element
- element with assigned stereotypestereotypeName
- stereotype namepropertyName
- name of the property- Returns:
- List of the property name.
-
getStereotypePropertyString
public static String getStereotypePropertyString(Element element, String stereotypeName, String propertyName) Gets stereotype property as String value.- Parameters:
element
- the element instancestereotypeName
- the stereotype namepropertyName
- the property name- Returns:
- the value as String
-
getStereotypePropertyString
public static String getStereotypePropertyString(Element element, Stereotype stereotype, String propertyName) Gets stereotype property as String value.- Parameters:
element
- the element instancestereotype
- the stereotype instancepropertyName
- the property name- Returns:
- the value as String
-
getStereotypePropertyString
public static String getStereotypePropertyString(Element element, Stereotype stereotype, String propertyName, String separator) Gets stereotype property as String value.- Parameters:
element
- the element instancestereotype
- the stereotype instancepropertyName
- the property nameseparator
- when property value is list, the string will be added when convert list to string- Returns:
- the value as String
-
getStereotypePropertyString
public static String getStereotypePropertyString(Element element, String profileName, String stereotypeName, String propertyName) Gets stereotype property as String value.- Parameters:
element
- the element instanceprofileName
- profile namestereotypeName
- the stereotype namepropertyName
- the property name- Returns:
- the value as String
-
getStereotypePropertyString
public static String getStereotypePropertyString(Element element, String profileName, String stereotypeName, String propertyName, String separator) Gets stereotype property as String value.- Parameters:
element
- the element instanceprofileName
- profile namestereotypeName
- the stereotype namepropertyName
- the property nameseparator
- when property value is list, the string will be added when convert list to string- Returns:
- the value as String
-
getStereotypePropertyStringValue
Deprecated.value return from this method is improperly converted.Gets Stereotype Property As String value.- Parameters:
o
- the property- Returns:
- the value as String
-
getRepresentationText
-
isNamedElement
Returns whether the element anNamedElement
.- Parameters:
element
- element to test- Returns:
- true if given element is
NamedElement
; otherwise false
-
getAppliedStereotypeByString
@CheckForNull @Deprecated public Stereotype getAppliedStereotypeByString(Element element, String stereotype) Deprecated.Returns stereotype assigned to element.- Parameters:
element
- elementstereotype
- name of stereotype- Returns:
- assigned stereotype with that name.
-
getAppliedStereotypeByName
Returns stereotype assigned to element.- Parameters:
element
- elementstereotypeName
- name of stereotype- Returns:
- assigned stereotype with that name.
-
hasStereotype
Deprecated.Checks if element has assigned stereotype with given name.- Parameters:
element
- element to checkstereotype
- stereotype name to check- Returns:
- true if element has assigned stereotype with given name
-
containsStereotype
Returns true if element contains a stereotype (include all derived 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.
- See Also:
-
containsStereotype
Returns true if element contains a stereotype for the specified stereotype name.- Parameters:
element
- element to teststereotypeName
- stereotype name to be testedincludeDerived
- true if search target include all derived stereotypes; otherwise false- Returns:
- true if element contains a stereotype for the specified stereotype name.
- See Also:
-
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 Object getProperty(Element element, String propertyName) throws com.nomagic.magicdraw.magicreport.helper.PropertyNotFoundException Get the element property value.- 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.
-
getStereotypes
Gets all stereotypes applied to element. This method is replaced with $element.appliedStereotype.- Parameters:
element
- the element- Returns:
- the stereotype instances
- Throws:
IllegalArgumentException
- fromStereotypesHelper.getStereotypes
-
hasStereotype
Checks if element has stereotypes.- Parameters:
element
- element to check- Returns:
- true if has
- Throws:
IllegalArgumentException
- if element is null
-
findElementInCollection
@CheckForNull public Element findElementInCollection(Collection<? extends Element> col, String elementName) Search and return the element in the collection by element name.- Parameters:
col
- the collection of elementselementName
- the name of element- Returns:
- the element instance, If it does not find, it will return null.
-
findDiagramByName
-
findElementByName
Search and return the elements from name by regular expression.- Parameters:
source
- sourceregex
- the regular expression to which name is to be matched- Returns:
- collection of matches element
-
getDerivedClassifiers
Returns classifier derived elements.- Parameters:
parentClassifier
- the parent class- Returns:
- collection of derived elements (classifiers)
-
hasBaseClassifier
Checks if element has base classifier with given name.- Parameters:
classifier
- the classifierbaseClassifier
- base classifier name- Returns:
- true if the element contains specific base classifiers.
-
getBaseClassifiers
Return classifier based elements. The list contains all base classifiers include all its derived classifiers.- Parameters:
classifier
- the classifier- Returns:
- collection of based elements (classifiers)
-
getComment
Returns documentation of given element.- Parameters:
element
- the element which will be gotten the name.- Returns:
- the document
-
getElementComment
Returns comment annotated to this element. If comment is attached to this element, returns null.- Parameters:
element
- the element which will be gotten the Comment.- Returns:
- Comment instance of this element.
-
getRelativeActor
Gets element relative actor.- Parameters:
element
- the element- Returns:
- the collection of Actor.
-
getUseCaseAssociatedElement
Deprecated.Gets associated Element.- Parameters:
obj
- the element that we would like to find the other part- Returns:
- the other parts
-
getIncludeUseCase
Gets use case included element.- Parameters:
useCase
- the UseCase instance- Returns:
- the collection of included use case.
-
trimString
Deprecated.replaced with $s.trim()Trim string.- Parameters:
s
- the String- Returns:
- the trimmed String
-
createValueSpecificationText
Create text represents the ValueSpecification element.- Parameters:
specification
- The given ValueSpecification.- Returns:
- the String value for ValueSpecification
-
getPresentationElements
Deprecated.Gets presentation element in the diagram. This method equivalent togetPresentationDiagramElements(Diagram)
.- Parameters:
diagram
- the diagram instance.- Returns:
- the collection of elements.
- See Also:
-
getPresentationDiagramElements
Gets presentation element in the diagram. This method will return all presentation elements from diagram except non-manipulator symbols.- Parameters:
diagram
- the diagram instance.- Returns:
- the collection of elements.
- See Also:
-
getPresentationDiagramElements
public Collection<PresentationElement> getPresentationDiagramElements(Diagram diagram, boolean includeNonManipulator) Gets presentation element in the diagram.- Parameters:
diagram
- the diagram instance.includeNonManipulator
- true for include all non-manipulator element.- Returns:
- the collection of elements.
- See Also:
-
getPresentationElementBounds
@CheckForNull public com.nomagic.magicdraw.magicreport.helper.Polygon getPresentationElementBounds(PresentationElement element) Gets the bounds of this element in the form of a Polygon object. The bounds specify this component's coordinate to its diagram.- Parameters:
element
- the presentation element on diagram.- Returns:
- the bound of element as Polygon
-
getPresentationElementBounds
@CheckForNull public com.nomagic.magicdraw.magicreport.helper.Polygon getPresentationElementBounds(PresentationElement element, ImageExportResult exportResult) Gets the bounds of this element in the form of a Polygon object. The bounds specify this component's coordinate to its diagram.- Parameters:
element
- the presentation element on diagram.- Returns:
- the bound of element as Polygon
-
getPresentationElementRectangle
Gets the bounds of this element in the form of a Rectangle object. The bounds specify this component's coordinate to its diagram.- Parameters:
diagram
- the target diagram.element
- the presentation element on given diagram.- Returns:
- the bound of element as Rectangle. If element is not found in the diagram, it will return null.
-
getPresentationElementBounds
public List<com.nomagic.magicdraw.magicreport.helper.Polygon> getPresentationElementBounds(Diagram diagram, Element element) Gets the bounds of this element in the form of a Polygon object. The bounds specify this component's coordinate to its diagram.- Parameters:
diagram
- the target diagram.element
- the presentation element on given diagram.- Returns:
- the bound of element as Polygon. If element is not found in the diagram, it will return null.
-
getDiagramType
Gets diagram type.- Parameters:
diagram
- the diagram instance.- Returns:
- the type of diagram.
-
getMetaClass
Get stereotype meta class.- Parameters:
stereotype
- the stereotype- Returns:
- the collection of Meta Class
-
getMetaClass
Get meta class of specific element- Parameters:
element
- element- Returns:
- a Meta Class or Collection of Meta Class
-
getDiagramElements
Gets elements from this diagram.- Parameters:
diagram
- the target diagram.- Returns:
- the collection of elements.
-
getDiagramElements
Gets presentation elements from this diagram.- Parameters:
diagram
- the target diagram.- Returns:
- the collection of elements.
-
getQualifiedOwnerName
Deprecated.result from this method is incorrect. Use $element.owner.qualifiedNameGet qualified owner name.- Parameters:
obj
- the object instance- Returns:
- the qualified owner name
-
getQualifiedName
Get a qualified name. Qualified is a name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.- Parameters:
namedElement
- NamedElementseparator
- separator symbol. If value is null or empty string, the '::' will be used.- Returns:
- a qualified name.
-
getPackageQualifiedName
Get a qualified name by consider only Package and given element. Model and Profile will not be included on the qualified name.For example: The element hierarchy is
When template code is:Design : Model -> com : Package -> nomagic : Package -> ui -> Package -> BaseDialog : Class
Where $class is "BaseDialog" element, the result from above code will be:$report.getPackageQualifiedName($class, ".")
com.nomagic.ui.BaseDialog
- Parameters:
namedElement
- NamedElementseparator
- separator symbol. If value is null or empty string, the '::' will be used.- Returns:
- a qualified name.
-
serialize
Convertcom.nomagic.magicdraw.hyperlinks.Hyperlink
toHyperlink
.- Parameters:
hyperlink
- the magicdraw hyperlink- Returns:
- the magic report hyperlink instance
-
getSendingOperationalNode
Get needline association ends.- Parameters:
element
- element- Returns:
- needline association ends
-
getRecievingOperationalNode
Get needline association ends.- Parameters:
element
- element- Returns:
- needline association ends
-
findRelationship
Search and return a collection of relationship element inside package.- Parameters:
modelPackage
- package element- Returns:
- Collection of relationship in this package
-
findRelationship
Search and return a collection of relationship element inside package.- Parameters:
modelPackage
- package elementrecursive
- if true, perform recursively- Returns:
- Collection of relationship in this package
-
getRelationship
Gets direct relationships of specified element.- Parameters:
element
- Element element to be collect- Returns:
- Collection of relationship
-
getRelationship
Gets direct relationships of specified element.- Parameters:
element
- Element element to be collectrecursive
- if true, perform recursively- Returns:
- Collection of relationship
-
getRelationship
public Collection<Element> getRelationship(Element element, boolean recursive, boolean includeIndirect) Gets relationships of specified element.- Parameters:
element
- element to be collectrecursive
- if true, perform recursivelyincludeIndirect
- true to include indirect relationships- Returns:
- Collection of relationship
-
collectRelationships
Gets direct relationships of specified element.- Parameters:
element
- Element element to be collect- Returns:
- Collection of relationship
-
collectRelationships
Gets relationships of specified element.- Parameters:
element
- element to be collectincludeIndirect
- true to include indirect relationships- Returns:
- Collection of relationship
-
collectRelationships
public Collection<Element> collectRelationships(Element element, boolean includeIndirect, boolean isRecursive) Gets relationships of specified element.- Parameters:
element
- element to be collectincludeIndirect
- true to include indirect relationshipsisRecursive
- if true, perform recursively- Returns:
- Collection of relationship
-
getClientElement
Gets relationship client.- Parameters:
element
- relationship model element.- Returns:
- client element
-
getSupplierElement
Gets relationship supplier.- Parameters:
element
- relationship model element.- Returns:
- supplier element
-
getInnerElement
Return a collection of inner element.- Parameters:
element
- Element element to be collect- Returns:
- Collection of inner
-
getIconFor
Return image icon for element.- Parameters:
element
- a Magic Draw element- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(BaseElement element, Map<String, String> iconProperty) Return image icon for element.- Parameters:
element
- a Magic Draw elementiconProperty
- custom property to create icon- Returns:
- Image object for element's icon
-
getIconFor
Return image icon for element.- Parameters:
element
- a Magic Draw elementallowDuplicate
- true to always create new icon and don't keep the icon in map- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(BaseElement element, boolean allowDuplicate, Map<String, String> iconProperty) Return image icon for element.- Parameters:
element
- a Magic Draw elementallowDuplicate
- true to always create new icon and don't keep the icon in mapiconProperty
- custom property to create icon- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(BaseElement element, String prefix, String suffix, boolean hashCode) Return image icon for element. In case ofhashCode
equals true, icon's name format is set to "icon_"+hash code and doesn't include prefix/suffix.- Parameters:
element
- a MagicDraw elementprefix
- prefix for icon's namesuffix
- suffix for icon's namehashCode
- uses hash code in icon's name- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(BaseElement element, String prefix, String suffix, boolean hashCode, Map<String, String> iconProperty) Return image icon for element. In case ofhashCode
equals true, icon's name format is set to "icon_"+hash code and doesn't include prefix/suffix.- Parameters:
element
- a MagicDraw elementprefix
- prefix for icon's namesuffix
- suffix for icon's namehashCode
- uses hash code in icon's nameiconProperty
- custom property to create icon- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(BaseElement element, String prefix, String suffix, boolean hashCode, boolean allowDuplicate) Return image icon for element. In case ofhashCode
equals true, icon's name format is set to "icon_"+hash code and doesn't include prefix/suffix.- Parameters:
element
- a MagicDraw elementprefix
- prefix for icon's namesuffix
- suffix for icon's namehashCode
- uses hash code in icon's nameallowDuplicate
- true to always create new icon and don't keep the icon in map- Returns:
- Image object for element's icon
-
getIconId
public String getIconId(BaseElement element, String prefix, String suffix, boolean hashCode, boolean allowDuplicate, ResizableIcon icon) -
getIconFor
@CheckForNull public com.nomagic.magicreport.Image getIconFor(BaseElement element, String prefix, String suffix, boolean hashCode, boolean allowDuplicate, @CheckForNull Map<String, String> iconProperty) Return image icon for element. In case ofhashCode
equals true, icon's name format is set to "icon_"+hash code and doesn't include prefix/suffix.- Parameters:
element
- a MagicDraw elementprefix
- prefix for icon's namesuffix
- suffix for icon's namehashCode
- uses hash code in icon's nameallowDuplicate
- true to always create new icon and don't keep the icon in mapiconProperty
- custom property to create icon- Returns:
- Image object for element's icon
-
getIconFor
Return image icon for element.- Parameters:
type
- element type- Returns:
- Image object for element's icon
-
getIconFor
Return image icon for element.- Parameters:
type
- element type- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(String type, String prefix, String suffix, boolean hashCode) Return image icon for element. In case ofhashCode
equals true, icon's name format is set to "icon_"+hash code and doesn't include prefix/suffix.- Parameters:
type
- element typeprefix
- prefix for icon's namesuffix
- suffix for icon's namehashCode
- uses hash code in icon's name- Returns:
- Image object for element's icon
-
getIconFor
public com.nomagic.magicreport.Image getIconFor(String type, String prefix, String suffix, boolean hashCode, Map<String, String> iconProperty) Return image icon for element. In case ofhashCode
equals true, icon's name format is set to "icon_"+hash code and doesn't include prefix/suffix.- Parameters:
type
- element typeprefix
- prefix for icon's namesuffix
- suffix for icon's namehashCode
- uses hash code in icon's nameiconProperty
- custom property to create icon- Returns:
- Image object for element's icon
-
getCustomImage
Return original image of Image property from presentationElement- Parameters:
presentationElement
- a presentationElement- Returns:
- original image in Image property
-
getCustomImage
Return original image of Image property- Parameters:
element
- an element- Returns:
- original image in Image property
-
getCustomImageInformation
Return a CustomImageHolder information- Parameters:
element
- element- Returns:
- CustomImageHolder
-
isNull
Test and return true if object is null.- Parameters:
obj
- object being tested.- Returns:
- true if object is null
-
isEmpty
Test and return true if object is null, empty string or empty collection.- Parameters:
obj
- object being tested.- Returns:
- true if object is null, empty string or empty collection.
-
isEmpty
Test and return true if object is null, empty string or empty collection.- Parameters:
obj
- object being tested.isIgnoreSpace
- true for ignoring all spaces, line feeds, etc. for html string only- Returns:
- true if object is null, empty string or empty collection.
-
isRelationship
Test and return true if element is relationship.- Parameters:
element
- element being tested.- Returns:
- true if object is relationship
-
getInteractionMessageType
Gets interaction message type.- Parameters:
message
- Message- Returns:
- type of message
-
getUsageRepresentationText
Formats the usage subject. The output string is the same as Result column of Used by table in Magic Draw.- Parameters:
be
-ModelElement
to format.addFullPath
- use full path.- Returns:
- formatted element, String.
-
getUsedBy
Return a list of element used by this element (except diagram).- Parameters:
element
- the the element which will be gotten the list of element name that uses the specified element.- Returns:
- Collection of elements used by input element.
-
getUsages
public Map<BaseElement,List<com.nomagic.magicdraw.uml.DependencyType>> getUsages(Object selectedObjects) Returns Usage Map of MD and then use getUsageElements method for returning the usage of the specified element.- Parameters:
selectedObjects
- the elements that this method will find the usage.- Returns:
- Map of Usages of elements
-
getUsageElements
@CheckForNull public Collection<BaseElement> getUsageElements(Map<BaseElement, List<com.nomagic.magicdraw.uml.DependencyType>> usagesMap, Element element) Gets the element usages from usage map.- Parameters:
usagesMap
- the Usages Map of MagicDraw.element
- the element which will be gotten the list of element name that uses the specified element.- Returns:
- Collection of usage name of elements.
-
getElementName
Gets name of the element. If the name of element is empty, it will return "<unnamed>". This method performs the following procedures:- If element is generalized from NamedElement, return $element.name
- If element is generalized from Slot, return $element.definingFeature.name
- If element is an UML element, return $element.humanName
- else return $element.toString()
- Parameters:
element
- the element.- Returns:
- element name
-
filterDiagram
public Collection<Diagram> filterDiagram(Collection<Diagram> diagramList, Collection<String> digramTypes) Return the collection from the diagram list filtered by types.Example:
#foreach ($d in $report.filterElement($Diagram, ['Use Case Diagram', 'Class Diagram']) $d.name #end
- Parameters:
diagramList
- the collection of diagrams.digramTypes
- the collection of diagram types which is used to filter.- Returns:
- the collection of filtered diagrams.
-
filterElement
public Collection<BaseElement> filterElement(Collection<BaseElement> elementList, Collection<String> humanTypes) Return the collection from the element list filtered by human types.Example:
#foreach ($e in $report.filterElement($elements, ['Class', 'Interface']) $e.name $e.humanType #end
- Parameters:
elementList
- the collection of element.humanTypes
- the collection of human types which is used to filter.- Returns:
- the collection of filtered elements.
-
filterElementByStereotypeName
public Collection<BaseElement> filterElementByStereotypeName(Collection<BaseElement> elementList, Collection<String> stereotypesNames) Return the collection from the element list filtered by stereotype.- Parameters:
elementList
- the collection of element.stereotypesNames
- the collection of stereotypes names which is used to filter.- Returns:
- the collection of filtered elements.
-
filterElementType
public Collection<BaseElement> filterElementType(Collection<BaseElement> elementList, Collection<String> elementTypes) Return the collection from the element list filtered by element types.Example:
#foreach ($e in $report.filterElementType($elements, ['class', 'interface']) $e.name $e.elementType #end
- Parameters:
elementList
- the collection of element.elementTypes
- the collection of element types which is used to filter.- Returns:
- the collection of filtered elements.
-
filterClassName
public Collection<BaseElement> filterClassName(Collection<BaseElement> elementList, Collection<String> shortNameForClassTypes) Return the collection from the element list filtered by short name for class types.Example:
#foreach ($e in $report.filterClassName($elements, ['Diagram', 'UseCase']) $e.name $e.className #end
- Parameters:
elementList
- the collection of element.shortNameForClassTypes
- the collection of short name for class type which is used to filter.- Returns:
- the collection of filtered elements.
-
filter
public Collection<Element> filter(Collection<Element> elementList, String propertyName, Collection<?> propertyValue) Return the collection from the element list filtered by specified property name.Example:
#foreach ($e in $report.filter($elements, 'name', ['foo', 'bar']) $e.name #end
- Parameters:
elementList
- the collection of element.propertyName
- the property name which is used to filter.propertyValue
- the collection of element property values which is used to filter.- Returns:
- the collection of filtered elements.
-
getBaseClassInheritableAttributes
Gets the classifier inheritable attributes.- Parameters:
classifier
- the Classifier.- Returns:
- the Collection of Attributes.
-
getBaseClassInheritableOperations
Gets the classifier inheritable operations.- Parameters:
classifier
- the Classifier.- Returns:
- the Collection of Operations.
-
getBaseClassAssociations
Gets the classifier associations.- Parameters:
classifier
- the Classifier.- Returns:
- the Collection of Associations.
-
getBaseRelations
Gets the classifier relations.- Parameters:
classifier
- the Classifier.- Returns:
- the Collection of Relations.
-
getBaseClassPorts
Gets the classifier port.- Parameters:
classifier
- the Classifier.- Returns:
- the Collection of Ports.
-
getBaseRealizedInterfaces
Gets the behavior classifier realized interfaces.- Parameters:
behavioredClassifier
- the BehavioredClassifier.- Returns:
- the Collection of RealizedInterfaces.
-
isDerivedClassifier
Checks if child is derived from parent by generalization.- Parameters:
parent
- parentchild
- possible parent- Returns:
- true if derived
-
getUseCaseNumber
Return the use case number or use case ID of element.- Parameters:
element
- the element- Returns:
- the use case number.
-
getActorNumber
Return the actor ID of Actor.- Parameters:
element
- element- Returns:
- the actor ID
-
getUCOwnerNumber
Return the use case number or use case ID of element.- Parameters:
element
- the element- Returns:
- the use case owner number or ID.
-
getElementURL
Retrieve MagicDraw's element URL.- Parameters:
element
- element object- Returns:
- MagicDraw's element URL
-
getBasicFlows
Find and return a list of basic flows from given use case. If use case scenario is not being used, it will retrieve the value from "requirementUseCase" stereotype tags.- Parameters:
useCase
- a use case.- Returns:
- a list of flow step
FlowStep
-
getAlternativeFlows
Find and return all alternative flows from given use case. The alternative flows will be listed from all possible branches of basic flows. If use case scenario is not being used, it will the retrieve value from "requirementUseCase" stereotype tags.- Parameters:
useCase
- a use case.- Returns:
- a list of flow step
FlowStep
-
getExceptionalFlows
Find and return a basic flow from given use case. If use case scenario is not being used, it will the retrieve value from "requirementUseCase" stereotype tags.- Parameters:
useCase
- a use case.- Returns:
- a list of flow step
FlowStep
-
getSlotValue
public List<Object> getSlotValue(Element element, String classifierName, String definingFeatureName) Get slot value by classifier name and definingFeature name. If there are more than one slots matching with specified parameters, return only the value of first matching slot.- Parameters:
element
- an element.classifierName
- classifier name. [case-sensitive]definingFeatureName
- defining feature name. [case-sensitive]- Returns:
- result value in ValueSpecification or value in array of ValueSpecification, up to multiplicity.
-
getSlotProperty
Get slot property by classifier name If there are more than one classifier matching with specified parameters, return only the property of first matching classifier.- Parameters:
element
- an element.classifierName
- classifier name. [case-sensitive]- Returns:
- slot property
-
getOwnedElementsIncludingAdditional
Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.- Parameters:
element
- an element to be found owned elementincludePureOwned
- include element owned directly in ownedElement UML metaproperty- Returns:
- owned elements of the given Element
-
getOwnedElementsIncludingAdditional
public List<Element> getOwnedElementsIncludingAdditional(Element element, boolean includePureOwned, boolean excludeRelationship) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.- Parameters:
element
- an element to be found owned elementincludePureOwned
- include element owned directly in ownedElement UML metapropertyexcludeRelationship
- true to exclude relationship
-
getOwnedElementsIncludingAdditional
public List<Element> getOwnedElementsIncludingAdditional(Element element, boolean includePureOwned, boolean excludeRelationship, boolean excludeAuxiliaryResources) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.- Parameters:
element
- an element to be found owned elementincludePureOwned
- include element owned directly in ownedElement UML metapropertyexcludeRelationship
- true to exclude relationship of given elementexcludeAuxiliaryResources
- true to exclude auxiliary resoures- Returns:
- owned elements of the given Element
-
getOwnedElementsIncludingAdditional
public List<Element> getOwnedElementsIncludingAdditional(Element element, boolean includePureOwned, boolean excludeRelationship, boolean excludeAuxiliaryResources, boolean excludeInvisibleElement) Return owned elements of the given Element including additional owned elements defined in DSL specification by additionalContentProperty.- Parameters:
element
- an element to be found owned elementincludePureOwned
- include element owned directly in ownedElement UML metapropertyexcludeRelationship
- true to exclude relationship of given elementexcludeAuxiliaryResources
- true to exclude auxiliary resourcesexcludeInvisibleElement
- true to exclude invisible element- Returns:
- owned elements of the given Element
-
filterElementByElementFilters
-
getPackages
-
isAttachedFile
Check if element is attached file.- Parameters:
element
- specific element- Returns:
- true if element is attached element, otherwise; false
-
isAttachedImage
Check if element is attached image.- Parameters:
element
- specific element- Returns:
- true if element is attached image, otherwise; false
-
getAttachedImage
- Throws:
IOException
-
getAttachedImage
@CheckForNull public Object getAttachedImage(Element element, @CheckForNull String cannotRenderImageMsg) throws IOException Get image from attached image.- Parameters:
element
- specific elementcannotRenderImageMsg
- in case the element is attached file but not image, return this msg instead.- Returns:
- image of attached image.
- Throws:
IOException
-
getAttachedFile
Get file from attached file.- Parameters:
element
- specific element- Returns:
- image of attached image.
- Throws:
IOException
-
getTemplateFile
@CheckForNull public File getTemplateFile(String templateFileName, String templateLocation, String extension, Object marker) Get Template file from template file name/path.- Parameters:
templateFileName
- template file name or pathtemplateLocation
- template location/dirextension
- extension for template file. in case it has no extensionmarker
- The marker object used to track the file.- Returns:
- template file
-
getTemplateFile
Get template file from element.- Parameters:
element
- attached file- Returns:
- template file
- Throws:
IOException
-
getImageFor
Create image from element.
The image is always created.- Parameters:
element
- target element- Returns:
- image
-
getImageFor
Create image from element.
The image is always created.- Parameters:
element
- target elementdpi
-- Returns:
- image
-
getImageFor
Create image from object.
The image is newly created or returned old image from map up to 'allowDuplicate'.- Parameters:
object
- object to be exported as imageallowDuplicate
- allowDuplicated true to always create new image and don't keep the image in map- Returns:
- Image
-
getImageFor
public Object getImageFor(Object object, boolean allowDuplicate, @CheckForNull String cannotRenderImageMsg) Create image from object.
The image is newly created or returned old image from map up to 'allowDuplicate'.- Parameters:
object
- object to be exported as imageallowDuplicate
- allowDuplicated true to always create new image and don't keep the image in mapcannotRenderImageMsg
- in case the element is attached file but not image, return error message instead.- Returns:
- Image
-
getImageFor
public Object getImageFor(Object object, boolean allowDuplicate, @CheckForNull String cannotRenderImageMsg, int dpi) Create image from object.
The image is newly created or returned old image from map up to 'allowDuplicate'.- Parameters:
object
- object to be exported as imageallowDuplicate
- allowDuplicated true to always create new image and don't keep the image in mapcannotRenderImageMsg
- in case the element is attached file but not image, return error message instead.dpi
- image dpi- Returns:
- Image
-
getCustomizationPropertyString
public String getCustomizationPropertyString(Element element, Object aStereotype, String propertyName) Return property value as string from Customization element of the specified stereotype, on the element.- Parameters:
element
- an elementaStereotype
- stereotype name or elementpropertyName
- property name- Returns:
- property value as string from Customization element
-
getCustomizationProperty
Return property value from Customization element of the specified stereotype, on the element.- Parameters:
element
- an elementaStereotype
- stereotype name or elementpropertyName
- property name- Returns:
- property value from Customization element
-
getAllCustomizationsByElement
Get all customizations from specific element.- Parameters:
element
- an element- Returns:
- all customization elements of the stereotype on the element.
-
getAllCustomizationsByElement
Get all customizations from specific stereotype on element.- Parameters:
element
- an elementaStereotype
- stereotype name or element- Returns:
- all customization elements of the stereotype on the element.
-
getAllCustomizationsByTarget
Get all customizations from specific target element of customization element.- Parameters:
targetElement
- a target element- Returns:
- all customizations from specific target element of customization element.
-
getElementPropertiesName
Get name of all properties from specific element.- Parameters:
element
- element- Returns:
- list of properties name
-
getElementPropertiesNameWithMode
Get name of all properties from specific element and current mode.- Parameters:
element
- element- Returns:
- list of properties name
-
getElementPropertiesNameWithMode
Get name of all properties from specific element and specific mode.- Parameters:
element
- elementmode
- view mode from PropertiesModeHelper.MODES- Returns:
- list of properties name
-
getElementProperties
Get all properties from specific element.- Parameters:
element
- element- Returns:
- list of properties
-
getElementProperties
Collects properties that appears in element's specification dialog tree at specific view mode (Standard/Expert/All)- Parameters:
element
- elementmode
- view mode from PropertiesModeHelper.MODES -- STANDARD, EXPERT, ALL- Returns:
- list of properties
-
getDefaultElementFilter
public com.nomagic.magicdraw.ui.ElementFilter getDefaultElementFilter() -
getExcludeAuxiliaryResourceFilter
public com.nomagic.magicdraw.ui.ElementFilter getExcludeAuxiliaryResourceFilter() -
getVisibleElementFilter
public com.nomagic.magicdraw.ui.ElementFilter getVisibleElementFilter() -
getExcludeRelationshipElementFilter
public com.nomagic.magicdraw.ui.ElementFilter getExcludeRelationshipElementFilter() -
filterVisibleElement
-
filterVisibleElement
-
isInvisibleElement
-
isInvisibleElement
-
isInvisibleElement
public boolean isInvisibleElement(BaseElement element, @CheckForNull com.nomagic.magicdraw.ui.ElementFilter elementFilter) -
getRootNodeOfContainmentTree
Get root node from containment tree.- Parameters:
startWithPrimaryModel
- true to filter only primary model,
otherwise it will return Project node that may contain primary model and usage project- Returns:
- root node from containment tree
-
getRootNodeOfDiagramTree
Get root node from diagram tree.- Returns:
- root node from diagram tree
-
getPropertyGroupsByStereotype
public Collection<com.nomagic.magicdraw.propertygroup.PropertyGroup> getPropertyGroupsByStereotype(Class stereotype) Get collection ofPropertyGroup
by specific stereotype.- Parameters:
stereotype
- a stereotype- Returns:
- collection of
PropertyGroup
-
getPropertyGroupsByElement
public Set<com.nomagic.magicdraw.propertygroup.PropertyGroup> getPropertyGroupsByElement(Element element, boolean addAlwaysVisible) Get set ofPropertyGroup
by specific element.- Parameters:
element
- an elementaddAlwaysVisible
- true to use all set stereotypes + all settable showWhenNotApplied stereotypes, false to use only all set stereotypes.- Returns:
- set of
PropertyGroup
-
getQProperty
Get a property for element with DSL property groups, and each property group has its own property.- Parameters:
element
- an element.propertyName
- property name- Returns:
- a
Property
-
getQProperties
Get list of properties for element with DSL property groups, and each property group has its own property.- Parameters:
element
- an element.propertyName
- property name- Returns:
- a list of
Property
-
setActiveValidationEnabled
public void setActiveValidationEnabled(boolean enable) -
ensureLoad
-
isTypeOf
A function for checking super type of the specific element.- Parameters:
element
- an elementtypeName
- stereotype name or java class name- Returns:
- return true, if the element is subtype of the specific stereotype name or class name.
-
isTypeOf
A function for checking super type of the specific element.- Parameters:
element
- an elementtypeName
- stereotype name or java class namecheckClassTypeName
- false to check type by stereotype name only- Returns:
- return true, if the element is subtype of the specific stereotype name or class name.
-
isAssignableFrom
A function for checking super type of the specific element.- Parameters:
element
- an elementclassTypeName
- java class name- Returns:
- return true, if the element is subtype of the specific class type name.
-
getAppliedStereotypeByName(Element, String)