ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilXmlExporter Class Reference

Xml Exporter class. More...

+ Inheritance diagram for ilXmlExporter:
+ Collaboration diagram for ilXmlExporter:

Public Member Functions

 __construct ()
 Constructor.
 getXmlRepresentation ($a_entity, $a_target_release, $a_id)
 Get xml representation.
 init ()
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories.
 getRelativeExportDirectory ()
 Get relative export directory.
 getAbsoluteExportDirectory ()
 Get absolute export directory.
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies.
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies.
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to.
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version.

Static Public Member Functions

static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type= 'xml')
 export directory lookup

Protected Attributes

 $dir_relative
 $dir_absolute

Detailed Description

Xml Exporter class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilXmlExporter.php.

Constructor & Destructor Documentation

ilXmlExporter::__construct ( )

Constructor.

Parameters
@return

Reimplemented in ilCourseExporter, ilFolderExporter, ilGroupExporter, ilWebResourceExporter, ilContainerExporter, ilBlogExporter, and ilPortfolioExporter.

Definition at line 22 of file class.ilXmlExporter.php.

{
}

Member Function Documentation

ilXmlExporter::determineSchemaVersion (   $a_entity,
  $a_target_release 
)
final

Determine schema version.

Parameters
@return

Definition at line 135 of file class.ilXmlExporter.php.

References getValidSchemaVersions(), and ILIAS_VERSION_NUMERIC.

{
$svs = $this->getValidSchemaVersions($a_entity);
$found = false;
foreach ($svs as $k => $sv)
{
if (!$found)
{
if (version_compare($sv["min"], ILIAS_VERSION_NUMERIC, "<=")
&& ($sv["max"] == "" || version_compare($sv["max"], ILIAS_VERSION_NUMERIC, ">=")))
{
$rsv = $sv;
$rsv["schema_version"] = $k;
$found = true;
}
}
}
return $rsv;
}

+ Here is the call graph for this function:

ilXmlExporter::getAbsoluteExportDirectory ( )

Get absolute export directory.

Returns
string absolute directory

Definition at line 80 of file class.ilXmlExporter.php.

References $dir_absolute.

Referenced by ilForumExporter\getXmlRepresentation(), ilFileExporter\getXmlRepresentation(), and ilMediaObjectsExporter\getXmlRepresentation().

{
}

+ Here is the caller graph for this function:

ilXmlExporter::getRelativeExportDirectory ( )

Get relative export directory.

Returns
string relative directory

Definition at line 70 of file class.ilXmlExporter.php.

References $dir_relative.

Referenced by ilForumExporter\getXmlRepresentation(), and ilFileExporter\getXmlRepresentation().

{
}

+ Here is the caller graph for this function:

ilXmlExporter::getValidSchemaVersions (   $a_entity)
abstract

Returns schema versions that the component can export to.

ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example:

            return array (
    "4.1.0" => array(
            "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1",
            "xsd_file" => "ilias_md_4_1.xsd",
            "min" => "4.1.0",
            "max" => "")
    );
Returns
array

Reimplemented in ilCOPageExporter, ilMediaPoolExporter, ilGroupExporter, ilFolderExporter, ilCourseExporter, ilFileExporter, ilWikiExporter, ilMediaCastExporter, ilNewsExporter, ilHTMLLearningModuleExporter, ilMediaObjectsExporter, ilWebResourceExporter, ilTestQuestionPoolExporter, ilForumExporter, ilSurveyExporter, ilContainerExporter, ilSurveyQuestionPoolExporter, ilTestExporter, ilLearningModuleExporter, ilGlossaryExporter, ilMetaDataExporter, ilExerciseExporter, ilExternalFeedExporter, ilSessionExporter, ilBlogExporter, and ilPortfolioExporter.

Referenced by determineSchemaVersion().

+ Here is the caller graph for this function:

ilXmlExporter::getXmlExportHeadDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get head dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented in ilCourseExporter, ilFolderExporter, ilGroupExporter, ilCOPageExporter, ilNewsExporter, and ilMediaPoolExporter.

Definition at line 93 of file class.ilXmlExporter.php.

{
return array();
}
ilXmlExporter::getXmlExportTailDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented in ilCOPageExporter, ilMediaPoolExporter, ilHTMLLearningModuleExporter, ilMediaCastExporter, ilWikiExporter, ilMediaObjectsExporter, and ilFileExporter.

Definition at line 106 of file class.ilXmlExporter.php.

{
return array();
}
static ilXmlExporter::lookupExportDirectory (   $a_obj_type,
  $a_obj_id,
  $a_export_type = 'xml' 
)
static

export directory lookup

Returns
string export directory

Reimplemented in ilTestQuestionPoolExporter.

Definition at line 31 of file class.ilXmlExporter.php.

References ilUtil\getDataDir().

{
if($a_export_type == 'xml')
{
return ilUtil::getDataDir()."/".$a_obj_type."_data"."/".$a_obj_type."_".$a_obj_id."/export";
}
return ilUtil::getDataDir()."/".$a_obj_type."_data"."/".$a_obj_type."_".$a_obj_id."/export_".$a_export_type;
}

+ Here is the call graph for this function:

ilXmlExporter::setExportDirectories (   $a_dir_relative,
  $a_dir_absolute 
)

Export directories.

Parameters
stringrelative directory
stringabsolute directory

Definition at line 59 of file class.ilXmlExporter.php.

{
$this->dir_relative = $a_dir_relative;
$this->dir_absolute = $a_dir_absolute;
}

Field Documentation

ilXmlExporter::$dir_absolute
protected

Definition at line 14 of file class.ilXmlExporter.php.

Referenced by getAbsoluteExportDirectory().

ilXmlExporter::$dir_relative
protected

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

Referenced by getRelativeExportDirectory().


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