-
Notifications
You must be signed in to change notification settings - Fork 1
Config File 8 Filters
herve edited this page Jan 30, 2019
·
1 revision
Filters can be used in two locations:
- In the form definition itself (the org.archicontribs.form object)
- In the generated table lines (the lines object)
The filters are compound of:
-
tests [array]: array of individual tests
- attribute [string]: literal, variable, or mix
- value [string]: value to compare an attribute to, using the following operation filter.
-
operation [string]: operation to be done on an attribute. Can be one of:
- exists: checks if an attribute exists (usually used in conjunction with Archi properties)
- equals: compares an attribute to its value (case sensitive)
- iequals: compares an attribute to its value (case insensitive)
- in: compare the attribute to every comma separated value (case sensitive)
- iin: compare an attribute to every comma separated value (case insensitive)
- matches: checks if an attribute matches the regexp given as value
-
genre [string]: Specify how to combine the individual tests. Can be one of:
- OR: the test is positive if at least one of the individual tests is positive
- AND: the test is positive if all the individual tests are positive
The following filter may be used to retrieve all Archi elements (but not their relationships):
"filter": {
"genre": "OR",
"tests": [
{ "attribute": "${class}", "operation": "iequals", "value": "Capability" },
{ "attribute": "${class}", "operation": "iequals", "value": "CourseOfAction" },
{ "attribute": "${class}", "operation": "iequals", "value": "Resource" },
{ "attribute": "${class}", "operation": "iequals", "value": "Product" },
{ "attribute": "${class}", "operation": "matches", "value": "Business.*" },
{ "attribute": "${class}", "operation": "iequals", "value": "Contract" },
{ "attribute": "${class}", "operation": "iequals", "value": "Representation" },
{ "attribute": "${class}", "operation": "iequals", "value": "DataObject" },
{ "attribute": "${class}", "operation": "matches", "value": "Application.*" },
{ "attribute": "${class}", "operation": "iequals", "value": "Artifact" },
{ "attribute": "${class}", "operation": "matches", "value": "Technology.*" },
{ "attribute": "${class}", "operation": "iequals", "value": "Node" },
{ "attribute": "${class}", "operation": "iequals", "value": "Device" },
{ "attribute": "${class}", "operation": "iequals", "value": "SystemSoftware" },
{ "attribute": "${class}", "operation": "iequals", "value": "Path" },
{ "attribute": "${class}", "operation": "iequals", "value": "CommunicationNetwork" },
{ "attribute": "${class}", "operation": "iequals", "value": "Material" },
{ "attribute": "${class}", "operation": "iequals", "value": "Equipment" },
{ "attribute": "${class}", "operation": "iequals", "value": "Facility" },
{ "attribute": "${class}", "operation": "iequals", "value": "DistributionNetwork" },
{ "attribute": "${class}", "operation": "iequals", "value": "Workpackage" },
{ "attribute": "${class}", "operation": "iequals", "value": "Deliverable" },
{ "attribute": "${class}", "operation": "iequals", "value": "ImplementationEvent" },
{ "attribute": "${class}", "operation": "iequals", "value": "Plateau" },
{ "attribute": "${class}", "operation": "iequals", "value": "Gap" },
{ "attribute": "${class}", "operation": "iequals", "value": "Stakeholder" },
{ "attribute": "${class}", "operation": "iequals", "value": "Driver" },
{ "attribute": "${class}", "operation": "iequals", "value": "Assessment" },
{ "attribute": "${class}", "operation": "iequals", "value": "Goal" },
{ "attribute": "${class}", "operation": "iequals", "value": "Outcome" },
{ "attribute": "${class}", "operation": "iequals", "value": "Principle" },
{ "attribute": "${class}", "operation": "iequals", "value": "Requirement" },
{ "attribute": "${class}", "operation": "iequals", "value": "Constraint" },
{ "attribute": "${class}", "operation": "iequals", "value": "Meaning" },
{ "attribute": "${class}", "operation": "iequals", "value": "Value" },
{ "attribute": "${class}", "operation": "iequals", "value": "Location" }
]
}
The following filter may be used to retrieve all the relationships:
"filter": {
"tests": [
{ "attribute": "${class}", "operation": "matches", "value": ".*Relationship" }
]
}
The following filter may be used to retrieve all the assignment and realization relationships that have a device or a node as a source and have a system software or an application component as target:
"filter": {
"genre": "AND",
"tests": [
{ "attribute": "${class}", "operation": "in", "value": "AssignmentRelationship,RealizationRelationship" },
{ "attribute": "${source:class}", "operation": "in", "value": "Device,Node" },
{ "attribute": "${target:class}", "operation": "in", "value": "SystemSoftware,ApplicationComponent" }
]
}