5include_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) {
 
   35            foreach ($items as 
$i) {
 
   38                $this->metadata_found = 
true;
 
   50        $this->title = $a_val;
 
   70        $this->description = $a_val;
 
   89    public function import()
 
   91        if ($this->metadata_found) {
 
  102        include_once 
'Services/MetaData/classes/class.ilMDLanguageItem.php';
 
  104        $this->path[count($this->path)] = $a_name;
 
  112                $this->md_in_md = 
true;
 
  113                $this->in_meta_data = 
true;
 
  118                $this->md_gen = $this->md->addGeneral();
 
  119                $this->md_gen->save();
 
  124                if ($this->
in(
"general")) {
 
  126                    $this->md_ide = $par->addIdentifier();
 
  127                    $this->md_ide->save();
 
  137                if ($this->
in(
"general")) {
 
  139                    $this->md_lan = $par->addLanguage();
 
  140                    $this->md_lan->save();
 
  148                if (strtolower(get_class($par)) == 
'ilmdrights' or
 
  149                    strtolower(get_class($par)) == 
'ilmdannotation' or
 
  150                    strtolower(get_class($par)) == 
'ilmdclassification') {
 
  153                } elseif ($this->
in(
"general")) {
 
  154                    $this->md_des = $par->addDescription();
 
  155                    $this->md_des->save();
 
  161                if ($this->
in(
"general")) {
 
  163                    $this->md_key = $par->addKeyword();
 
  164                    $this->md_key->save();
 
  177                $this->md_lif = $par->addLifecycle();
 
  179                $this->md_lif->save();
 
  385                if ($this->
in(
"general")) {
 
  386                    if ($this->
in(
"title")) {
 
  389                    } elseif ($this->
in(
"description")) {
 
  390                        $this->md_des->setDescriptionLanguage(
new ilMDLanguageItem($a_attribs[
'language']));
 
  391                        $this->md_des->update();
 
  392                    } elseif ($this->
in(
"keyword")) {
 
  393                        $this->md_key->setKeywordLanguage(
new ilMDLanguageItem($a_attribs[
'language']));
 
  394                        $this->md_key->update();
 
  397                if ($this->
in(
"lifeCycle")) {
 
  398                    if ($this->
in(
"version")) {
 
  414        unset($this->path[count($this->path) - 1]);
 
  421                $this->md_parent = array();
 
  422                $this->md_in_md = 
false;
 
  423                $this->in_meta_data = 
false;
 
  433                if ($this->
in(
"general")) {
 
  445                if ($this->
in(
"general")) {
 
  455                if (strtolower(get_class($par)) == 
'ilmddescription') {
 
  466                if ($this->
in(
"general")) {
 
  653                if ($this->
in(
"general")) {
 
  654                    if ($this->
in(
"title")) {
 
  665                    if ($this->
in(
"description")) {
 
  672                        $this->md_des->update();
 
  674                    if ($this->
in(
"keyword")) {
 
  679                if ($this->
in(
"lifeCycle")) {
 
  680                    if ($this->
in(
"version")) {
 
  688                if ($this->
in(
"general")) {
 
  689                    if ($this->
in(
"structure")) {
 
  691                            "atomic" => 
"Atomic",
 
  692                            "collection" => 
"Collection",
 
  693                            "networked" => 
"Networked",
 
  694                            "linear" => 
"Linear",
 
  695                            "hierarchical" => 
"Hierarchical" 
  704                if ($this->
in(
"lifeCycle")) {
 
  705                    if ($this->
in(
"status")) {
 
  708                            "revised" => 
"Revised",
 
  709                            "unavailable" => 
"Unavailable",
 
  714                            $this->md_lif->update();
 
  721                if ($this->
in(
"identifier")) {
 
  723                    $this->md_ide->update();
 
  728                if ($this->
in(
"identifier")) {
 
  730                    $this->md_ide->update();
 
  735        $this->md_chr_data = 
'';
 
  744    public function in($a_name)
 
  747        if (in_array($a_name, $this->path)) {
 
An exception for terminatinating execution or to throw for unit testing.
static _lookupType($a_id, $a_reference=false)
lookup object type
SCORM 13 Metadata importer.
getDescription()
Get description.
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
__construct($a_manifest_dom, $a_obj_id)
Constructor.
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
setTitle($a_val)
Set title.
setDescription($a_val)
Set description.
startParsing()
stores xml data in array