Class FilterSettings
java.lang.Object
com.nomagic.magicdraw.dependencymatrix.persistence.FilterSettings
- All Implemented Interfaces:
com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
@OpenApiAll
public abstract class FilterSettings
extends Object
implements com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
Provides generic ability to access row or column filter settings.
Settings are stored directly in the Dependency Matrix diagram element, and retrieved directly
-
Constructor Summary
ConstructorsConstructorDescriptionFilterSettings(Diagram diagram) Initializes access to the filter settings elementFilterSettings(Diagram diagram, Stereotype filterStereotype) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>Checks if provided list is not EmptyList.Additional scope elements settingElement types for rows/columnsabstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valueprotected Stereotypeprotected DiagramProject of these settingsDependency Matrix Property filter propertyabstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valueabstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valueDependency matrix removed element propertyabstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valuegetScope()Deprecated.use com.nomagic.magicdraw.dependencymatrix.persistence.FilterSettings#getScopeRoots()abstract StringRoot elements of the scope.abstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valueabstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valueabstract StringStereotype tag name of the dependency matrix filter stereotype, used to get the property valuebooleanbooleanbooleanIndicates if children of removed elements should be removed too.booleanbooleanInclude custom types element filter propertybooleanInclude subtypes element filter propertyvoidsetConvertedElementTypes(List<Object> types) Converts element types and saves them as the diagram settingvoidsetElementTypes(List<Element> types) Set element types for diagramvoidsetIncludeAdditionalContent(boolean includeAdditionalContent) voidsetPropertyFilter(List<String> propertyFilter) Dependency Matrix Property filter propertyvoidsetQueryExpression(String expression) voidsetRemovedElements(Collection<Element> removedElements) update Dependency matrix removed element propertyvoidsetScope(Collection<Element> scope) Dependency matrix scope propertyvoidsetScopeDefined(boolean confirmed) Set scope confirmation flagvoidsetTypesIncludeCustomTypes(boolean includeCustomTypes) Include subtypes element filter propertyvoidsetTypesIncludeSubtypes(boolean includeSubtypes) Include subtypes element filter propertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
getName
-
Constructor Details
-
FilterSettings
Initializes access to the filter settings element- Parameters:
diagram- matrix diagram
-
FilterSettings
-
-
Method Details
-
castList
Checks if provided list is not EmptyList. If so - returns new list. Otherwise - returns the same list- Parameters:
listValue- checked list- Returns:
- list or new list
-
getElementTypes
Element types for rows/columns- Specified by:
getElementTypesin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- ist of metaclass or stereotype instance
-
isElementTypesDefined
public boolean isElementTypesDefined()- Specified by:
isElementTypesDefinedin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- when true and getElementTypes() is empty, means that elements of any type can be in the scope. when false and getElementTypes() is empty, means that no types are accepted so the scope is empty
-
setElementTypes
Set element types for diagram- Parameters:
types- list of metaclass or stereotype instance
-
setConvertedElementTypes
Converts element types and saves them as the diagram setting- Parameters:
types- element types
-
getScopeRoots
Description copied from interface:com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettingsRoot elements of the scope. Those elements and their children can be included into the scope- Specified by:
getScopeRootsin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- scope root elements, used when collecting all elements in the scope
-
getScope
Deprecated.use com.nomagic.magicdraw.dependencymatrix.persistence.FilterSettings#getScopeRoots() -
setScope
Dependency matrix scope property- Parameters:
scope- scope element collection
-
getRemovedElements
Dependency matrix removed element property- Specified by:
getRemovedElementsin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- element removed from the scope
-
isRemoveChildrenOfRemovedElements
public boolean isRemoveChildrenOfRemovedElements()Description copied from interface:com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettingsIndicates if children of removed elements should be removed too.- Specified by:
isRemoveChildrenOfRemovedElementsin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- true if children of removed elements should be removed.
-
setRemovedElements
update Dependency matrix removed element property- Parameters:
removedElements- element removed from the scope
-
isTypesIncludeSubtypes
public boolean isTypesIncludeSubtypes()Include subtypes element filter property- Specified by:
isTypesIncludeSubtypesin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- true if all subtypes should be accepted
-
setTypesIncludeSubtypes
public void setTypesIncludeSubtypes(boolean includeSubtypes) Include subtypes element filter property- Parameters:
includeSubtypes- if all subtypes should be accepted
-
isTypesIncludeCustomTypes
public boolean isTypesIncludeCustomTypes()Include custom types element filter property- Specified by:
isTypesIncludeCustomTypesin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- true if all subtypes should be accepted
-
setTypesIncludeCustomTypes
public void setTypesIncludeCustomTypes(boolean includeCustomTypes) Include subtypes element filter property- Parameters:
includeCustomTypes- if all custom types should be accepted
-
getPropertyFilter
Dependency Matrix Property filter property- Specified by:
getPropertyFilterin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- property filter values
-
setPropertyFilter
Dependency Matrix Property filter property- Parameters:
propertyFilter- property filter values
-
setQueryExpression
- Parameters:
expression- query string expression
-
getElementTypesTagName
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getScopeTagName
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getRemovedElementsTagName
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getTypesIncludeSubtypes
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getTypesIncludeCustomTypes
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getPropertyFilterTagName
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getScopeDefinedTagName
-
getQueryTagName
Stereotype tag name of the dependency matrix filter stereotype, used to get the property value- Returns:
- tag name
-
getFilterStereotype
-
getMatrixElement
-
getProject
Description copied from interface:com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettingsProject of these settings- Specified by:
getProjectin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- project
-
setScopeDefined
public void setScopeDefined(boolean confirmed) Set scope confirmation flag- Parameters:
confirmed- flag value
-
isScopeDefined
public boolean isScopeDefined()- Specified by:
isScopeDefinedin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- true if scope is defined. If scope is empty and defined, it means whole project.
-
setIncludeAdditionalContent
public void setIncludeAdditionalContent(boolean includeAdditionalContent) -
isIncludeAdditionalContent
public boolean isIncludeAdditionalContent()- Specified by:
isIncludeAdditionalContentin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- true if it should retrieve additional content when collecting elements.
-
getQueryExpression
- Specified by:
getQueryExpressionin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
-
getAdditionalElements
Description copied from interface:com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettingsAdditional scope elements setting- Specified by:
getAdditionalElementsin interfacecom.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings- Returns:
- additionally added elements to the scope
-