ILIAS
trunk Revision v11.0_alpha-1723-g8e69f309bab
|
A dataset contains in data in a common structure that can be shared and transformed for different purposes easily, examples. More...
Public Member Functions | |
__construct () | |
init (string $a_entity, string $a_schema_version) | |
Init. More... | |
getSupportedVersions () | |
readData (string $a_entity, string $a_version, array $a_ids) | |
Read data from DB. More... | |
initByExporter (ilXmlExporter $xml_exporter) | |
setImportDirectory (string $a_val) | |
getImportDirectory () | |
setDSPrefix (string $a_val) | |
getDSPrefix () | |
getDSPrefixString () | |
getDirectDataFromQuery (string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true) | |
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More... | |
convertToLeadingUpper (string $a_str) | |
Make xyz_abc a XyzAbc string. More... | |
getXmlRepresentation (string $a_entity, string $a_schema_version, ?array $a_ids, string $a_field="", bool $a_omit_header=false, bool $a_omit_types=false) | |
Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ... More... | |
addRecordsXml (ilXmlWriter $a_writer, array $a_prefixes, string $a_entity, string $a_schema_version, array $a_ids, ?string $a_field="") | |
afterXmlRecordWriting (string $a_entity, string $a_version, array $a_set) | |
getNamespaces (array &$namespaces, string $a_entity, string $a_schema_version) | |
getXmlRecord (string $a_entity, string $a_version, array $a_set) | |
Get xml record for version. More... | |
getXmlTypes (string $a_entity, string $a_version) | |
Get xml types. More... | |
getXMLEntityName (string $a_entity, string $a_version) | |
Get entity name for xml (may be overwritten) More... | |
getXMLEntityTag (string $a_entity, string $a_schema_version) | |
Get entity tag. More... | |
setImport (ilSurveyImporter $a_val) | |
getImport () | |
setCurrentInstallationId (string $a_val) | |
getCurrentInstallationId () | |
importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version) | |
Needs to be overwritten for import use case. More... | |
getCollection (array $record, string $entity, string $schema_version, string $field, string $value) | |
getContainerExportConfig (array $record, string $entity, string $schema_version, string $field, string $value) | |
Data Fields | |
const | DATASET_NS = 'http://www.ilias.de/Services/DataSet/ds/4_3' |
const | DATASET_NS_PREFIX = 'ds' |
const | EXPORT_NO_INST_ID = 1 |
const | EXPORT_ID_ILIAS_LOCAL = 2 |
const | EXPORT_ID_ILIAS_LOCAL_INVALID = 3 |
const | EXPORT_ID_ILIAS_REMOTE = 4 |
const | EXPORT_ID_ILIAS_REMOTE_INVALID = 5 |
const | EXPORT_ID = 6 |
const | EXPORT_ID_INVALID = 7 |
int | $dircnt = 0 |
Protected Member Functions | |
getTypes (string $a_entity, string $a_version) | |
Get (abstract) types for (abstract) field names. More... | |
getXmlNamespace (string $a_entity, string $a_schema_version) | |
getExportDirInContainer (string $exp_dir) | |
getIRSSContainerExportConfig (StorableResource $source_container, string $source_path, string $target_path="") | |
getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null) | |
createObjectExportId (string $a_type, string $a_id) | |
Build ilias export id. More... | |
parseObjectExportId (string $a_id, ?string $a_fallback_id=null) | |
Parse export id. More... | |
stripTags (array $rec, array $omit_keys=[]) | |
Protected Attributes | |
ILIAS ResourceStorage Services | $irss |
string | $current_installation_id = "" |
array | $data = [] |
ilDBInterface | $db |
ilLogger | $ds_log |
string | $import_directory = "" |
string | $entity = "" |
string | $schema_version = "" |
string | $component_export_dir = "" |
string | $ds_prefix = "ds" |
string | $version = "" |
ilSurveyImporter | $import |
ilExport | $export |
Private Member Functions | |
addTypesXml (ilXmlWriter $a_writer, string $a_entity, string $a_schema_version) | |
A dataset contains in data in a common structure that can be shared and transformed for different purposes easily, examples.
The general structure is:
Definition at line 42 of file class.ilDataSet.php.
ilDataSet::__construct | ( | ) |
Definition at line 70 of file class.ilDataSet.php.
References $DIC, and ilLoggerFactory\getLogger().
ilDataSet::addRecordsXml | ( | ilXmlWriter | $a_writer, |
array | $a_prefixes, | ||
string | $a_entity, | ||
string | $a_schema_version, | ||
array | $a_ids, | ||
?string | $a_field = "" |
||
) |
Definition at line 287 of file class.ilDataSet.php.
References $c, Vendor\Package\$d, $dircnt, Vendor\Package\$f, afterXmlRecordWriting(), getCollection(), getContainerExportConfig(), getDependencies(), getDSPrefixString(), getExportDirInContainer(), getIRSSContainerExportConfig(), getXMLEntityName(), getXMLEntityTag(), getXmlRecord(), getXmlTypes(), null, readData(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by getXmlRepresentation().
|
private |
Definition at line 396 of file class.ilDataSet.php.
References Vendor\Package\$f, getDependencies(), getDSPrefixString(), getXMLEntityName(), getXmlTypes(), null, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by getXmlRepresentation().
ilDataSet::afterXmlRecordWriting | ( | string | $a_entity, |
string | $a_version, | ||
array | $a_set | ||
) |
Definition at line 391 of file class.ilDataSet.php.
Referenced by addRecordsXml().
ilDataSet::convertToLeadingUpper | ( | string | $a_str | ) |
Make xyz_abc a XyzAbc string.
Definition at line 189 of file class.ilDataSet.php.
Referenced by getDirectDataFromQuery(), getXMLEntityTag(), ilUserDataSet\importRecord(), ilMediaPoolDataSet\readData(), and ilLearningModuleDataSet\readData().
|
protected |
Build ilias export id.
Definition at line 495 of file class.ilDataSet.php.
References IL_INST_ID.
Referenced by ilBlogDataSet\readData().
ilDataSet::getCollection | ( | array | $record, |
string | $entity, | ||
string | $schema_version, | ||
string | $field, | ||
string | $value | ||
) |
Definition at line 567 of file class.ilDataSet.php.
References null.
Referenced by addRecordsXml().
ilDataSet::getContainerExportConfig | ( | array | $record, |
string | $entity, | ||
string | $schema_version, | ||
string | $field, | ||
string | $value | ||
) |
Definition at line 577 of file class.ilDataSet.php.
References null.
Referenced by addRecordsXml().
ilDataSet::getCurrentInstallationId | ( | ) |
Definition at line 487 of file class.ilDataSet.php.
References $current_installation_id.
Referenced by ilSurveyDataSet\importRecord(), ilGlossaryDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilLearningModuleDataSet\importRecord(), and ilSkillDataSet\importRecord().
|
protected |
Definition at line 381 of file class.ilDataSet.php.
Referenced by addRecordsXml(), addTypesXml(), and getNamespaces().
ilDataSet::getDirectDataFromQuery | ( | string | $a_query, |
bool | $a_convert_to_leading_upper = true , |
||
bool | $a_set = true |
||
) |
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields.
Definition at line 158 of file class.ilDataSet.php.
References $db, $ilDB, and convertToLeadingUpper().
Referenced by ilObjectDataSet\getTypes(), ilCmiXapiDataSet\getTypes(), ilHTMLLearningModuleDataSet\readData(), ilRatingDataSet\readData(), ilItemGroupDataSet\readData(), ilCOPageDataSet\readData(), ilSurveyDataSet\readData(), ilNewsDataSet\readData(), ilNotesDataSet\readData(), ilMediaCastDataSet\readData(), ilHelpDataSet\readData(), ilPortfolioDataSet\readData(), ilTaxonomyDataSet\readData(), ilCalendarDataSet\readData(), ilGlossaryDataSet\readData(), ilMediaPoolDataSet\readData(), ilPollDataSet\readData(), ilUserDataSet\readData(), ilMediaObjectDataSet\readData(), ilSessionDataSet\readData(), ilWikiDataSet\readData(), ilBlogDataSet\readData(), ilSkillDataSet\readData(), ilStyleDataSet\readData(), ilLearningModuleDataSet\readData(), and ilExerciseDataSet\readData().
ilDataSet::getDSPrefix | ( | ) |
Definition at line 141 of file class.ilDataSet.php.
References $ds_prefix.
Referenced by getDSPrefixString(), and getXmlRepresentation().
ilDataSet::getDSPrefixString | ( | ) |
Definition at line 146 of file class.ilDataSet.php.
References getDSPrefix().
Referenced by addRecordsXml(), addTypesXml(), and getXmlRepresentation().
|
protected |
Definition at line 273 of file class.ilDataSet.php.
Referenced by addRecordsXml().
ilDataSet::getImport | ( | ) |
Definition at line 477 of file class.ilDataSet.php.
References $import.
Referenced by ilSurveyDataSet\importRecord().
ilDataSet::getImportDirectory | ( | ) |
Definition at line 131 of file class.ilDataSet.php.
References $import_directory.
Referenced by ilObjectDataSet\getDependencies(), ilHTMLLearningModuleDataSet\getXmlRecord(), ilPollDataSet\getXmlRecord(), ilBibliographicDataSet\importLibraryFile(), ilUserDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilStyleDataSet\importRecord(), and ilExerciseDataSet\importRecord().
|
protected |
Definition at line 369 of file class.ilDataSet.php.
Referenced by addRecordsXml(), ilMediaObjectDataSet\getContainerExportConfig(), and ilStyleDataSet\getContainerExportConfig().
ilDataSet::getNamespaces | ( | array & | $namespaces, |
string | $a_entity, | ||
string | $a_schema_version | ||
) |
Definition at line 424 of file class.ilDataSet.php.
References getDependencies(), getXmlNamespace(), and null.
Referenced by getXmlRepresentation().
|
abstract |
|
abstractprotected |
Get (abstract) types for (abstract) field names.
Please note that the abstract fields/types only depend on the version! Not on a choosen representation!
Referenced by getXmlTypes(), and init().
ilDataSet::getXMLEntityName | ( | string | $a_entity, |
string | $a_version | ||
) |
Get entity name for xml (may be overwritten)
Definition at line 459 of file class.ilDataSet.php.
Referenced by addRecordsXml(), and addTypesXml().
ilDataSet::getXMLEntityTag | ( | string | $a_entity, |
string | $a_schema_version | ||
) |
Get entity tag.
Definition at line 467 of file class.ilDataSet.php.
References convertToLeadingUpper().
Referenced by addRecordsXml().
|
abstractprotected |
ilDataSet::getXmlRecord | ( | string | $a_entity, |
string | $a_version, | ||
array | $a_set | ||
) |
Get xml record for version.
array | $a_set | abstract data record |
Definition at line 441 of file class.ilDataSet.php.
Referenced by addRecordsXml().
|
final |
Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ...
</types> <set entity="table_name"> <rec> <field_1>content</field_1> <field_2>my_date</field_2> <field_3>my_number</field_3> </rec> ... </set> </dataset>
Definition at line 222 of file class.ilDataSet.php.
References $entity, addRecordsXml(), addTypesXml(), getDSPrefix(), getDSPrefixString(), getNamespaces(), and IL_INST_ID.
ilDataSet::getXmlTypes | ( | string | $a_entity, |
string | $a_version | ||
) |
Get xml types.
Definition at line 450 of file class.ilDataSet.php.
References getTypes().
Referenced by addRecordsXml(), and addTypesXml().
ilDataSet::importRecord | ( | string | $a_entity, |
array | $a_types, | ||
array | $a_rec, | ||
ilImportMapping | $a_mapping, | ||
string | $a_schema_version | ||
) |
Needs to be overwritten for import use case.
Definition at line 558 of file class.ilDataSet.php.
Referenced by ilItemGroupDataSet\getDependencies(), ilObjectDataSet\getDependencies(), ilBibliographicDataSet\getXmlNamespace(), ilDataCollectionDataSet\getXmlNamespace(), ilHTMLLearningModuleDataSet\getXmlRecord(), and ilPollDataSet\getXmlRecord().
|
final |
Init.
string | (abstract) entity name |
string | version string, always the ILIAS release versions that defined the a structure or made changes to it, never use another version. Example: structure is defined in 4.1.0 and changed in 4.3.0 -> use these values only, not 4.2.0 (ask for the 4.1.0 version in ILIAS 4.2.0) |
Definition at line 91 of file class.ilDataSet.php.
References getSupportedVersions(), getTypes(), getXmlNamespace(), and readData().
ilDataSet::initByExporter | ( | ilXmlExporter | $xml_exporter | ) |
Definition at line 121 of file class.ilDataSet.php.
References ilXmlExporter\getExport().
|
protected |
Parse export id.
Definition at line 504 of file class.ilDataSet.php.
References $id, $parts, ilObject\_getIdForImportId(), ilObject\_lookupType(), and IL_INST_ID.
Referenced by ilBlogDataSet\importRecord().
|
abstract |
Read data from DB.
This should result in the abstract field structure of the version set in the constructor.
Referenced by addRecordsXml(), ilCmiXapiDataSet\getDependencies(), ilObjectDataSet\getTypes(), ilCmiXapiDataSet\getTypes(), and init().
ilDataSet::setCurrentInstallationId | ( | string | $a_val | ) |
Definition at line 482 of file class.ilDataSet.php.
ilDataSet::setDSPrefix | ( | string | $a_val | ) |
Definition at line 136 of file class.ilDataSet.php.
ilDataSet::setImport | ( | ilSurveyImporter | $a_val | ) |
Definition at line 472 of file class.ilDataSet.php.
ilDataSet::setImportDirectory | ( | string | $a_val | ) |
Definition at line 126 of file class.ilDataSet.php.
|
protected |
Definition at line 587 of file class.ilDataSet.php.
References ilUtil\stripSlashes().
Referenced by ilItemGroupDataSet\getDependencies(), ilHTMLLearningModuleDataSet\getXmlRecord(), ilPollDataSet\getXmlRecord(), ilRatingDataSet\importRecord(), ilNotesDataSet\importRecord(), ilCOPageDataSet\importRecord(), ilNewsDataSet\importRecord(), ilSurveyDataSet\importRecord(), ilHelpDataSet\importRecord(), ilPortfolioDataSet\importRecord(), ilMediaCastDataSet\importRecord(), ilTaxonomyDataSet\importRecord(), ilMediaPoolDataSet\importRecord(), ilGlossaryDataSet\importRecord(), ilBlogDataSet\importRecord(), ilWikiDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilStyleDataSet\importRecord(), ilLearningModuleDataSet\importRecord(), and ilExerciseDataSet\importRecord().
|
protected |
Definition at line 64 of file class.ilDataSet.php.
|
protected |
Definition at line 57 of file class.ilDataSet.php.
Referenced by getCurrentInstallationId().
|
protected |
Definition at line 58 of file class.ilDataSet.php.
Referenced by ilIndividualAssessmentDataSet\_readData(), ilBibliographicDataSet\_readData(), ilDataCollectionDataSet\_readData(), ilDataCollectionDataSet\buildCache(), ilCmiXapiDataSet\getTypes(), and ilBlogDataSet\importRecord().
|
protected |
Definition at line 59 of file class.ilDataSet.php.
Referenced by ilSurveyDataSet\getDependencies(), ilSkillDataSet\getDependencies(), getDirectDataFromQuery(), ilHTMLLearningModuleDataSet\readData(), ilRatingDataSet\readData(), ilScorm2004DataSet\readData(), ilItemGroupDataSet\readData(), ilCOPageDataSet\readData(), ilSurveyDataSet\readData(), ilNewsDataSet\readData(), ilNotesDataSet\readData(), ilMediaCastDataSet\readData(), ilHelpDataSet\readData(), ilPortfolioDataSet\readData(), ilTaxonomyDataSet\readData(), ilGlossaryDataSet\readData(), ilMediaPoolDataSet\readData(), ilPollDataSet\readData(), ilMediaObjectDataSet\readData(), ilWikiDataSet\readData(), ilBlogDataSet\readData(), ilSessionDataSet\readData(), ilSkillDataSet\readData(), ilStyleDataSet\readData(), ilLearningModuleDataSet\readData(), and ilExerciseDataSet\readData().
int ilDataSet::$dircnt = 0 |
Definition at line 56 of file class.ilDataSet.php.
Referenced by addRecordsXml().
|
protected |
Definition at line 60 of file class.ilDataSet.php.
|
protected |
Definition at line 65 of file class.ilDataSet.php.
Referenced by getDSPrefix().
|
protected |
Definition at line 62 of file class.ilDataSet.php.
Referenced by ilObjectDataSet\getTypes(), ilObjectDataSet\getXmlNamespace(), getXmlRepresentation(), and ilContentPageDataSet\readData().
|
protected |
Definition at line 68 of file class.ilDataSet.php.
|
protected |
Definition at line 67 of file class.ilDataSet.php.
Referenced by getImport().
|
protected |
Definition at line 61 of file class.ilDataSet.php.
Referenced by getImportDirectory().
|
protected |
Definition at line 54 of file class.ilDataSet.php.
|
protected |
Definition at line 63 of file class.ilDataSet.php.
Referenced by ilObjectDataSet\getDependencies().
|
protected |
Definition at line 66 of file class.ilDataSet.php.
Referenced by ilObjectDataSet\getTypes().
const ilDataSet::DATASET_NS = 'http://www.ilias.de/Services/DataSet/ds/4_3' |
Definition at line 44 of file class.ilDataSet.php.
Referenced by ILIAS\Export\ImportHandler\File\XML\Export\Handler\hasComponentRootNode().
const ilDataSet::DATASET_NS_PREFIX = 'ds' |
Definition at line 45 of file class.ilDataSet.php.
Referenced by ILIAS\Export\ImportHandler\File\XML\Export\Handler\hasComponentRootNode().
const ilDataSet::EXPORT_ID = 6 |
Definition at line 52 of file class.ilDataSet.php.
const ilDataSet::EXPORT_ID_ILIAS_LOCAL = 2 |
Definition at line 48 of file class.ilDataSet.php.
const ilDataSet::EXPORT_ID_ILIAS_LOCAL_INVALID = 3 |
Definition at line 49 of file class.ilDataSet.php.
const ilDataSet::EXPORT_ID_ILIAS_REMOTE = 4 |
Definition at line 50 of file class.ilDataSet.php.
const ilDataSet::EXPORT_ID_ILIAS_REMOTE_INVALID = 5 |
Definition at line 51 of file class.ilDataSet.php.
const ilDataSet::EXPORT_ID_INVALID = 7 |
Definition at line 53 of file class.ilDataSet.php.
const ilDataSet::EXPORT_NO_INST_ID = 1 |
Definition at line 47 of file class.ilDataSet.php.