public function testCommonMethods()
 {
     $instance = new FilterCondition('filter');
     $this->assertInternalType('string', $instance->getCondition());
     $this->assertInternalType('array', $instance->namespaces);
     $this->assertInternalType('string', $instance->getWeakConditionString());
     $this->assertInternalType('boolean', $instance->isSafe());
 }
 private function createFilterConditionToMatchRegexPattern($dataItem, &$joinVariable, $comparator, $pattern)
 {
     if ($dataItem instanceof DIBlob) {
         return new FilterCondition("{$comparator}( ?{$joinVariable}, \"{$pattern}\", \"s\")", array());
     }
     if ($dataItem instanceof DIUri) {
         return new FilterCondition("{$comparator}( str( ?{$joinVariable} ), \"{$pattern}\", \"i\")", array());
     }
     // Pattern search for a wikipage object can only be done on the sortkey
     // literal and not on it's resource
     $skeyExpElement = Exporter::getInstance()->getSpecialPropertyResource('_SKEY');
     $expElement = $this->exporter->getDataItemExpElement($dataItem->getSortKeyDataItem());
     $condition = new SingletonCondition($expElement);
     $filterVariable = $this->compoundConditionBuilder->getNextVariable();
     $condition->condition = "?{$joinVariable} " . $skeyExpElement->getQName() . " ?{$filterVariable} .\n";
     $condition->matchElement = "?{$joinVariable}";
     $filterCondition = new FilterCondition("{$comparator}( ?{$filterVariable}, \"{$pattern}\", \"s\")", array());
     $condition->weakConditions = array($filterVariable => $filterCondition->getCondition());
     return $condition;
 }