ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilMediaObjectsExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Export/classes/class.ilXmlExporter.php");
5
14{
15 private $ds;
16
20 function init()
21 {
22 include_once("./Services/MediaObjects/classes/class.ilMediaObjectDataSet.php");
23 $this->ds = new ilMediaObjectDataSet();
24 $this->ds->setDSPrefix("ds");
25 }
26
35 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
36 {
37 $md_ids = array();
38 foreach ($a_ids as $mob_id)
39 {
40 $md_ids[] = "0:".$mob_id.":mob";
41 }
42
43 return array (
44 array(
45 "component" => "Services/MetaData",
46 "entity" => "md",
47 "ids" => $md_ids)
48 );
49 }
50
59 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
60 {
62 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
63 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
64 }
65
73 function getValidSchemaVersions($a_entity)
74 {
75 return array (
76 "5.1.0" => array(
77 "namespace" => "http://www.ilias.de/Services/MediaObjects/mob/5_1",
78 "xsd_file" => "ilias_mob_5_1.xsd",
79 "uses_dataset" => true,
80 "min" => "5.1.0",
81 "max" => ""),
82 "4.3.0" => array(
83 "namespace" => "http://www.ilias.de/Services/MediaObjects/mob/4_3",
84 "xsd_file" => "ilias_mob_4_3.xsd",
85 "uses_dataset" => true,
86 "min" => "4.3.0",
87 "max" => ""),
88 "4.1.0" => array(
89 "namespace" => "http://www.ilias.de/Services/MediaObjects/mob/4_1",
90 "xsd_file" => "ilias_mob_4_1.xsd",
91 "uses_dataset" => true,
92 "min" => "4.1.0",
93 "max" => "")
94 );
95 }
96
97}
98
99?>
Media Pool Data set class.
Export2 class for media pools.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Xml Exporter class.
getAbsoluteExportDirectory()
Get absolute export directory.