ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilGlossaryImporter Class Reference

Importer class for files. More...

+ Inheritance diagram for ilGlossaryImporter:
+ Collaboration diagram for ilGlossaryImporter:

Public Member Functions

 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML.
- 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.
 finalProcessing ($a_mapping)
 Final processing.

Detailed Description

Importer class for files.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:

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

Member Function Documentation

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

Import XML.

Parameters
@return

Reimplemented from ilXmlImporter.

Definition at line 21 of file class.ilGlossaryImporter.php.

References $GLOBALS, ilObject\_writeImportId(), ilXmlImporter\getImportDirectory(), and ilObjectFactory\getInstanceByObjId().

{
// case i container
if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_id))
{
$newObj = ilObjectFactory::getInstanceByObjId($new_id,false);
$xml_file = $this->getImportDirectory().'/'.basename($this->getImportDirectory()).'.xml';
$GLOBALS['ilLog']->write(__METHOD__.': Using XML file '.$xml_file);
}
else // case ii, non container
{
// Shouldn't happen
$GLOBALS['ilLog']->write(__METHOD__.': Called in non container mode');
$GLOBALS['ilLog']->logStack();
return false;
}
if(!file_exists($xml_file))
{
$GLOBALS['ilLog']->write(__METHOD__.': ERROR Cannot find '.$xml_file);
return false;
}
include_once './Modules/LearningModule/classes/class.ilContObjParser.php';
$contParser = new ilContObjParser(
$newObj,
$xml_file,
dirname($this->getImportDirectory())
);
$contParser->startParsing();
ilObject::_writeImportId($newObj->getId(), $newObj->getImportId());
$a_mapping->addMapping("Modules/Glossary", "glo", $a_id, $newObj->getId());
}

+ Here is the call graph for this function:


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