1 /*global $k*/
  2 
  3 /**
  4  * Creates a new PropertyFilter. If the constructer is called as a function, it will construct a new filter, too.
  5  * <p> </p>
  6  * The filter will be initialized from the optional filterDescriptor. The possible properties are:  <pre><code>
  7  * type (Type or internal name)
  8  * abstract
  9  * attributes
 10  * exact
 11  * oneWayRelations
 12  * shortcutRelations
 13  * systemRelations
 14  * unconstrained
 15  * userRelations
 16  * </code></pre>
 17  * <p> </p>
 18  * 
 19  *
 20  * @param {object} [filterDescriptor]
 21  * @example // Returns a filter that returns properties with internal name "contains"
 22  * $k.PropertyFilter({ exact: true, type: "contains" });
 23  *
 24  * @class Filters the possible properties of an element or domain.
 25 **/
 26 $k.PropertyFilter = function(filterDescriptor) { };
 27 
 28 /**
 29  * Returns true if abstract properties should be returned.
 30  * Default is false.
 31  *
 32  * @function
 33  * @returns {boolean}
 34 **/
 35 $k.PropertyFilter.prototype.includeAbstract = function() { };
 36 
 37 /**
 38  * Returns true if attributes should be returned
 39  *
 40  * @function
 41  * @returns {boolean}
 42 **/
 43 $k.PropertyFilter.prototype.includeAttributes = function() { };
 44 
 45 /**
 46  * Returns true if inverse one way relations should be returned.
 47  * Default is false.
 48  *
 49  * @function
 50  * @returns {boolean}
 51 **/
 52 $k.PropertyFilter.prototype.includeOneWay = function() { };
 53 
 54 /**
 55  * Returns true if shortcut relations should be returned.
 56  * Default is false.
 57  *
 58  * @function
 59  * @returns {boolean}
 60 **/
 61 $k.PropertyFilter.prototype.includeShortcutRelations = function() { };
 62 
 63 /**
 64  * Returns true if system relations should be returned.
 65  * Default is false.
 66  *
 67  * @function
 68  * @returns {boolean}
 69 **/
 70 $k.PropertyFilter.prototype.includeSystemRelations = function() { };
 71 
 72 /**
 73  * Returns true if user relations should be returned
 74  *
 75  * @function
 76  * @returns {boolean}
 77 **/
 78 $k.PropertyFilter.prototype.includeUserRelations = function() { };
 79 
 80 /**
 81  * Returns true if only properties of the specified type should be returned,
 82  * false if also sub-properties should be included.
 83  * Default is false.
 84  *
 85  * @function
 86  * @returns {boolean}
 87 **/
 88 $k.PropertyFilter.prototype.isExact = function() { };
 89 
 90 /**
 91  * Returns the possible properties of the semantic element / domain
 92  *
 93  * @function
 94  * @param {$k.SemanticElement} object Semantic element or domain
 95  * @returns {$k.PropertyType[]}
 96 **/
 97 $k.PropertyFilter.prototype.possiblePropertiesOf = function(object) { };
 98 
 99 /**
100  * Returns the properties of the semantic element
101  *
102  * @function
103  * @param {$k.SemanticElement} semanticElement
104  * @returns {$k.PropertyType[]}
105 **/
106 $k.PropertyFilter.prototype.propertiesOf = function(semanticElement) { };
107 
108 /**
109  * Defines if abstract properties are returned.
110  *
111  * @function
112  * @param {boolean} abstract True if not defined
113  * @returns {$k.PropertyFilter} The filter
114 **/
115 $k.PropertyFilter.prototype.setAbstract = function(abstract) { };
116 
117 /**
118  * Defines if attributes should be returned.
119  * Default is true
120  *
121  * @function
122  * @param {boolean} isExact True if not defined
123  * @returns {$k.PropertyFilter} The filter
124 **/
125 $k.PropertyFilter.prototype.setAttributes = function(isExact) { };
126 
127 /**
128  * Defines if only properties of the specified type should be returned, or also sub-properties.
129  *
130  * @function
131  * @param {boolean} exact True if not defined
132  * @returns {$k.PropertyFilter} The filter
133 **/
134 $k.PropertyFilter.prototype.setExact = function(exact) { };
135 
136 /**
137  * Defines if inverse one way relations should be returned.
138  *
139  * @function
140  * @param {boolean} oneWayRelations True if not defined
141  * @returns {$k.PropertyFilter} The filter
142 **/
143 $k.PropertyFilter.prototype.setOneWayRelations = function(oneWayRelations) { };
144 
145 /**
146  * Defines if shortcut relations should be returned.
147  *
148  * @function
149  * @param {boolean} shortcutRelations True if not defined
150  * @returns {$k.PropertyFilter} The filter
151 **/
152 $k.PropertyFilter.prototype.setShortcutRelations = function(shortcutRelations) { };
153 
154 /**
155  * Defines if shortcut relations should be returned.
156  *
157  * @function
158  * @param {boolean} systemRelations True if not defined
159  * @returns {$k.PropertyFilter} The filter
160 **/
161 $k.PropertyFilter.prototype.setSystemRelations = function(systemRelations) { };
162 
163 /**
164  * Defines the type / internal name of the properties
165  *
166  * @function
167  * @param type Type or internal name
168  * @returns {$k.PropertyFilter} The filter
169 **/
170 $k.PropertyFilter.prototype.setType = function(type) { };
171 
172 /**
173  * Defines if properties should be returned that cannot be created due to cardinality constrains.
174  * This setting only has an effect when quering the possible properties of a semantic element, not of a domain
175  *
176  * @function
177  * @param {boolean} additionalOnly True if not defined
178  * @returns {$k.PropertyFilter} The filter
179 **/
180 $k.PropertyFilter.prototype.setUnconstrained = function(additionalOnly) { };
181 
182 /**
183  * Defines if user relations should be returned.
184  * Default is true
185  *
186  * @function
187  * @param {boolean} isExact True if not defined
188  * @returns {$k.PropertyFilter} The filter
189 **/
190 $k.PropertyFilter.prototype.setUserRelations = function(isExact) { };
191 
192 /**
193  * Returns this filter.
194  * To define custom property filters, define an object with a function toPropertyFilter().
195  * If toPropertyFilter() does not return an object of kind $k.PropertyFilter, the object has to define the functions
196  * propertiesOf() and possiblePropertiesOf()
197  *
198  * @function
199  * @returns {$k.PropertyFilter}
200 **/
201 $k.PropertyFilter.prototype.toPropertyFilter = function() { };
202 
203 /**
204  * Returns the type / internal name that should be used for filtering properties
205  *
206  * @function
207  * @returns
208 **/
209 $k.PropertyFilter.prototype.type = function() { };
210 
211 /**
212  * Returns true if properties should be returned that cannot be created due to cardinality constrains.
213  * This setting only has an effect when quering the possible properties of a semantic element, not of a domain.
214  * Default is false
215  *
216  * @function
217  * @returns {boolean}
218 **/
219 $k.PropertyFilter.prototype.unconstrained = function() { };
220 
221