ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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)
 Import xml representation.
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor.
 init ()
 Init.
 setInstallId ($a_val)
 Set installation id.
 getInstallId ()
 Get installation id.
 setInstallUrl ($a_val)
 Set installation url.
 getInstallUrl ()
 Get installation url.
 setSchemaVersion ($a_val)
 Set schema version.
 getSchemaVersion ()
 Get schema version.
 setImportDirectory ($a_val)
 Set import directory.
 getImportDirectory ()
 Get import directory.
 setSkipEntities ($a_val)
 Set skip entities.
 getSkipEntities ()
 Get skip entities.
 finalProcessing ($a_mapping)
 Final processing.

Additional Inherited Members

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

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

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

Import xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

Reimplemented from ilXmlImporter.

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

References ilObject\_lookupType(), and ilAdvancedMDRecord\saveObjRecSelection().

{
include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDParser.php";
include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php";
$parser = new ilAdvancedMDParser($a_id, $a_mapping);
$parser->setXMLContent($a_xml);
$parser->startParsing();
// select records for object
foreach($parser->getRecordIds() as $obj_id => $sub_types)
{
// currently only supported for wikis and glossary
if(!in_array(ilObject::_lookupType($obj_id), array("glo", "wiki")))
{
continue;
}
foreach($sub_types as $sub_type => $rec_ids)
{
ilAdvancedMDRecord::saveObjRecSelection($obj_id, $sub_type, array_unique($rec_ids), false);
}
}
}

+ Here is the call graph for this function:


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