public function getProperties($p_array) { //param0: category name $reqfilter = new SMWRequestOptions(); $reqfilter->sort = true; $cat = Title::newFromText($p_array[0], NS_CATEGORY); $onlyDirect = $p_array[1] == "true"; $dIndex = $p_array[2]; $properties = smwfGetSemanticStore()->getPropertiesWithSchemaByCategory($cat, $onlyDirect, $dIndex, $reqfilter); return SMWOntologyBrowserXMLGenerator::encapsulateAsPropertyList($properties); }
/** * Filters for properties containg the given hint as substring (case-insensitive) * Returns an property list with all entities found * * @return xml string */ function filterForProperties($propertyHints) { $reqfilter = new SMWRequestOptions(); $reqfilter->sort = true; //$reqfilter->limit = MAX_RESULTS; if (count($propertyHints) == 0) { return "<propertyList isEmpty=\"true\" textToDisplay=\"" . wfMsg('smw_ob_no_properties') . "\"/>"; } foreach ($propertyHints as $hint) { $reqfilter->addStringCondition($hint, SMWStringCondition::STRCOND_MID); } $reqfilter->isCaseSensitive = false; $foundProperties = smwfGetSemanticStore()->getPropertiesWithSchemaByName($reqfilter); return SMWOntologyBrowserXMLGenerator::encapsulateAsPropertyList($foundProperties); }