/**
  * @param bool $asValue
  *
  * @return string
  */
 public function getQueryString($asValue = false)
 {
     $comparator = QueryLanguage::getStringForComparator($this->comparator);
     $dataValue = DataValueFactory::getInstance()->newDataItemValue($this->dataItem, $this->property);
     if ($asValue) {
         return $comparator . $dataValue->getWikiValue();
     }
     // this only is possible for values of Type:Page
     if ($comparator === '') {
         // some extra care for Category: pages
         return '[[:' . $dataValue->getWikiValue() . ']]';
     }
     return '[[' . $comparator . $dataValue->getWikiValue() . ']]';
 }