new $k.PropertyFilter(filterDescriptoropt)#
Creates a new PropertyFilter. If the constructer is called as a function, it will construct a new filter, too.
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filterDescriptor | object | <optional> | If the parameter is omitted, the default values will be used. Properties
|
// Returns a filter that returns properties with internal name "contains" $k.PropertyFilter({ exact: true, type: "contains" });
Methods#
includeAbstract() → {boolean}#
Returns true if abstract properties should be returned
- 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
- Type:
- boolean
includeShortcutRelations() → {boolean}#
Returns true if shortcut relations should be returned
- Type:
- boolean
includeSystemRelations() → {boolean}#
Returns true if system relations should be returned
- 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
- Type:
- boolean
possiblePropertiesOf(object) → {Array.<$k.PropertyType>}#
Returns the possible properties of the semantic element / domain
Name | Type | Description |
---|---|---|
object | $k. | 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. |
- Type:
- Array.<$k.PropertyType>
setAbstract(abstractopt) → {$k.PropertyFilter}#
Defines if abstract properties are returned
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
abstract | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setAttributes(attributesopt) → {$k.PropertyFilter}#
Defines if attributes should be returned
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
attributes | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setExact(exactopt) → {$k.PropertyFilter}#
Defines if only properties of the specified type should be returned, or also sub-properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
exact | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setOneWayRelations(oneWayRelationsopt) → {$k.PropertyFilter}#
Defines if inverse one way relations should be returned
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
oneWayRelations | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setShortcutRelations(shortcutRelationsopt) → {$k.PropertyFilter}#
Defines if shortcut relations should be returned
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
shortcutRelations | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setSystemRelations(systemRelationsopt) → {$k.PropertyFilter}#
Defines if shortcut relations should be returned
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
systemRelations | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setType(type) → {$k.PropertyFilter}#
Defines the type / internal name of the properties
Name | Type | Description |
---|---|---|
type | $k. | Type or internal name |
The filter
- Type:
- $k.
PropertyFilter
setUnconstrained(additionalOnlyopt) → {$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 | Attributes | Default | Description |
---|---|---|---|---|
additionalOnly | boolean | <optional> | true |
The filter
- Type:
- $k.
PropertyFilter
setUserRelations(userRelationsopt) → {$k.PropertyFilter}#
Defines if user relations should be returned
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
userRelations | boolean | <optional> | true |
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() → {$k.PropertyType|string}#
Returns the type / internal name that should be used for filtering properties
- Type:
- $k.
PropertyType |string
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