Class $k.PropertyFilter
Filters the possible properties of an element or domain.
- Defined in: PropertyFilter.js
Constructor Attributes | Constructor Name and Description |
---|---|
$k.PropertyFilter(filterDescriptor)
Creates a new PropertyFilter.
|
Method Summary
Class Detail
$k.PropertyFilter(filterDescriptor)
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
// Returns a filter that returns properties with internal name "contains" $k.PropertyFilter({ exact: true, type: "contains" });
- Parameters:
- {object} filterDescriptor Optional
Method Detail
-
{boolean} includeAbstract()Returns true if abstract properties should be returned. Default is false.
- Returns:
- {boolean}
-
{boolean} includeAttributes()Returns true if attributes should be returned
- Returns:
- {boolean}
-
{boolean} includeOneWay()Returns true if inverse one way relations should be returned. Default is false.
- Returns:
- {boolean}
-
{boolean} includeShortcutRelations()Returns true if shortcut relations should be returned. Default is false.
- Returns:
- {boolean}
-
{boolean} includeSystemRelations()Returns true if system relations should be returned. Default is false.
- Returns:
- {boolean}
-
{boolean} includeUserRelations()Returns true if user relations should be returned
- Returns:
- {boolean}
-
{boolean} isExact()Returns true if only properties of the specified type should be returned, false if also sub-properties should be included. Default is false.
- Returns:
- {boolean}
-
Returns the possible properties of the semantic element / domain
- Parameters:
- {$k.SemanticElement} object
- Semantic element or domain
- Returns:
- {$k.PropertyType[]}
-
Returns the properties of the semantic element
- Parameters:
- {$k.SemanticElement} semanticElement
- Returns:
- {$k.PropertyType[]}
-
Defines if abstract properties are returned.
- Parameters:
- {boolean} abstract
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines if attributes should be returned. Default is true
- Parameters:
- {boolean} isExact
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines if only properties of the specified type should be returned, or also sub-properties.
- Parameters:
- {boolean} exact
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines if inverse one way relations should be returned.
- Parameters:
- {boolean} oneWayRelations
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines if shortcut relations should be returned.
- Parameters:
- {boolean} shortcutRelations
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines if shortcut relations should be returned.
- Parameters:
- {boolean} systemRelations
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines the type / internal name of the properties
- Parameters:
- type
- Type or internal name
- Returns:
- {$k.PropertyFilter} The filter
-
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:
- {boolean} additionalOnly
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
Defines if user relations should be returned. Default is true
- Parameters:
- {boolean} isExact
- True if not defined
- Returns:
- {$k.PropertyFilter} The filter
-
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:
- {$k.PropertyFilter}
-
type()Returns the type / internal name that should be used for filtering properties
- Returns:
-
{boolean} unconstrained()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:
- {boolean}