$k. PropertyFilter#

new $k.PropertyFilter(filterDescriptoropt)#

Creates a new PropertyFilter. If the constructer is called as a function, it will construct a new filter, too.

Parameters:
NameTypeAttributesDescription
filterDescriptorobject<optional>

If the parameter is omitted, the default values will be used.

Properties
NameTypeAttributesDefaultDescription
type$k.PropertyType | string<optional>

Property type or internal name

abstractboolean<optional>
false

Include abstract properties

exactboolean<optional>
false

Exclude sub types of the specified properties

attributesboolean<optional>
true

Include attributes

userRelationsboolean<optional>
true

Include user relations

oneWayRelationsboolean<optional>
false

Include the virtual inverse relations of one way relations pointing to the object

shortcutRelationsboolean<optional>
false

Include shortcut relations

systemRelationsboolean<optional>
false

Include system relations

unconstrainedboolean<optional>
false

When querying possible properties with this filter, include properties that cannot actually be created due to cardinality constraints (e.g. an attribute that already exists and does not allow multiple occurrences)

Example
CODE
// 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

Returns:
Type: 
boolean

includeAttributes() → {boolean}#

Returns true if attributes should be returned

Returns:
Type: 
boolean

includeOneWay() → {boolean}#

Returns true if inverse one way relations should be returned

Returns:
Type: 
boolean

includeShortcutRelations() → {boolean}#

Returns true if shortcut relations should be returned

Returns:
Type: 
boolean

includeSystemRelations() → {boolean}#

Returns true if system relations should be returned

Returns:
Type: 
boolean

includeUserRelations() → {boolean}#

Returns true if user relations should be returned

Returns:
Type: 
boolean

isExact() → {boolean}#

Returns true if only properties of the specified type should be returned, false if also sub-properties should be included

Returns:
Type: 
boolean

possiblePropertiesOf(object) → {Array.<$k.PropertyType>}#

Returns the possible properties of the semantic element / domain

Parameters:
NameTypeDescription
object$k.SemanticElement | $k.Domain

Semantic element or domain

Returns:
Type: 
Array.<$k.PropertyType>

propertiesOf(semanticElement) → {Array.<$k.PropertyType>}#

Returns the properties of the semantic element

Parameters:
NameTypeDescription
semanticElement$k.SemanticElement
Returns:
Type: 
Array.<$k.PropertyType>

setAbstract(abstractopt) → {$k.PropertyFilter}#

Defines if abstract properties are returned

Parameters:
NameTypeAttributesDefaultDescription
abstractboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setAttributes(attributesopt) → {$k.PropertyFilter}#

Defines if attributes should be returned

Parameters:
NameTypeAttributesDefaultDescription
attributesboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setExact(exactopt) → {$k.PropertyFilter}#

Defines if only properties of the specified type should be returned, or also sub-properties

Parameters:
NameTypeAttributesDefaultDescription
exactboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setOneWayRelations(oneWayRelationsopt) → {$k.PropertyFilter}#

Defines if inverse one way relations should be returned

Parameters:
NameTypeAttributesDefaultDescription
oneWayRelationsboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setShortcutRelations(shortcutRelationsopt) → {$k.PropertyFilter}#

Defines if shortcut relations should be returned

Parameters:
NameTypeAttributesDefaultDescription
shortcutRelationsboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setSystemRelations(systemRelationsopt) → {$k.PropertyFilter}#

Defines if shortcut relations should be returned

Parameters:
NameTypeAttributesDefaultDescription
systemRelationsboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setType(type) → {$k.PropertyFilter}#

Defines the type / internal name of the properties

Parameters:
NameTypeDescription
type$k.PropertyType | string

Type or internal name

Returns:

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.

Parameters:
NameTypeAttributesDefaultDescription
additionalOnlyboolean<optional>
true
Returns:

The filter

Type: 
$k.PropertyFilter

setUserRelations(userRelationsopt) → {$k.PropertyFilter}#

Defines if user relations should be returned

Parameters:
NameTypeAttributesDefaultDescription
userRelationsboolean<optional>
true
Returns:

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()

Returns:
Type: 
$k.PropertyFilter

type() → {$k.PropertyType|string}#

Returns the type / internal name that should be used for filtering properties

Returns:
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

Returns:
Type: 
boolean