|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
A dataset contains in data in a common structure that can be shared and transformed for different purposes easily, examples. More...
Inheritance diagram for ilDataSet:
Collaboration diagram for ilDataSet: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... | |
| setExportDirectories (string $a_relative, string $a_absolute) | |
| 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) | |
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) | |
| 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 | $relative_export_dir = "" |
| string | $absolute_export_dir = "" |
| string | $ds_prefix = "ds" |
| string | $version = "" |
| ilSurveyImporter | $import |
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 38 of file class.ilDataSet.php.
| ilDataSet::__construct | ( | ) |
Definition at line 66 of file class.ilDataSet.php.
References $DIC, and ilLoggerFactory\getLogger().
Here is the call graph for this function:| ilDataSet::addRecordsXml | ( | ilXmlWriter | $a_writer, |
| array | $a_prefixes, | ||
| string | $a_entity, | ||
| string | $a_schema_version, | ||
| array | $a_ids, | ||
| ?string | $a_field = "" |
||
| ) |
Definition at line 271 of file class.ilDataSet.php.
References Vendor\Package\$c, Vendor\Package\$d, $dircnt, Vendor\Package\$e, Vendor\Package\$f, afterXmlRecordWriting(), getCollection(), getDependencies(), getDSPrefixString(), getXMLEntityName(), getXMLEntityTag(), getXmlRecord(), getXmlTypes(), ilFileUtils\makeDirParents(), ilFileUtils\rCopy(), readData(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by getXmlRepresentation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 363 of file class.ilDataSet.php.
References Vendor\Package\$f, getDependencies(), getDSPrefixString(), getXMLEntityName(), getXmlTypes(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by getXmlRepresentation().
Here is the call graph for this function:
Here is the caller graph for this function:| ilDataSet::afterXmlRecordWriting | ( | string | $a_entity, |
| string | $a_version, | ||
| array | $a_set | ||
| ) |
Definition at line 358 of file class.ilDataSet.php.
Referenced by addRecordsXml().
Here is the caller graph for this function:| ilDataSet::convertToLeadingUpper | ( | string | $a_str | ) |
Make xyz_abc a XyzAbc string.
Definition at line 186 of file class.ilDataSet.php.
Referenced by getDirectDataFromQuery(), getXMLEntityTag(), ilUserDataSet\importRecord(), ilMediaPoolDataSet\readData(), and ilLearningModuleDataSet\readData().
Here is the caller graph for this function:
|
protected |
Build ilias export id.
Definition at line 462 of file class.ilDataSet.php.
References IL_INST_ID.
Referenced by ilBlogDataSet\readData().
Here is the caller graph for this function:| ilDataSet::getCollection | ( | array | $record, |
| string | $entity, | ||
| string | $schema_version, | ||
| string | $field, | ||
| string | $value | ||
| ) |
Definition at line 534 of file class.ilDataSet.php.
Referenced by addRecordsXml().
Here is the caller graph for this function:| ilDataSet::getCurrentInstallationId | ( | ) |
Definition at line 454 of file class.ilDataSet.php.
References $current_installation_id.
Referenced by ilSurveyDataSet\importRecord(), ilGlossaryDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilLearningModuleDataSet\importRecord(), and ilSkillDataSet\importRecord().
Here is the caller graph for this function:
|
protected |
Definition at line 348 of file class.ilDataSet.php.
Referenced by addRecordsXml(), addTypesXml(), and getNamespaces().
Here is the caller graph for this function:| 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 155 of file class.ilDataSet.php.
References $db, $ilDB, and convertToLeadingUpper().
Referenced by ilObjectDataSet\getTypes(), ilHTMLLearningModuleDataSet\readData(), ilRatingDataSet\readData(), ilItemGroupDataSet\readData(), ilCOPageDataSet\readData(), ilSurveyDataSet\readData(), ilNewsDataSet\readData(), ilNotesDataSet\readData(), ilHelpDataSet\readData(), ilMediaCastDataSet\readData(), ilPortfolioDataSet\readData(), ilTaxonomyDataSet\readData(), ilPollDataSet\readData(), ilCalendarDataSet\readData(), ilGlossaryDataSet\readData(), ilMediaPoolDataSet\readData(), ilMediaObjectDataSet\readData(), ilUserDataSet\readData(), ilBlogDataSet\readData(), ilWikiDataSet\readData(), ilSessionDataSet\readData(), ilCmiXapiDataSet\readData(), ilLearningModuleDataSet\readData(), ilStyleDataSet\readData(), ilSkillDataSet\readData(), and ilExerciseDataSet\readData().
Here is the call graph for this function:
Here is the caller graph for this function:| ilDataSet::getDSPrefix | ( | ) |
Definition at line 138 of file class.ilDataSet.php.
References $ds_prefix.
Referenced by getDSPrefixString(), and getXmlRepresentation().
Here is the caller graph for this function:| ilDataSet::getDSPrefixString | ( | ) |
Definition at line 143 of file class.ilDataSet.php.
References getDSPrefix().
Referenced by addRecordsXml(), addTypesXml(), and getXmlRepresentation().
Here is the call graph for this function:
Here is the caller graph for this function:| ilDataSet::getImport | ( | ) |
Definition at line 444 of file class.ilDataSet.php.
References $import.
Referenced by ilSurveyDataSet\importRecord().
Here is the caller graph for this function:| ilDataSet::getImportDirectory | ( | ) |
Definition at line 128 of file class.ilDataSet.php.
References $import_directory.
Referenced by ilObjectDataSet\getDependencies(), ilHTMLLearningModuleDataSet\getXmlRecord(), ilPollDataSet\getXmlRecord(), ilBibliographicDataSet\importLibraryFile(), ilPortfolioDataSet\importRecord(), ilUserDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilBlogDataSet\importRecord(), ilStyleDataSet\importRecord(), and ilExerciseDataSet\importRecord().
Here is the caller graph for this function:| ilDataSet::getNamespaces | ( | array & | $namespaces, |
| string | $a_entity, | ||
| string | $a_schema_version | ||
| ) |
Definition at line 391 of file class.ilDataSet.php.
References getDependencies(), and getXmlNamespace().
Referenced by getXmlRepresentation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the caller graph for this function:| ilDataSet::getXMLEntityName | ( | string | $a_entity, |
| string | $a_version | ||
| ) |
Get entity name for xml (may be overwritten)
Definition at line 426 of file class.ilDataSet.php.
Referenced by addRecordsXml(), and addTypesXml().
Here is the caller graph for this function:| ilDataSet::getXMLEntityTag | ( | string | $a_entity, |
| string | $a_schema_version | ||
| ) |
Get entity tag.
Definition at line 434 of file class.ilDataSet.php.
References convertToLeadingUpper().
Referenced by addRecordsXml().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 408 of file class.ilDataSet.php.
Referenced by addRecordsXml().
Here is the caller graph for this function:
|
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 219 of file class.ilDataSet.php.
References $entity, addRecordsXml(), addTypesXml(), getDSPrefix(), getDSPrefixString(), getNamespaces(), and IL_INST_ID.
Here is the call graph for this function:| ilDataSet::getXmlTypes | ( | string | $a_entity, |
| string | $a_version | ||
| ) |
Get xml types.
Definition at line 417 of file class.ilDataSet.php.
References getTypes().
Referenced by addRecordsXml(), and addTypesXml().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 525 of file class.ilDataSet.php.
Referenced by ilItemGroupDataSet\getDependencies(), ilObjectDataSet\getDependencies(), ilBibliographicDataSet\getXmlNamespace(), ilDataCollectionDataSet\getXmlNamespace(), ilHTMLLearningModuleDataSet\getXmlRecord(), and ilPollDataSet\getXmlRecord().
Here is the caller graph for this function:
|
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 87 of file class.ilDataSet.php.
References getSupportedVersions(), getTypes(), getXmlNamespace(), and readData().
Here is the call graph for this function:
|
protected |
Parse export id.
Definition at line 471 of file class.ilDataSet.php.
References $id, $parts, ilObject\_getIdForImportId(), ilObject\_lookupType(), and IL_INST_ID.
Referenced by ilBlogDataSet\importRecord().
Here is the call graph for this function:
Here is the caller graph for this function:
|
abstract |
Read data from DB.
This should result in the abstract field structure of the version set in the constructor.
Referenced by addRecordsXml(), ilObjectDataSet\getTypes(), and init().
Here is the caller graph for this function:| ilDataSet::setCurrentInstallationId | ( | string | $a_val | ) |
Definition at line 449 of file class.ilDataSet.php.
| ilDataSet::setDSPrefix | ( | string | $a_val | ) |
Definition at line 133 of file class.ilDataSet.php.
| ilDataSet::setExportDirectories | ( | string | $a_relative, |
| string | $a_absolute | ||
| ) |
Definition at line 117 of file class.ilDataSet.php.
| ilDataSet::setImport | ( | ilSurveyImporter | $a_val | ) |
Definition at line 439 of file class.ilDataSet.php.
| ilDataSet::setImportDirectory | ( | string | $a_val | ) |
Definition at line 123 of file class.ilDataSet.php.
|
protected |
Definition at line 544 of file class.ilDataSet.php.
References ilUtil\stripSlashes().
Referenced by ilItemGroupDataSet\getDependencies(), ilHTMLLearningModuleDataSet\getXmlRecord(), ilPollDataSet\getXmlRecord(), ilRatingDataSet\importRecord(), ilNotesDataSet\importRecord(), ilCOPageDataSet\importRecord(), ilHelpDataSet\importRecord(), ilNewsDataSet\importRecord(), ilSurveyDataSet\importRecord(), ilPortfolioDataSet\importRecord(), ilMediaCastDataSet\importRecord(), ilTaxonomyDataSet\importRecord(), ilMediaPoolDataSet\importRecord(), ilGlossaryDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilBlogDataSet\importRecord(), ilWikiDataSet\importRecord(), ilLearningModuleDataSet\importRecord(), ilStyleDataSet\importRecord(), and ilExerciseDataSet\importRecord().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 61 of file class.ilDataSet.php.
|
protected |
Definition at line 53 of file class.ilDataSet.php.
Referenced by getCurrentInstallationId().
|
protected |
Definition at line 54 of file class.ilDataSet.php.
Referenced by ilIndividualAssessmentDataSet\_readData(), ilBibliographicDataSet\_readData(), ilDataCollectionDataSet\_readData(), ilDataCollectionDataSet\buildCache(), and ilCmiXapiDataSet\readData().
|
protected |
Definition at line 55 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(), ilHelpDataSet\readData(), ilMediaCastDataSet\readData(), ilPortfolioDataSet\readData(), ilTaxonomyDataSet\readData(), ilPollDataSet\readData(), ilGlossaryDataSet\readData(), ilMediaPoolDataSet\readData(), ilMediaObjectDataSet\readData(), ilBlogDataSet\readData(), ilWikiDataSet\readData(), ilSessionDataSet\readData(), ilLearningModuleDataSet\readData(), ilStyleDataSet\readData(), ilSkillDataSet\readData(), and ilExerciseDataSet\readData().
| int ilDataSet::$dircnt = 0 |
Definition at line 52 of file class.ilDataSet.php.
Referenced by addRecordsXml().
|
protected |
Definition at line 56 of file class.ilDataSet.php.
|
protected |
Definition at line 62 of file class.ilDataSet.php.
Referenced by getDSPrefix().
|
protected |
Definition at line 58 of file class.ilDataSet.php.
Referenced by ilObjectDataSet\getTypes(), ilObjectDataSet\getXmlNamespace(), getXmlRepresentation(), and ilContentPageDataSet\readData().
|
protected |
Definition at line 64 of file class.ilDataSet.php.
Referenced by getImport().
|
protected |
Definition at line 57 of file class.ilDataSet.php.
Referenced by getImportDirectory().
|
protected |
Definition at line 50 of file class.ilDataSet.php.
|
protected |
Definition at line 60 of file class.ilDataSet.php.
|
protected |
Definition at line 59 of file class.ilDataSet.php.
Referenced by ilObjectDataSet\getDependencies().
|
protected |
Definition at line 63 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 40 of file class.ilDataSet.php.
Referenced by ILIAS\Export\ImportHandler\File\XML\Export\ilHandler\hasComponentRootNode().
| const ilDataSet::DATASET_NS_PREFIX = 'ds' |
Definition at line 41 of file class.ilDataSet.php.
Referenced by ILIAS\Export\ImportHandler\File\XML\Export\ilHandler\hasComponentRootNode().
| const ilDataSet::EXPORT_ID = 6 |
Definition at line 48 of file class.ilDataSet.php.
| const ilDataSet::EXPORT_ID_ILIAS_LOCAL = 2 |
Definition at line 44 of file class.ilDataSet.php.
| const ilDataSet::EXPORT_ID_ILIAS_LOCAL_INVALID = 3 |
Definition at line 45 of file class.ilDataSet.php.
| const ilDataSet::EXPORT_ID_ILIAS_REMOTE = 4 |
Definition at line 46 of file class.ilDataSet.php.
| const ilDataSet::EXPORT_ID_ILIAS_REMOTE_INVALID = 5 |
Definition at line 47 of file class.ilDataSet.php.
| const ilDataSet::EXPORT_ID_INVALID = 7 |
Definition at line 49 of file class.ilDataSet.php.
| const ilDataSet::EXPORT_NO_INST_ID = 1 |
Definition at line 43 of file class.ilDataSet.php.