ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAdvancedMetaDataImporter Class Reference

Importer class for adv md. More...

+ Inheritance diagram for ilAdvancedMetaDataImporter:
+ Collaboration diagram for ilAdvancedMetaDataImporter:

Public Member Functions

 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 setImport ($a_val)
 Set import. More...
 
 getImport ()
 Get import. More...
 
 init ()
 Init. More...
 
 setInstallId ($a_val)
 Set installation id. More...
 
 getInstallId ()
 Get installation id. More...
 
 setInstallUrl ($a_val)
 Set installation url. More...
 
 getInstallUrl ()
 Get installation url. More...
 
 setSchemaVersion ($a_val)
 Set schema version. More...
 
 getSchemaVersion ()
 Get schema version. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setSkipEntities ($a_val)
 Set skip entities. More...
 
 getSkipEntities ()
 Get skip entities. More...
 
 exportedFromSameInstallation ()
 Is exporting and importing installation identical? More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 Called after all container objects have been implemented. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilXmlImporter
 $skip_entities = array()
 
 $imp
 

Detailed Description

Importer class for adv md.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id

Definition at line 13 of file class.ilAdvancedMetaDataImporter.php.

Member Function Documentation

◆ importXmlRepresentation()

ilAdvancedMetaDataImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)

Definition at line 15 of file class.ilAdvancedMetaDataImporter.php.

References $parser, ilContainer\_writeContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, and ilAdvancedMDRecord\saveObjRecSelection().

16  {
17  include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDParser.php";
18  include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php";
19  include_once "Services/Container/classes/class.ilContainer.php";
20  include_once "Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
21 
22  $parser = new ilAdvancedMDParser($a_id, $a_mapping);
23  $parser->setXMLContent($a_xml);
24  $parser->startParsing();
25 
26  // records with imported values should be selected
27  foreach($parser->getRecordIds() as $obj_id => $sub_types)
28  {
30 
31  foreach($sub_types as $sub_type => $rec_ids)
32  {
33  ilAdvancedMDRecord::saveObjRecSelection($obj_id, $sub_type, array_unique($rec_ids), false);
34  }
35  }
36  }
static saveObjRecSelection($a_obj_id, $a_sub_type="", array $a_records=null, $a_delete_before=true)
Save repository object record selection.
$parser
Definition: BPMN2Parser.php:24
static _writeContainerSetting($a_id, $a_keyword, $a_value)
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: