new $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
| Name | Type | Description | 
|---|---|---|
filterDescriptor | 
            
            
            object | optional | 
Example
// 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.
Returns:
| Type | Description | 
|---|---|
| boolean | 
includeAttributes() : boolean
Returns true if attributes should be returned
Returns:
| Type | Description | 
|---|---|
| boolean | 
includeOneWay() : boolean
Returns true if inverse one way relations should be returned.
Default is false.
Returns:
| Type | Description | 
|---|---|
| boolean | 
includeShortcutRelations() : boolean
Returns true if shortcut relations should be returned.
Default is false.
Returns:
| Type | Description | 
|---|---|
| boolean | 
includeSystemRelations() : boolean
Returns true if system relations should be returned.
Default is false.
Returns:
| Type | Description | 
|---|---|
| boolean | 
includeUserRelations() : boolean
Returns true if user relations should be returned
Returns:
| Type | Description | 
|---|---|
| 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.
Returns:
| Type | Description | 
|---|---|
| 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  | 
        
Returns:
| Type | Description | 
|---|---|
| Array.<$k.PropertyType> | 
propertiesOf(semanticElement) : Array.<$k.PropertyType>
Returns the properties of the semantic element
| Name | Type | Description | 
|---|---|---|
semanticElement | 
            
            
            $k.SemanticElement | 
Returns:
| Type | Description | 
|---|---|
| Array.<$k.PropertyType> | 
setAbstract(abstract) : $k.PropertyFilter
Defines if abstract properties are returned.
| Name | Type | Description | 
|---|---|---|
abstract | 
            
            
            boolean | 
                
                 True if not defined  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
setAttributes(attributes) : $k.PropertyFilter
Defines if attributes should be returned.
Default is true
| Name | Type | Description | 
|---|---|---|
attributes | 
            
            
            boolean | 
                
                 True if not defined  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
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  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
setOneWayRelations(oneWayRelations) : $k.PropertyFilter
Defines if inverse one way relations should be returned.
| Name | Type | Description | 
|---|---|---|
oneWayRelations | 
            
            
            boolean | 
                
                 True if not defined  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
setShortcutRelations(shortcutRelations) : $k.PropertyFilter
Defines if shortcut relations should be returned.
| Name | Type | Description | 
|---|---|---|
shortcutRelations | 
            
            
            boolean | 
                
                 True if not defined  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
setSystemRelations(systemRelations) : $k.PropertyFilter
Defines if shortcut relations should be returned.
| Name | Type | Description | 
|---|---|---|
systemRelations | 
            
            
            boolean | 
                
                 True if not defined  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
setType(type) : $k.PropertyFilter
Defines the type / internal name of the properties
| Name | Type | Description | 
|---|---|---|
type | 
            
            
            
                
                 Type or internal name  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
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  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
setUserRelations(userRelations) : $k.PropertyFilter
Defines if user relations should be returned.
Default is true
| Name | Type | Description | 
|---|---|---|
userRelations | 
            
            
            boolean | 
                
                 True if not defined  | 
        
Returns:
| Type | Description | 
|---|---|
| $k.PropertyFilter | The filter | 
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 | Description | 
|---|---|
| $k.PropertyFilter | 
type() : string|$k.Type
Returns the type / internal name that should be used for filtering properties
Returns:
| Type | Description | 
|---|---|
| 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
Returns:
| Type | Description | 
|---|---|
| boolean |