new PropertyFilter(filterDescriptoropt)
Creates a new PropertyFilter. If the constructer is called as a function, it will construct a new filter, too.
The filter will be initialized from the optional filterDescriptor. The possible properties are:
type (Type or internal name)
abstract
attributes
exact
oneWayRelations
shortcutRelations
systemRelations
unconstrained
userRelations
| Name | Type | Attributes | Description | 
|---|---|---|---|
filterDescriptor | object | <optional> | 
// Returns a filter that returns properties with internal name "contains"
$k.PropertyFilter({ exact: true, type: "contains" });
Filters the possible properties of an element or domain.Methods
includeAbstract() → {boolean}
Returns true if abstract properties should be returned. Default is false.
- Type:
 - boolean
 
includeAttributes() → {boolean}
Returns true if attributes should be returned
- Type:
 - boolean
 
includeOneWay() → {boolean}
Returns true if inverse one way relations should be returned. Default is false.
- Type:
 - boolean
 
includeShortcutRelations() → {boolean}
Returns true if shortcut relations should be returned. Default is false.
- Type:
 - boolean
 
includeSystemRelations() → {boolean}
Returns true if system relations should be returned. Default is false.
- Type:
 - boolean
 
includeUserRelations() → {boolean}
Returns true if user relations should be returned
- Type:
 - boolean
 
isExact() → {boolean}
Returns true if only properties of the specified type should be returned, false if also sub-properties should be included. Default is false.
- Type:
 - boolean
 
possiblePropertiesOf(object) → {Array.<$k.PropertyType>}
Returns the possible properties of the semantic element / domain
| Name | Type | Description | 
|---|---|---|
object | $k.SemanticElement | Semantic element or domain  | 
- Type:
 - Array.<$k.PropertyType>
 
propertiesOf(semanticElement) → {Array.<$k.PropertyType>}
Returns the properties of the semantic element
| Name | Type | Description | 
|---|---|---|
semanticElement | $k.SemanticElement | 
- Type:
 - Array.<$k.PropertyType>
 
setAbstract(abstract) → {$k.PropertyFilter}
Defines if abstract properties are returned.
| Name | Type | Description | 
|---|---|---|
abstract | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setAttributes(attributes) → {$k.PropertyFilter}
Defines if attributes should be returned. Default is true
| Name | Type | Description | 
|---|---|---|
attributes | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setExact(exact) → {$k.PropertyFilter}
Defines if only properties of the specified type should be returned, or also sub-properties.
| Name | Type | Description | 
|---|---|---|
exact | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setOneWayRelations(oneWayRelations) → {$k.PropertyFilter}
Defines if inverse one way relations should be returned.
| Name | Type | Description | 
|---|---|---|
oneWayRelations | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setShortcutRelations(shortcutRelations) → {$k.PropertyFilter}
Defines if shortcut relations should be returned.
| Name | Type | Description | 
|---|---|---|
shortcutRelations | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setSystemRelations(systemRelations) → {$k.PropertyFilter}
Defines if shortcut relations should be returned.
| Name | Type | Description | 
|---|---|---|
systemRelations | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setType(type) → {$k.PropertyFilter}
Defines the type / internal name of the properties
| Name | Type | Description | 
|---|---|---|
type | Type or internal name  | 
The filter
- Type:
 - $k.PropertyFilter
 
setUnconstrained(additionalOnly) → {$k.PropertyFilter}
Defines if properties should be returned that cannot be created due to cardinality constrains. This setting only has an effect when quering the possible properties of a semantic element, not of a domain
| Name | Type | Description | 
|---|---|---|
additionalOnly | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
setUserRelations(userRelations) → {$k.PropertyFilter}
Defines if user relations should be returned. Default is true
| Name | Type | Description | 
|---|---|---|
userRelations | boolean | True if not defined  | 
The filter
- Type:
 - $k.PropertyFilter
 
toPropertyFilter() → {$k.PropertyFilter}
Returns this filter. To define custom property filters, define an object with a function toPropertyFilter(). If toPropertyFilter() does not return an object of kind $k.PropertyFilter, the object has to define the functions propertiesOf() and possiblePropertiesOf()
- Type:
 - $k.PropertyFilter
 
type() → {string|$k.Type}
Returns the type / internal name that should be used for filtering properties
- Type:
 - string | $k.Type
 
unconstrained() → {boolean}
Returns true if properties should be returned that cannot be created due to cardinality constrains. This setting only has an effect when quering the possible properties of a semantic element, not of a domain. Default is false
- Type:
 - boolean