ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMD5295 Class Reference
+ Inheritance diagram for ilMD5295:
+ Collaboration diagram for ilMD5295:

Public Member Functions

getGeneral ()
 
addGeneral ()
 
getLifecycle ()
 
addLifecycle ()
 
getMetaMetadata ()
 
addMetaMetadata ()
 
getTechnical ()
 
addTechnical ()
 
getEducational ()
 
addEducational ()
 
getRights ()
 
addRights ()
 
getRelationIds ()
 
getRelation ($a_relation_id)
 
addRelation ()
 
getAnnotationIds ()
 
getAnnotation ($a_annotation_id)
 
addAnnotation ()
 
getClassificationIds ()
 
getClassification ($a_classification_id)
 
addClassification ()
 
 toXML (&$writer)
 
cloneMD ($a_rbac_id, $a_obj_id, $a_obj_type)
 
 deleteAll ()
 
- Public Member Functions inherited from ilMD5295Base
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

static _deleteAllByType ($a_type)
 

Additional Inherited Members

- Data Fields inherited from ilMD5295Base
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMD5295Base
 $log
 

Detailed Description

Definition at line 34 of file class.ilMD5295.php.

Member Function Documentation

◆ _deleteAllByType()

static ilMD5295::_deleteAllByType (   $a_type)
static

Definition at line 387 of file class.ilMD5295.php.

References $ilDB, $query, and $res.

