public abstract class FilteredStructure extends Structure
Clients may subclass this class.
Constructor and Description |
---|
FilteredStructure(PropertySet properties)
Instantiate a new filtered structure.
|
Modifier and Type | Method and Description |
---|---|
protected abstract String |
getFilterQualifiedName(Object element)
Determines the node qualified name to use in the filter regular expressions.
|
protected boolean |
isFiltered(Object element)
Determines whether the element is to be filtered out of the structure.
|
getChildren, getRoots
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose
public FilteredStructure(PropertySet properties)
The specified options might contain the following properties to filter the structure:
"excludes"
: a comma-separated list of qualified names, each one referencing a node qualified name to exclude from the
structure. Excluding a node also excludes its children, except the ones listed in the includes
property.
"includes"
: a comma-separated list of qualified names, each one referencing a node qualified name to retain in the structure,
even if its parent is excluded.properties
- options configuring the filtering process.protected boolean isFiltered(Object element)
This method relies on getFilterQualifiedName()
to determine a node qualified name that used in the filter regular expressions.
Subclass is not required to override and shall use the base implementation as-is.
element
- a model element, whose actual type is up to the subclass.false
if the element should be part of the structure, true
if it must be ignored.getFilterQualifiedName(Object)