37 include_once
'./Services/Xml/classes/class.ilSaxParser.php';
66 parent::__construct($a_xml_file);
85 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
89 $this->md_in_md =
true;
94 $this->md_gen =&$this->md->addGeneral();
95 $this->md_gen->setStructure($a_attribs[
'Structure']);
96 $this->md_gen->save();
102 $this->md_ide =&$par->addIdentifier();
103 $this->md_ide->setCatalog($a_attribs[
'Catalog']);
104 $this->md_ide->setEntry($a_attribs[
'Entry']);
105 $this->md_ide->save();
116 $this->md_lan =&$par->addLanguage();
118 $this->md_lan->save();
125 if (strtolower(get_class($par)) ==
'ilmdrights' or
126 strtolower(get_class($par)) ==
'ilmdannotation' or
127 strtolower(get_class($par)) ==
'ilmdclassification') {
131 $this->md_des =&$par->addDescription();
132 $this->md_des->setDescriptionLanguage(
new ilMDLanguageItem($a_attribs[
'Language']));
133 $this->md_des->save();
141 $this->md_key =&$par->addKeyword();
142 $this->md_key->setKeywordLanguage(
new ilMDLanguageItem($a_attribs[
'Language']));
143 $this->md_key->save();
154 $this->md_lif =&$par->addLifecycle();
155 $this->md_lif->setStatus($a_attribs[
'Status']);
156 $this->md_lif->save();
167 $this->md_con =&$par->addContribute();
168 $this->md_con->setRole($a_attribs[
'Role']);
169 $this->md_con->save();
176 if (strtolower(get_class($par)) ==
'ilmdcontribute') {
177 $this->md_ent =&$par->addEntity();
178 $this->md_ent->save();
189 case 'Meta-Metadata':
191 $this->md_met =&$par->addMetaMetadata();
192 $this->md_met->setMetaDataScheme($a_attribs[
'MetadataScheme']);
194 $this->md_met->save();
200 $this->md_tec =&$par->addTechnical();
201 $this->md_tec->save();
207 $this->md_for =&$par->addFormat();
208 $this->md_for->save();
217 $this->md_loc =&$par->addLocation();
218 $this->md_loc->setLocationType($a_attribs[
'Type']);
219 $this->md_loc->save();
225 $this->md_req =&$par->addRequirement();
226 $this->md_req->save();
232 $this->md_orc =&$par->addOrComposite();
239 case 'OperatingSystem':
241 $par->setOperatingSystemName($a_attribs[
'Name']);
242 $par->setOperatingSystemMinimumVersion($a_attribs[
'MinimumVersion']);
243 $par->setOperatingSystemMaximumVersion($a_attribs[
'MaximumVersion']);
248 $par->setBrowserName($a_attribs[
'Name']);
249 $par->setBrowserMinimumVersion($a_attribs[
'MinimumVersion']);
250 $par->setBrowserMaximumVersion($a_attribs[
'MaximumVersion']);
253 case 'InstallationRemarks':
255 $par->setInstallationRemarksLanguage(
new ilMDLanguageItem($a_attribs[
'Language']));
258 case 'OtherPlatformRequirements':
260 $par->setOtherPlatformRequirementsLanguage(
new ilMDLanguageItem($a_attribs[
'Language']));
268 $this->md_edu =&$par->addEducational();
269 $this->md_edu->setInteractivityType($a_attribs[
'InteractivityType']);
270 $this->md_edu->setLearningResourceType($a_attribs[
'LearningResourceType']);
271 $this->md_edu->setInteractivityLevel($a_attribs[
'InteractivityLevel']);
272 $this->md_edu->setSemanticDensity($a_attribs[
'SemanticDensity']);
273 $this->md_edu->setIntendedEndUserRole($a_attribs[
'IntendedEndUserRole']);
274 $this->md_edu->setContext($a_attribs[
'Context']);
275 $this->md_edu->setDifficulty($a_attribs[
'Difficulty']);
276 $this->md_edu->save();
280 case 'TypicalAgeRange':
282 $this->md_typ =&$par->addTypicalAgeRange();
283 $this->md_typ->setTypicalAgeRangeLanguage(
new ilMDLanguageItem($a_attribs[
'Language']));
284 $this->md_typ->save();
288 case 'TypicalLearningTime':
293 $this->md_rig =&$par->addRights();
294 $this->md_rig->setCosts($a_attribs[
'Costs']);
295 $this->md_rig->setCopyrightAndOtherRestrictions($a_attribs[
'CopyrightAndOtherRestrictions']);
296 $this->md_rig->save();
302 $this->md_rel =&$par->addRelation();
303 $this->md_rel->setKind($a_attribs[
'Kind']);
304 $this->md_rel->save();
313 $this->md_ide_ =&$par->addIdentifier_();
314 $this->md_ide_->setCatalog($a_attribs[
'Catalog']);
315 $this->md_ide_->setEntry($a_attribs[
'Entry']);
316 $this->md_ide_->save();
322 $this->md_ann =&$par->addAnnotation();
323 $this->md_ann->save();
327 case 'Classification':
329 $this->md_cla =&$par->addClassification();
330 $this->md_cla->setPurpose($a_attribs[
'Purpose']);
331 $this->md_cla->save();
337 $this->md_taxp =&$par->addTaxonPath();
338 $this->md_taxp->save();
349 $this->md_tax =&$par->addTaxon();
350 $this->md_tax->setTaxonLanguage(
new ilMDLanguageItem($a_attribs[
'Language']));
351 $this->md_tax->setTaxonId($a_attribs[
'Id']);
352 $this->md_tax->save();
365 $this->md_parent =
array();
366 $this->md_in_md =
false;
394 if (strtolower(get_class($par)) ==
'ilmddescription') {
437 if (strtolower(get_class($par)) ==
'ilmdentity') {
452 case 'Meta-Metadata':
496 case 'OperatingSystem':
502 case 'InstallationRemarks':
507 case 'OtherPlatformRequirements':
523 case 'TypicalAgeRange':
530 case 'TypicalLearningTime':
562 case 'Classification':
587 $this->md_chr_data =
'';
595 if ($this->
inMetaData() and $a_data !=
"\n") {
597 $a_data = preg_replace(
"/\t+/",
" ", $a_data);
599 $this->md_chr_data .= $a_data;
608 return trim($this->md_chr_data);
613 $this->md_parent[] =&$md_obj;
615 foreach ($this->md_parent as $class) {
616 #echo get_class($class).' -> '; 621 $class =&array_pop($this->md_parent);
623 #echo '<br />Popped '.get_class($class); 627 return $this->md_parent[count($this->md_parent) - 1];
__construct($a_xml_file='')
Constructor.
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
Create styles array
The data for the language used.