388  {
389  global $ilDB;
390 
391  $tables = array('il_meta_annotation',
392  'il_meta_classification',
393  'il_meta_contribute',
394  'il_meta_description',
395  'il_meta_educational',
396  'il_meta_entity',
397  'il_meta_format',
398  'il_meta_general',
399  'il_meta_identifier',
400  'il_meta_identifier_',
401  'il_meta_keyword',
402  'il_meta_language',
403  'il_meta_lifecycle',
404  'il_meta_location',
405  'il_meta_meta_data',
406  'il_meta_relation',
407  'il_meta_requirement',
408  'il_meta_rights',
409  'il_meta_taxon',
410  'il_meta_taxon_path',
411  'il_meta_technical',
412  'il_meta_tar');
413 
414  foreach ($tables as $table) {
415  $query = "DELETE FROM " . $table . " " .
416  "WHERE obj_type = " . $ilDB->quote($a_type, 'text') . " ";
417  $res = $ilDB->query($query);
418  }
419 
420  return true;
421  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB

◆ addAnnotation()

& ilMD5295::addAnnotation ( )

Definition at line 213 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

214  {
215  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Annotation.php';
216 
217  $ann = new ilMD5295Annotation($this->getRBACId(), $this->getObjId(), $this->getObjType());
218 
219  return $ann;
220  }
+ Here is the call graph for this function:

◆ addClassification()

& ilMD5295::addClassification ( )

Definition at line 241 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

242  {
243  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Classification.php';
244 
245  $cla = new ilMD5295Classification($this->getRBACId(), $this->getObjId(), $this->getObjType());
246 
247  return $cla;
248  }
+ Here is the call graph for this function:

◆ addEducational()

& ilMD5295::addEducational ( )

Definition at line 137 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

138  {
139  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Educational.php';
140 
141  $edu = new ilMD5295Educational($this->getRBACId(), $this->getObjId(), $this->getObjType());
142 
143  return $edu;
144  }
+ Here is the call graph for this function:

◆ addGeneral()

& ilMD5295::addGeneral ( )

Definition at line 52 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

53  {
54  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295General.php';
55 
56  $gen = new ilMD5295General($this->getRBACId(), $this->getObjId(), $this->getObjType());
57 
58  return $gen;
59  }
+ Here is the call graph for this function:

◆ addLifecycle()

& ilMD5295::addLifecycle ( )

Definition at line 74 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

75  {
76  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Lifecycle.php';
77 
78  $lif = new ilMD5295Lifecycle($this->getRBACId(), $this->getObjId(), $this->getObjType());
79 
80  return $lif;
81  }
+ Here is the call graph for this function:

◆ addMetaMetadata()

& ilMD5295::addMetaMetadata ( )

Definition at line 95 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

96  {
97  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295MetaMetadata.php';
98 
99  $met = new ilMD5295MetaMetadata($this->getRBACId(), $this->getObjId(), $this->getObjType());
100 
101  return $met;
102  }
+ Here is the call graph for this function:

◆ addRelation()

& ilMD5295::addRelation ( )

Definition at line 185 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

186  {
187  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Relation.php';
188 
189  $rel = new ilMD5295Relation($this->getRBACId(), $this->getObjId(), $this->getObjType());
190 
191  return $rel;
192  }
+ Here is the call graph for this function:

◆ addRights()

& ilMD5295::addRights ( )

Definition at line 157 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

158  {
159  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Rights.php';
160 
161  $rig = new ilMD5295Rights($this->getRBACId(), $this->getObjId(), $this->getObjType());
162 
163  return $rig;
164  }
+ Here is the call graph for this function:

◆ addTechnical()

& ilMD5295::addTechnical ( )

Definition at line 116 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

117  {
118  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Technical.php';
119 
120  $tec = new ilMD5295Technical($this->getRBACId(), $this->getObjId(), $this->getObjType());
121 
122  return $tec;
123  }
+ Here is the call graph for this function:

◆ cloneMD()

& ilMD5295::cloneMD (   $a_rbac_id,
  $a_obj_id,
  $a_obj_type 
)

Definition at line 326 of file class.ilMD5295.php.

References ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

327  {
328  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD52952XML.php';
329 
330  // this method makes an xml export of the original meta data set
331  // and uses this xml string to clone the object
332  $md2xml = new ilMD52952XML($this->getRBACId(), $this->getObjId(), $this->getObjType());
333  $md2xml->startExport();
334 
335  // Create copier instance. For pg objects one could instantiate a ilMD5295XMLPageCopier class
336  switch ($a_obj_type) {
337  default:
338  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295XMLCopier.php';
339  $mdxmlcopier = new ilMD5295XMLCopier($md2xml->getXML(), $a_rbac_id, $a_obj_id, $a_obj_type);
340  break;
341  }
342  $mdxmlcopier->startParsing();
343 
344  return $mdxmlcopier->getMDObject();
345  }
+ Here is the call graph for this function:

◆ deleteAll()

ilMD5295::deleteAll ( )

Definition at line 347 of file class.ilMD5295.php.

References $DIC, $ilDB, $query, ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

348  {
349  global $DIC;
350 
351  $ilDB = $DIC['ilDB'];
352 
353  $tables = array('il_meta_annotation',
354  'il_meta_classification',
355  'il_meta_contribute',
356  'il_meta_description',
357  'il_meta_educational',
358  'il_meta_entity',
359  'il_meta_format',
360  'il_meta_general',
361  'il_meta_identifier',
362  'il_meta_identifier_',
363  'il_meta_keyword',
364  'il_meta_language',
365  'il_meta_lifecycle',
366  'il_meta_location',
367  'il_meta_meta_data',
368  'il_meta_relation',
369  'il_meta_requirement',
370  'il_meta_rights',
371  'il_meta_taxon',
372  'il_meta_taxon_path',
373  'il_meta_technical',
374  'il_meta_tar');
375 
376  foreach ($tables as $table) {
377  $query = "DELETE FROM " . $table . " " .
378  "WHERE rbac_id = " . $ilDB->quote($this->getRBACId()) . " " .
379  "AND obj_id = " . $ilDB->quote($this->getObjId());
380 
381  $this->db->query($query);
382  }
383 
384  return true;
385  }
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the call graph for this function:

◆ getAnnotation()

& ilMD5295::getAnnotation (   $a_annotation_id)

Definition at line 201 of file class.ilMD5295.php.

Referenced by toXML().

202  {
203  if (!$a_annotation_id) {
204  return false;
205  }
206  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Annotation.php';
207 
208  $ann = new ilMD5295Annotation();
209  $ann->setMetaId($a_annotation_id);
210 
211  return $ann;
212  }
+ Here is the caller graph for this function:

◆ getAnnotationIds()

& ilMD5295::getAnnotationIds ( )

Definition at line 195 of file class.ilMD5295.php.

References ilMD5295Annotation\_getIds(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

196  {
197  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Annotation.php';
198 
199  return ilMD5295Annotation::_getIds($this->getRBACId(), $this->getObjId());
200  }
static _getIds($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassification()

& ilMD5295::getClassification (   $a_classification_id)

Definition at line 228 of file class.ilMD5295.php.

Referenced by toXML().

229  {
230  if (!$a_classification_id) {
231  return false;
232  }
233 
234  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Classification.php';
235 
236  $cla = new ilMD5295Classification();
237  $cla->setMetaId($a_classification_id);
238 
239  return $cla;
240  }
+ Here is the caller graph for this function:

◆ getClassificationIds()

& ilMD5295::getClassificationIds ( )

Definition at line 222 of file class.ilMD5295.php.

References ilMD5295Classification\_getIds(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

223  {
224  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Classification.php';
225 
226  return ilMD5295Classification::_getIds($this->getRBACId(), $this->getObjId());
227  }
static _getIds($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEducational()

& ilMD5295::getEducational ( )

Definition at line 125 of file class.ilMD5295.php.

References ilMD5295Educational\_getId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

126  {
127  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Educational.php';
128 
129  if ($id = ilMD5295Educational::_getId($this->getRBACId(), $this->getObjId())) {
130  $edu = new ilMD5295Educational();
131  $edu->setMetaId($id);
132 
133  return $edu;
134  }
135  return false;
136  }
static _getId($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGeneral()

& ilMD5295::getGeneral ( )

Definition at line 40 of file class.ilMD5295.php.

References ilMD5295General\_getId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

41  {
42  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295General.php';
43 
44  if ($id = ilMD5295General::_getId($this->getRBACId(), $this->getObjId())) {
45  $gen = new ilMD5295General();
46  $gen->setMetaId($id);
47 
48  return $gen;
49  }
50  return false;
51  }
static _getId($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLifecycle()

& ilMD5295::getLifecycle ( )

Definition at line 62 of file class.ilMD5295.php.

References ilMD5295Lifecycle\_getId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

63  {
64  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Lifecycle.php';
65 
66  if ($id = ilMD5295Lifecycle::_getId($this->getRBACId(), $this->getObjId())) {
67  $lif = new ilMD5295Lifecycle();
68  $lif->setMetaId($id);
69 
70  return $lif;
71  }
72  return false;
73  }
static _getId($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMetaMetadata()

& ilMD5295::getMetaMetadata ( )

Definition at line 83 of file class.ilMD5295.php.

References ilMD5295MetaMetadata\_getId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

84  {
85  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295MetaMetadata.php';
86 
87  if ($id = ilMD5295MetaMetadata::_getId($this->getRBACId(), $this->getObjId())) {
88  $met = new ilMD5295MetaMetadata();
89  $met->setMetaId($id);
90 
91  return $met;
92  }
93  return false;
94  }
static _getId($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRelation()

& ilMD5295::getRelation (   $a_relation_id)

Definition at line 172 of file class.ilMD5295.php.

Referenced by toXML().

173  {
174  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Relation.php';
175 
176  if (!$a_relation_id) {
177  return false;
178  }
179 
180  $rel = new ilMD5295Relation();
181  $rel->setMetaId($a_relation_id);
182 
183  return $rel;
184  }
+ Here is the caller graph for this function:

◆ getRelationIds()

& ilMD5295::getRelationIds ( )

Definition at line 166 of file class.ilMD5295.php.

References ilMD5295Relation\_getIds(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

167  {
168  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Relation.php';
169 
170  return ilMD5295Relation::_getIds($this->getRBACId(), $this->getObjId());
171  }
static _getIds($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRights()

& ilMD5295::getRights ( )

Definition at line 145 of file class.ilMD5295.php.

References ilMD5295Rights\_getId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

146  {
147  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Rights.php';
148 
149  if ($id = ilMD5295Rights::_getId($this->getRBACId(), $this->getObjId())) {
150  $rig = new ilMD5295Rights();
151  $rig->setMetaId($id);
152 
153  return $rig;
154  }
155  return false;
156  }
static _getId($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTechnical()

& ilMD5295::getTechnical ( )

Definition at line 104 of file class.ilMD5295.php.

References ilMD5295Technical\_getId(), ilMD5295Base\getObjId(), and ilMD5295Base\getRBACId().

Referenced by toXML().

105  {
106  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Technical.php';
107 
108  if ($id = ilMD5295Technical::_getId($this->getRBACId(), $this->getObjId())) {
109  $tec = new ilMD5295Technical();
110  $tec->setMetaId($id);
111 
112  return $tec;
113  }
114  return false;
115  }
static _getId($a_rbac_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toXML()

ilMD5295::toXML ( $writer)

Definition at line 255 of file class.ilMD5295.php.

References getAnnotation(), getAnnotationIds(), getClassification(), getClassificationIds(), getEducational(), ilMD5295Base\getExportMode(), getGeneral(), getLifecycle(), getMetaMetadata(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), ilMD5295Base\getRBACId(), getRelation(), getRelationIds(), getRights(), and getTechnical().

256  {
257  $writer->xmlStartTag('MetaData');
258 
259  // General
260  if (is_object($gen = &$this->getGeneral())) {
261  $gen->setExportMode($this->getExportMode());
262  $gen->toXML($writer);
263  } else {
264  // Defaults
265  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295General.php';
266  $gen = new ilMD5295General($this->getRBACId(), $this->getObjId(), $this->getObjType()); // added type, alex, 31 Oct 2007
267  $gen->setExportMode($this->getExportMode());
268  $gen->toXML($writer);
269  }
270 
271 
272  // Lifecycle
273  if (is_object($lif = &$this->getLifecycle())) {
274  $lif->toXML($writer);
275  }
276 
277  // Meta-Metadata
278  if (is_object($met = &$this->getMetaMetadata())) {
279  $met->toXML($writer);
280  }
281 
282  // Technical
283  if (is_object($tec = &$this->getTechnical())) {
284  $tec->toXML($writer);
285  }
286 
287  // Educational
288  if (is_object($edu = &$this->getEducational())) {
289  $edu->toXML($writer);
290  }
291 
292  // Rights
293  if (is_object($rig = &$this->getRights())) {
294  $rig->toXML($writer);
295  }
296 
297  // Relations
298  foreach ($this->getRelationIds() as $id) {
299  $rel = &$this->getRelation($id);
300  $rel->toXML($writer);
301  }
302 
303  // Annotations
304  foreach ($this->getAnnotationIds() as $id) {
305  $ann = &$this->getAnnotation($id);
306  $ann->toXML($writer);
307  }
308 
309  // Classification
310  foreach ($this->getClassificationIds() as $id) {
311  $cla = &$this->getClassification($id);
312  $cla->toXML($writer);
313  }
314 
315  $writer->xmlEndTag('MetaData');
316  }
& getMetaMetadata()
& getClassification($a_classification_id)
& getClassificationIds()
& getRelationIds()
& getAnnotation($a_annotation_id)
& getLifecycle()
& getEducational()
& getAnnotationIds()
& getRelation($a_relation_id)
+ Here is the call graph for this function:

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