3 require_once(
"./Services/DataSet/classes/class.ilDataSet.php");
4 require_once(
'class.ilObjBibliographic.php');
47 parent::__construct();
57 return array(
'4.5.0' );
68 return 'http://www.ilias.de/xml/Modules/Bibliographic/' . $a_entity;
79 public function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version) {
83 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'id']))
90 $new_obj->setTitle($a_rec[
'title']);
91 $new_obj->setDescription($a_rec[
'description']);
92 $new_obj->setFilename($a_rec[
'fileName']);
93 $new_obj->setOnline(
false);
94 if (!$new_obj->getId()) {
97 $this->import_bib_object = $new_obj;
98 $a_mapping->addMapping(
'Modules/Bibliographic',
'bibl', $a_rec[
'id'], $new_obj->getId());
113 protected function getTypes($a_entity, $a_version) {
119 "description" =>
"text",
120 "filename" =>
"text",
121 'is_online' =>
'integer',
151 public function readData($a_entity, $a_version, $a_ids) {
152 $this->data = array();
153 if (! is_array($a_ids)) {
154 $a_ids = array( $a_ids );
169 foreach ($a_ids as $bibl_id) {
174 'title' => $obj->getTitle(),
175 'description' => $obj->getDescription(),
176 'fileName' => $obj->getFilename(),
177 'is_online' => $obj->getOnline(),
179 $this->data[] =
$data;
194 copy($obj->getFileAbsolutePath(), $this->absolute_export_dir .
"/" . $obj->getFilename());
203 .
"/Modules/Bibliographic/set_1/expDir_1/" . $this->import_bib_object->getFilename();
204 $new_id = $this->import_bib_object->getId();
207 copy($import_path, $new_path .
"/" . $this->import_bib_object->getFilename());
209 $this->import_bib_object->update();
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Return dependencies form entities to other entities (in our case these are all the DB relations) ...
Bibliographic dataset class.
getXmlNamespace($a_entity, $a_schema_version)
_readData($a_entity, $a_ids)
Build data array, data is read from cache except bibl object itself.
getImportDirectory()
Get import directory.
readData($a_entity, $a_version, $a_ids)
Read data from Cache for a given entity and ID(s)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getTypes($a_entity, $a_version)
Map XML attributes of entities to datatypes (text, integer...)
static _lookupType($a_id, $a_reference=false)
lookup object type
static getDataDir()
get data directory (outside webspace)
Class ilObjBibliographic.
A dataset contains in data in a common structure that can be shared and transformed for different pur...
$record_field_ids_2_storage
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
importLibraryFile($a_mapping)