@@ -99,6 +99,10 @@ |
||
99 | 99 | return SMW_CATEGORY_QUERY; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param integer $maxsize |
|
104 | + * @param integer $maxdepth |
|
105 | + */ |
|
102 | 106 | public function prune( &$maxsize, &$maxdepth, &$log ) { |
103 | 107 | |
104 | 108 | if ( $maxsize >= $this->getSize() ) { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param integer $mode a constant defining what to printout |
46 | 46 | * @param string $label the string label to describe this printout |
47 | 47 | * @param mixed $data optional data for specifying some request, might be a property object, title, or something else; interpretation depends on $mode |
48 | - * @param mixed $outputformat optional string for specifying an output format, e.g. an output unit |
|
48 | + * @param string $outputformat optional string for specifying an output format, e.g. an output unit |
|
49 | 49 | * @param array|null $params optional array of further, named parameters for the print request |
50 | 50 | */ |
51 | 51 | public function __construct( $mode, $label, $data = null, $outputformat = false, array $params = null ) { |
@@ -129,6 +129,8 @@ discard block |
||
129 | 129 | |
130 | 130 | /** |
131 | 131 | * Convenience method for accessing the text in either HTML or Wiki format. |
132 | + * @param integer $outputmode |
|
133 | + * @return string |
|
132 | 134 | */ |
133 | 135 | public function getText( $outputmode, $linker = null ) { |
134 | 136 | switch ( $outputmode ) { |
@@ -266,7 +268,7 @@ discard block |
||
266 | 268 | /** |
267 | 269 | * Returns the value of a named parameter. |
268 | 270 | * |
269 | - * @param $key string the name of the parameter key |
|
271 | + * @param string $key string the name of the parameter key |
|
270 | 272 | * |
271 | 273 | * @return string Value of the paramer, if set (else FALSE) |
272 | 274 | */ |
@@ -286,7 +288,7 @@ discard block |
||
286 | 288 | /** |
287 | 289 | * Sets a print request parameter. |
288 | 290 | * |
289 | - * @param $key string Name of the parameter |
|
291 | + * @param string $key string Name of the parameter |
|
290 | 292 | * @param $value string Value for the parameter |
291 | 293 | */ |
292 | 294 | public function setParameter( $key, $value ) { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @since 1.9 |
50 | 50 | * |
51 | - * @return array |
|
51 | + * @return DIProperty |
|
52 | 52 | */ |
53 | 53 | public function getProperty() { |
54 | 54 | return new DIProperty( '_ASK' ); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @since 1.9 |
61 | 61 | * |
62 | - * @return SemanticData |
|
62 | + * @return \SMWDIContainer |
|
63 | 63 | */ |
64 | 64 | public function getContainer() { |
65 | 65 | return $this->subobject->getContainer(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @since 1.9 |
72 | 72 | * |
73 | - * @return SemanticData |
|
73 | + * @return \SMWContainerSemanticData |
|
74 | 74 | */ |
75 | 75 | public function getSemanticData() { |
76 | 76 | return $this->subobject->getSemanticData(); |
@@ -442,7 +442,6 @@ discard block |
||
442 | 442 | * Extend the given SPARQL condition by a suitable order by variable, |
443 | 443 | * possibly adding conditions if required for the type of data. |
444 | 444 | * |
445 | - * @param Condition $sparqlCondition condition to modify |
|
446 | 445 | * @param string $mainVariable the variable that represents the value to be ordered |
447 | 446 | * @param integer $diType DataItem type id |
448 | 447 | */ |
@@ -487,6 +486,9 @@ discard block |
||
487 | 486 | } |
488 | 487 | } |
489 | 488 | |
489 | + /** |
|
490 | + * @param string $propertyKey |
|
491 | + */ |
|
490 | 492 | private function addOrderForUnknownPropertyKey( Condition &$condition, $propertyKey ) { |
491 | 493 | |
492 | 494 | if ( $propertyKey === '' ) { // order by result page sortkey |
@@ -8,14 +8,12 @@ discard block |
||
8 | 8 | use SMW\DIWikiPage; |
9 | 9 | use SMW\CircularReferenceGuard; |
10 | 10 | use SMW\PropertyHierarchyLookup; |
11 | -use SMW\SPARQLStore\HierarchyFinder; |
|
12 | 11 | use SMW\Query\Language\Description; |
13 | 12 | use SMW\Query\Language\SomeProperty; |
14 | 13 | use SMW\Query\Language\ThingDescription; |
15 | 14 | use SMW\SPARQLStore\QueryEngine\Condition\Condition; |
16 | 15 | use SMW\SPARQLStore\QueryEngine\Condition\SingletonCondition; |
17 | 16 | use SMW\SPARQLStore\QueryEngine\Condition\TrueCondition; |
18 | - |
|
19 | 17 | use SMW\SPARQLStore\QueryEngine\Interpreter\DispatchingDescriptionInterpreter; |
20 | 18 | use SMW\SPARQLStore\QueryEngine\Interpreter\ClassDescriptionInterpreter; |
21 | 19 | use SMW\SPARQLStore\QueryEngine\Interpreter\ThingDescriptionInterpreter; |
@@ -25,7 +23,6 @@ discard block |
||
25 | 23 | use SMW\SPARQLStore\QueryEngine\Interpreter\NamespaceDescriptionInterpreter; |
26 | 24 | use SMW\SPARQLStore\QueryEngine\Interpreter\ValueDescriptionInterpreter; |
27 | 25 | use SMW\SPARQLStore\QueryEngine\Interpreter\ConceptDescriptionInterpreter; |
28 | - |
|
29 | 26 | use SMWDataItem as DataItem; |
30 | 27 | use SMWExpElement as ExpElement; |
31 | 28 | use SMWExpNsResource as ExpNsResource; |
@@ -82,6 +82,9 @@ discard block |
||
82 | 82 | return $result; |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param string $joinVariable |
|
87 | + */ |
|
85 | 88 | private function mapCategoriesToConditionElements( array $categories, $joinVariable ) { |
86 | 89 | |
87 | 90 | $condition = ''; |
@@ -109,6 +112,9 @@ discard block |
||
109 | 112 | return array( $condition, $namespaces ); |
110 | 113 | } |
111 | 114 | |
115 | + /** |
|
116 | + * @param string $categoryExpName |
|
117 | + */ |
|
112 | 118 | private function tryToAddClassHierarchyPattern( $category, &$categoryExpName ) { |
113 | 119 | |
114 | 120 | if ( !$this->compoundConditionBuilder->canUseQFeature( SMW_SPARQL_QF_SUBC ) ) { |
@@ -100,6 +100,10 @@ discard block |
||
100 | 100 | return $result; |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @param string $joinVariable |
|
105 | + * @param \SMW\DIProperty|null $orderByProperty |
|
106 | + */ |
|
103 | 107 | private function doPreliminarySubDescriptionCheck( $subDescriptions, $joinVariable, $orderByProperty ) { |
104 | 108 | |
105 | 109 | $count = count( $subDescriptions ); |
@@ -126,6 +130,9 @@ discard block |
||
126 | 130 | return null; |
127 | 131 | } |
128 | 132 | |
133 | + /** |
|
134 | + * @param string $joinVariable |
|
135 | + */ |
|
129 | 136 | private function doResolveSubDescriptionsRecursively( $subDescriptions, $joinVariable ) { |
130 | 137 | |
131 | 138 | // Using a stdClass as data container for simpler handling in follow-up tasks |
@@ -195,6 +202,9 @@ discard block |
||
195 | 202 | return $subConditionElements; |
196 | 203 | } |
197 | 204 | |
205 | + /** |
|
206 | + * @param \stdClass $subConditionElements |
|
207 | + */ |
|
198 | 208 | private function createConditionFromSubConditionElements( $subConditionElements ) { |
199 | 209 | |
200 | 210 | if ( $subConditionElements->singletonMatchElement instanceof ExpElement ) { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SMW\Query\Language\Description; |
6 | 6 | use SMW\Query\Language\Disjunction; |
7 | 7 | use SMW\SPARQLStore\QueryEngine\CompoundConditionBuilder; |
8 | -use SMW\SPARQLStore\QueryEngine\Condition\Condition; |
|
9 | 8 | use SMW\SPARQLStore\QueryEngine\Condition\FalseCondition; |
10 | 9 | use SMW\SPARQLStore\QueryEngine\Condition\FilterCondition; |
11 | 10 | use SMW\SPARQLStore\QueryEngine\Condition\SingletonCondition; |
@@ -107,6 +107,10 @@ discard block |
||
107 | 107 | return $result; |
108 | 108 | } |
109 | 109 | |
110 | + /** |
|
111 | + * @param string $joinVariable |
|
112 | + * @param \SMW\DIProperty|null $orderByProperty |
|
113 | + */ |
|
110 | 114 | private function doPreliminarySubDescriptionCheck( $subDescriptions, $joinVariable, $orderByProperty ) { |
111 | 115 | |
112 | 116 | $count = count( $subDescriptions ); |
@@ -131,6 +135,10 @@ discard block |
||
131 | 135 | return null; |
132 | 136 | } |
133 | 137 | |
138 | + /** |
|
139 | + * @param string $joinVariable |
|
140 | + * @param \SMW\DIProperty|null $orderByProperty |
|
141 | + */ |
|
134 | 142 | private function doResolveSubDescriptionsRecursively( $subDescriptions, $joinVariable, $orderByProperty ) { |
135 | 143 | |
136 | 144 | // Using a stdClass as data container for simpler handling in follow-up tasks |
@@ -213,6 +221,9 @@ discard block |
||
213 | 221 | return $subConditionElements; |
214 | 222 | } |
215 | 223 | |
224 | + /** |
|
225 | + * @param string $joinVariable |
|
226 | + */ |
|
216 | 227 | private function createConditionFromSubConditionElements( $subConditionElements, $joinVariable ) { |
217 | 228 | |
218 | 229 | if ( $subConditionElements->unionCondition === '' ) { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SMW\Query\Language\Description; |
6 | 6 | use SMW\Query\Language\Disjunction; |
7 | 7 | use SMW\SPARQLStore\QueryEngine\CompoundConditionBuilder; |
8 | -use SMW\SPARQLStore\QueryEngine\Condition\Condition; |
|
9 | 8 | use SMW\SPARQLStore\QueryEngine\Condition\FalseCondition; |
10 | 9 | use SMW\SPARQLStore\QueryEngine\Condition\FilterCondition; |
11 | 10 | use SMW\SPARQLStore\QueryEngine\Condition\SingletonCondition; |
@@ -150,6 +150,9 @@ discard block |
||
150 | 150 | return array( $innerOrderByProperty, $innerCondition, $innerJoinVariable ); |
151 | 151 | } |
152 | 152 | |
153 | + /** |
|
154 | + * @param string $innerJoinVariable |
|
155 | + */ |
|
153 | 156 | private function findObjectNameFromInnerCondition( $innerCondition, $innerJoinVariable, &$namespaces ) { |
154 | 157 | |
155 | 158 | if ( !$innerCondition instanceof SingletonCondition ) { |
@@ -201,6 +204,10 @@ discard block |
||
201 | 204 | return TurtleSerializer::getTurtleNameForExpElement( $propertyExpElement ); |
202 | 205 | } |
203 | 206 | |
207 | + /** |
|
208 | + * @param string $objectName |
|
209 | + * @param string $joinVariable |
|
210 | + */ |
|
204 | 211 | private function doExchangeForWhenInversePropertyIsUsed( DIProperty $property, $objectName, $joinVariable ) { |
205 | 212 | |
206 | 213 | $subjectName = '?' . $joinVariable; |
@@ -239,6 +246,7 @@ discard block |
||
239 | 246 | * can be found using the "zero or more" will resolve the complete path |
240 | 247 | * |
241 | 248 | * @see http://www.w3.org/TR/sparql11-query/#propertypath-arbitrary-length |
249 | + * @param string $propertyName |
|
242 | 250 | */ |
243 | 251 | private function tryToAddPropertyPathForSaturatedHierarchy( &$condition, DIProperty $property, &$propertyName ) { |
244 | 252 |
@@ -104,10 +104,18 @@ discard block |
||
104 | 104 | ); |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string $joinVariable |
|
109 | + * @param DIProperty|null $orderByProperty |
|
110 | + */ |
|
107 | 111 | private function createConditionForEmptyComparator( $joinVariable, $orderByProperty ) { |
108 | 112 | return $this->compoundConditionBuilder->newTrueCondition( $joinVariable, $orderByProperty ); |
109 | 113 | } |
110 | 114 | |
115 | + /** |
|
116 | + * @param string $joinVariable |
|
117 | + * @param DIProperty|null $orderByProperty |
|
118 | + */ |
|
111 | 119 | private function createConditionForEqualityComparator( $dataItem, $property, $joinVariable, $orderByProperty ) { |
112 | 120 | |
113 | 121 | $expElement = $this->exporter->getDataItemHelperExpElement( $dataItem ); |
@@ -153,6 +161,11 @@ discard block |
||
153 | 161 | return $condition; |
154 | 162 | } |
155 | 163 | |
164 | + /** |
|
165 | + * @param string $joinVariable |
|
166 | + * @param DIProperty|null $orderByProperty |
|
167 | + * @param string $comparator |
|
168 | + */ |
|
156 | 169 | private function createConditionForRegexComparator( $dataItem, $joinVariable, $orderByProperty, $comparator ) { |
157 | 170 | |
158 | 171 | if ( !$dataItem instanceof DIBlob && !$dataItem instanceof DIWikiPage && !$dataItem instanceof DIUri ) { |
@@ -196,6 +209,9 @@ discard block |
||
196 | 209 | return $condition; |
197 | 210 | } |
198 | 211 | |
212 | + /** |
|
213 | + * @param string $comparator |
|
214 | + */ |
|
199 | 215 | private function createFilterConditionForAnyOtherComparator( $dataItem, $joinVariable, $orderByProperty, $comparator ) { |
200 | 216 | |
201 | 217 | $result = new FilterCondition( '', array() ); |
@@ -228,6 +244,9 @@ discard block |
||
228 | 244 | return $result; |
229 | 245 | } |
230 | 246 | |
247 | + /** |
|
248 | + * @param string $pattern |
|
249 | + */ |
|
231 | 250 | private function createFilterConditionToMatchRegexPattern( $dataItem, &$joinVariable, $comparator, $pattern ) { |
232 | 251 | |
233 | 252 | if ( $dataItem instanceof DIBlob ) { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SMW\SPARQLStore\QueryEngine\QueryEngine; |
6 | 6 | use SMW\SPARQLStore\QueryEngine\EngineOptions; |
7 | 7 | use SMW\SPARQLStore\QueryEngine\QueryResultFactory; |
8 | -use SMW\DIProperty; |
|
9 | 8 | use SMWQuery as Query; |
10 | 9 | |
11 | 10 | /** |