32 include_once
'class.ilMDBase.php';
50 function ilMD($a_rbac_id,$a_obj_id,$a_type)
57 include_once
'Services/MetaData/classes/class.ilMDGeneral.php';
70 include_once
'Services/MetaData/classes/class.ilMDGeneral.php';
80 include_once
'Services/MetaData/classes/class.ilMDLifecycle.php';
93 include_once
'Services/MetaData/classes/class.ilMDLifecycle.php';
102 include_once
'Services/MetaData/classes/class.ilMDMetaMetadata.php';
107 $met->setMetaId($id);
115 include_once
'Services/MetaData/classes/class.ilMDMetaMetadata.php';
124 include_once
'Services/MetaData/classes/class.ilMDTechnical.php';
129 $tec->setMetaId($id);
137 include_once
'Services/MetaData/classes/class.ilMDTechnical.php';
146 include_once
'Services/MetaData/classes/class.ilMDEducational.php';
151 $edu->setMetaId($id);
159 include_once
'Services/MetaData/classes/class.ilMDEducational.php';
167 include_once
'Services/MetaData/classes/class.ilMDRights.php';
172 $rig->setMetaId($id);
180 include_once
'Services/MetaData/classes/class.ilMDRights.php';
189 include_once
'Services/MetaData/classes/class.ilMDRelation.php';
195 include_once
'Services/MetaData/classes/class.ilMDRelation.php';
203 $rel->setMetaId($a_relation_id);
209 include_once
'Services/MetaData/classes/class.ilMDRelation.php';
219 include_once
'Services/MetaData/classes/class.ilMDAnnotation.php';
225 if(!$a_annotation_id)
229 include_once
'Services/MetaData/classes/class.ilMDAnnotation.php';
232 $ann->setMetaId($a_annotation_id);
238 include_once
'Services/MetaData/classes/class.ilMDAnnotation.php';
247 include_once
'Services/MetaData/classes/class.ilMDClassification.php';
253 if(!$a_classification_id)
258 include_once
'Services/MetaData/classes/class.ilMDClassification.php';
261 $cla->setMetaId($a_classification_id);
267 include_once
'Services/MetaData/classes/class.ilMDClassification.php';
281 $writer->xmlStartTag(
'MetaData');
287 $gen->toXML($writer);
292 include_once
'Services/MetaData/classes/class.ilMDGeneral.php';
295 $gen->toXML($writer);
302 $lif->toXML($writer);
308 $met->toXML($writer);
314 $tec->toXML($writer);
320 $edu->toXML($writer);
324 if(is_object($rig =& $this->
getRights()))
326 $rig->toXML($writer);
333 $rel->toXML($writer);
340 $ann->toXML($writer);
347 $cla->toXML($writer);
350 $writer->xmlEndTag(
'MetaData');
361 function &
cloneMD($a_rbac_id,$a_obj_id,$a_obj_type)
363 include_once
'Services/MetaData/classes/class.ilMD2XML.php';
368 $md2xml->startExport();
374 include_once
'Services/MetaData/classes/class.ilMDXMLCopier.php';
375 $mdxmlcopier =&
new ilMDXMLCopier($md2xml->getXML(),$a_rbac_id,$a_obj_id,$a_obj_type);
380 return $mdxmlcopier->getMDObject();
387 $tables = array(
'il_meta_annotation',
388 'il_meta_classification',
389 'il_meta_contribute',
390 'il_meta_description',
391 'il_meta_educational',
395 'il_meta_identifier',
396 'il_meta_identifier_',
403 'il_meta_requirement',
406 'il_meta_taxon_path',
410 foreach($tables as $table)
412 $query =
"DELETE FROM ".$table.
" ".
413 "WHERE rbac_id = ".$ilDB->quote($this->
getRBACId()).
" ".
414 "AND obj_id = ".$ilDB->quote($this->
getObjId());