31 include_once
'class.ilMDBase.php';
45 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
51 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
58 $tax->setMetaId($a_taxon_id);
64 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
68 $tax->setParentType(
'meta_taxon_path');
76 $this->source = $a_source;
84 if(is_object($lng_obj))
86 $this->source_language = $lng_obj;
91 return is_object($this->source_language) ? $this->source_language :
false;
95 return is_object($this->source_language) ? $this->source_language->getLanguageCode() :
false;
104 $fields[
'meta_taxon_path_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_taxon_path'));
106 if($this->db->insert(
'il_meta_taxon_path',$fields))
120 if($this->db->update(
'il_meta_taxon_path',
121 $this->__getFields(),
122 array(
"meta_taxon_path_id" => array(
'integer',$this->
getMetaId()))))
136 $query =
"DELETE FROM il_meta_taxon_path ".
137 "WHERE meta_taxon_path_id = ".$ilDB->quote($this->
getMetaId(),
'integer');
154 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
155 'obj_id' => array(
'integer',$this->
getObjId()),
156 'obj_type' => array(
'text',$this->
getObjType()),
158 'parent_id' => array(
'integer',$this->
getParentId()),
159 'source' => array(
'text',$this->
getSource()),
167 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
171 $query =
"SELECT * FROM il_meta_taxon_path ".
172 "WHERE meta_taxon_path_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
196 $writer->xmlStartTag(
'TaxonPath');
205 foreach($taxs as $id)
208 $tax->toXML($writer);
212 include_once
'Services/MetaData/classes/class.ilMDTaxon.php';
214 $tax->toXML($writer);
217 $writer->xmlEndTag(
'TaxonPath');
223 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
227 $query =
"SELECT meta_taxon_path_id FROM il_meta_taxon_path ".
228 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
229 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
230 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
231 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text');
236 $ids[] =
$row->meta_taxon_path_id;
238 return $ids ? $ids : array();