31 include_once
'class.ilMDBase.php';
45 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
51 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
58 $tax->setMetaId($a_taxon_path_id);
64 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
68 $tax->setParentType(
'meta_classification');
75 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
81 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
88 $key->setMetaId($a_keyword_id);
94 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
98 $key->setParentType(
'meta_classification');
111 case 'EducationalObjective':
112 case 'AccessibilityRestrictions':
113 case 'EducationalLevel':
115 case 'SecurityLevel':
117 $this->purpose = $a_purpose;
126 return $this->purpose;
130 $this->description = $a_description;
134 return $this->description;
138 if(is_object($lng_obj))
140 $this->description_language = $lng_obj;
145 return is_object($this->description_language) ? $this->description_language :
false;
149 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false;
158 $fields[
'meta_classification_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_classification'));
160 if($this->db->insert(
'il_meta_classification',$fields))
174 if($this->db->update(
'il_meta_classification',
175 $this->__getFields(),
176 array(
"meta_classification_id" => array(
'integer',$this->
getMetaId()))))
190 $query =
"DELETE FROM il_meta_classification ".
191 "WHERE meta_classification_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
213 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
214 'obj_id' => array(
'integer',$this->
getObjId()),
215 'obj_type' => array(
'text',$this->
getObjType()),
216 'purpose' => array(
'text',$this->
getPurpose()),
225 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
229 $query =
"SELECT * FROM il_meta_classification ".
230 "WHERE meta_classification_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
253 $writer->xmlStartTag(
'Classification',array(
'Purpose' => $this->
getPurpose()
259 foreach($taxs as $id)
262 $tax->toXML($writer);
266 include_once
'Services/MetaData/classes/class.ilMDTaxonPath.php';
268 $tax->toXML($writer);
279 foreach($keys as $id)
282 $key->toXML($writer);
286 include_once
'Services/MetaData/classes/class.ilMDKeyword.php';
288 $key->toXML($writer);
290 $writer->xmlEndTag(
'Classification');
300 $query =
"SELECT meta_classification_id FROM il_meta_classification ".
301 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
302 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
308 $ids[] =
$row->meta_classification_id;
310 return $ids ? $ids : array();