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 Details

    • FilterSettings

      public FilterSettings(Diagram diagram)
      Initializes access to the filter settings element
      Parameters:
      diagram - matrix diagram
    • FilterSettings

      public FilterSettings(Diagram diagram, Stereotype filterStereotype)
  • Method Details

    • castList

      public static <T> List<T> castList(List listValue)
      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

      public List<Element> getElementTypes()
      Element types for rows/columns
      Specified by:
      getElementTypes in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Returns:
      ist of metaclass or stereotype instance
    • isElementTypesDefined

      public boolean isElementTypesDefined()
      Specified by:
      isElementTypesDefined in interface com.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

      public void setElementTypes(List<Element> types)
      Set element types for diagram
      Parameters:
      types - list of metaclass or stereotype instance
    • setConvertedElementTypes

      public void setConvertedElementTypes(List<Object> types)
      Converts element types and saves them as the diagram setting
      Parameters:
      types - element types
    • getScopeRoots

      public Collection<Element> getScopeRoots()
      Description copied from interface: com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Root elements of the scope. Those elements and their children can be included into the scope
      Specified by:
      getScopeRoots in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Returns:
      scope root elements, used when collecting all elements in the scope
    • getScope

      @Deprecated public Collection<Element> getScope()
      Deprecated.
      use com.nomagic.magicdraw.dependencymatrix.persistence.FilterSettings#getScopeRoots()
    • setScope

      public void setScope(Collection<Element> scope)
      Dependency matrix scope property
      Parameters:
      scope - scope element collection
    • getRemovedElements

      public Collection<Element> getRemovedElements()
      Dependency matrix removed element property
      Specified by:
      getRemovedElements in interface com.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.ScopeSettings
      Indicates if children of removed elements should be removed too.
      Specified by:
      isRemoveChildrenOfRemovedElements in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Returns:
      true if children of removed elements should be removed.
    • setRemovedElements

      public void setRemovedElements(Collection<Element> removedElements)
      update Dependency matrix removed element property
      Parameters:
      removedElements - element removed from the scope
    • isTypesIncludeSubtypes

      public boolean isTypesIncludeSubtypes()
      Include subtypes element filter property
      Specified by:
      isTypesIncludeSubtypes in interface com.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:
      isTypesIncludeCustomTypes in interface com.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

      public List<String> getPropertyFilter()
      Dependency Matrix Property filter property
      Specified by:
      getPropertyFilter in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Returns:
      property filter values
    • setPropertyFilter

      public void setPropertyFilter(List<String> propertyFilter)
      Dependency Matrix Property filter property
      Parameters:
      propertyFilter - property filter values
    • setQueryExpression

      public void setQueryExpression(@CheckForNull String expression)
      Parameters:
      expression - query string expression
    • getElementTypesTagName

      public abstract String getElementTypesTagName()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getScopeTagName

      public abstract String getScopeTagName()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getRemovedElementsTagName

      public abstract String getRemovedElementsTagName()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getTypesIncludeSubtypes

      public abstract String getTypesIncludeSubtypes()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getTypesIncludeCustomTypes

      public abstract String getTypesIncludeCustomTypes()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getPropertyFilterTagName

      public abstract String getPropertyFilterTagName()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getScopeDefinedTagName

      public abstract String getScopeDefinedTagName()
    • getQueryTagName

      public abstract String getQueryTagName()
      Stereotype tag name of the dependency matrix filter stereotype, used to get the property value
      Returns:
      tag name
    • getFilterStereotype

      protected Stereotype getFilterStereotype()
    • getMatrixElement

      protected Diagram getMatrixElement()
    • getProject

      public Project getProject()
      Description copied from interface: com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Project of these settings
      Specified by:
      getProject in interface com.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:
      isScopeDefined in interface com.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:
      isIncludeAdditionalContent in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Returns:
      true if it should retrieve additional content when collecting elements.
    • getQueryExpression

      @CheckForNull public String getQueryExpression()
      Specified by:
      getQueryExpression in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
    • getAdditionalElements

      public Collection<Element> getAdditionalElements()
      Description copied from interface: com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Additional scope elements setting
      Specified by:
      getAdditionalElements in interface com.nomagic.magicdraw.ui.diagrams.scope.ScopeSettings
      Returns:
      additionally added elements to the scope