Example #1
0
 /**
  * @see SMWDataValue::loadDataItem()
  * @param $dataitem SMWDataItem
  * @return boolean
  */
 protected function loadDataItem(SMWDataItem $dataItem)
 {
     if ($dataItem instanceof SMWDIUri && $dataItem->getScheme() == 'http' && $dataItem->getHierpart() == 'semantic-mediawiki.org/swivt/1.0' && $dataItem->getQuery() === '') {
         $this->m_isAlias = false;
         $this->m_typeId = $dataItem->getFragment();
         $this->m_realLabel = SMWDataValueFactory::findTypeLabel($this->m_typeId);
         $this->m_caption = $this->m_givenLabel = $this->m_realLabel;
         $this->m_dataitem = $dataItem;
         return true;
     } else {
         return false;
     }
 }