5 include_once
'Services/MetaData/classes/class.ilMDXMLCopier.php';
30 $this->manifest_dom = $a_manifest_dom;
31 $path =
new DOMXpath($a_manifest_dom);
32 $path->registerNamespace(
"ims",
"http://www.imsproject.org/xsd/imscp_rootv1p1p2");
33 $items =
$path->query(
"//ims:manifest/ims:metadata");
34 if($items->length == 1)
39 parent::__construct($a_manifest_dom->saveXML($i), $a_obj_id,$a_obj_id,
ilObject::_lookupType($a_obj_id));
40 $this->metadata_found =
true;
52 $this->title = $a_val;
72 $this->description = $a_val;
93 if ($this->metadata_found)
105 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
107 $this->path[count($this->path)] = $a_name;
117 $this->md_in_md =
true;
118 $this->in_meta_data =
true;
123 $this->md_gen = $this->md->addGeneral();
124 $this->md_gen->save();
129 if ($this->
in(
"general"))
132 $this->md_ide = $par->addIdentifier();
133 $this->md_ide->save();
143 if ($this->
in(
"general"))
146 $this->md_lan = $par->addLanguage();
147 $this->md_lan->save();
155 if(strtolower(get_class($par)) ==
'ilmdrights' or 156 strtolower(get_class($par)) ==
'ilmdannotation' or 157 strtolower(get_class($par)) ==
'ilmdclassification')
162 else if ($this->
in(
"general"))
164 $this->md_des = $par->addDescription();
165 $this->md_des->save();
171 if ($this->
in(
"general"))
174 $this->md_key = $par->addKeyword();
175 $this->md_key->save();
188 $this->md_lif = $par->addLifecycle();
190 $this->md_lif->save();
396 if ($this->
in(
"general"))
398 if ($this->
in(
"title"))
403 else if ($this->
in(
"description"))
405 $this->md_des->setDescriptionLanguage(
new ilMDLanguageItem($a_attribs[
'language']));
406 $this->md_des->update();
408 else if ($this->
in(
"keyword"))
410 $this->md_key->setKeywordLanguage(
new ilMDLanguageItem($a_attribs[
'language']));
411 $this->md_key->update();
414 if ($this->
in(
"lifeCycle"))
416 if ($this->
in(
"version"))
433 unset($this->path[count($this->path) - 1]);
442 $this->md_parent =
array();
443 $this->md_in_md =
false;
444 $this->in_meta_data =
false;
454 if ($this->
in(
"general"))
467 if ($this->
in(
"general"))
478 if(strtolower(get_class($par)) ==
'ilmddescription')
491 if ($this->
in(
"general"))
679 if ($this->
in(
"general"))
681 if ($this->
in(
"title"))
694 if ($this->
in(
"description"))
703 $this->md_des->update();
705 if ($this->
in(
"keyword"))
711 if ($this->
in(
"lifeCycle"))
713 if ($this->
in(
"version"))
722 if ($this->
in(
"general"))
724 if ($this->
in(
"structure"))
727 "atomic" =>
"Atomic",
728 "collection" =>
"Collection",
729 "networked" =>
"Networked",
730 "linear" =>
"Linear",
731 "hierarchical" =>
"Hierarchical" 741 if ($this->
in(
"lifeCycle"))
743 if ($this->
in(
"status"))
747 "revised" =>
"Revised",
748 "unavailable" =>
"Unavailable",
754 $this->md_lif->update();
761 if ($this->
in(
"identifier"))
764 $this->md_ide->update();
769 if ($this->
in(
"identifier"))
772 $this->md_ide->update();
777 $this->md_chr_data =
'';
789 if (in_array($a_name, $this->path))
setDescription($a_val)
Set description.
__construct($a_manifest_dom, $a_obj_id)
Constructor.
startParsing()
stores xml data in array
SCORM 13 Metadata importer.
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
setTitle($a_val)
Set title.
getDescription()
Get description.