ILIAS  Release_4_4_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 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->getFieldIds() as $obj_id => $items)
{
foreach($items as $sub_type => $field_ids)
{
// find records for fields
$rec_ids = array();
foreach($field_ids as $field_id)
{
$def = new ilAdvancedMDFieldDefinition($field_id);
$rec_ids[] = $def->getRecordId();
}
$rec_ids = array_unique($rec_ids);
ilAdvancedMDRecord::saveObjRecSelection($obj_id, $sub_type, $rec_ids);
}
}
}

+ Here is the call graph for this function:


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