ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMDMetaMetadata Class Reference
+ Inheritance diagram for ilMDMetaMetadata:
+ Collaboration diagram for ilMDMetaMetadata:

Public Member Functions

 getPossibleSubelements ()
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getContributeIds ()
 
getContribute ($a_contribute_id)
 
addContribute ()
 
 setMetaDataScheme ($a_val)
 
 getMetaDataScheme ()
 
 setLanguage (&$lng_obj)
 
getLanguage ()
 
 getLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getContributeIds ()
 
getContribute ($a_contribute_id)
 
addContribute ()
 
 setMetaDataScheme ($a_val)
 
 getMetaDataScheme ()
 
 setLanguage (&$lng_obj)
 
getLanguage ()
 
 getLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
 _getId ($a_rbac_id, $a_obj_id)
 
 getPossibleSubelements ()
 
getIdentifierIds ()
 
getIdentifier ($a_identifier_id)
 
addIdentifier ()
 
getContributeIds ()
 
getContribute ($a_contribute_id)
 
addContribute ()
 
 setMetaDataScheme ($a_val)
 
 getMetaDataScheme ()
 
 setLanguage (&$lng_obj)
 
getLanguage ()
 
 getLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- Public Member Functions inherited from ilMDBase
 __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)
 
 __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 ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 
 __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 _getId ($a_rbac_id, $a_obj_id)
 
static _getId ($a_rbac_id, $a_obj_id)
 

Additional Inherited Members

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

Detailed Description

Definition at line 33 of file class.ilMDMetaMetadata.php.

Member Function Documentation

◆ __getFields() [1/3]

ilMDMetaMetadata::__getFields ( )

Definition at line 180 of file class.ilMDMetaMetadata.php.

References getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), and ilUtil\prepareDBString().

181  {
182  return array('rbac_id' => $this->getRBACId(),
183  'obj_id' => $this->getObjId(),
184  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
185  'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()),
186  'language' => ilUtil::prepareDBString($this->getLanguageCode()));
187  }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/3]

ilMDMetaMetadata::__getFields ( )

Definition at line 193 of file class.ilMDMetaMetadata.php.

References getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

Referenced by save().

194  {
195  return array('rbac_id' => array('integer',$this->getRBACId()),
196  'obj_id' => array('integer',$this->getObjId()),
197  'obj_type' => array('text',$this->getObjType()),
198  'meta_data_scheme' => array('text',$this->getMetaDataScheme()),
199  'language' => array('text',$this->getLanguageCode()));
200  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [3/3]

ilMDMetaMetadata::__getFields ( )

Definition at line 193 of file class.ilMDMetaMetadata.php.

References getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

194  {
195  return array('rbac_id' => array('integer',$this->getRBACId()),
196  'obj_id' => array('integer',$this->getObjId()),
197  'obj_type' => array('text',$this->getObjType()),
198  'meta_data_scheme' => array('text',$this->getMetaDataScheme()),
199  'language' => array('text',$this->getLanguageCode()));
200  }
+ Here is the call graph for this function:

◆ _getId() [1/3]

ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 245 of file class.ilMDMetaMetadata.php.

References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

246  {
247  global $ilDB;
248 
249  $query = "SELECT meta_meta_data_id FROM il_meta_meta_data " .
250  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
251  "AND obj_id = " . $ilDB->quote($a_obj_id);
252 
253  $res = $ilDB->query($query);
254  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
255  return $row->meta_meta_data_id;
256  }
257  return false;
258  }
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ _getId() [2/3]

static ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 272 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMD\getMetaMetadata().

273  {
274  global $DIC;
275 
276  $ilDB = $DIC['ilDB'];
277 
278  $query = "SELECT meta_meta_data_id FROM il_meta_meta_data " .
279  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
280  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
281 
282  $res = $ilDB->query($query);
283  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
284  return $row->meta_meta_data_id;
285  }
286  return false;
287  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ _getId() [3/3]

static ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 272 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

273  {
274  global $DIC;
275 
276  $ilDB = $DIC['ilDB'];
277 
278  $query = "SELECT meta_meta_data_id FROM il_meta_meta_data " .
279  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
280  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
281 
282  $res = $ilDB->query($query);
283  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
284  return $row->meta_meta_data_id;
285  }
286  return false;
287  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB

◆ addContribute() [1/3]

& ilMDMetaMetadata::addContribute ( )

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

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

84  {
85  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
86 
87  $con = new ilMDContribute($this->getRBACId(), $this->getObjId(), $this->getObjType());
88  $con->setParentId($this->getMetaId());
89  $con->setParentType('meta_meta_data');
90 
91  return $con;
92  }
+ Here is the call graph for this function:

◆ addContribute() [2/3]

& ilMDMetaMetadata::addContribute ( )

Definition at line 92 of file class.ilMDMetaMetadata.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

93  {
94  include_once 'Services/MetaData/classes/class.ilMDContribute.php';
95 
96  $con = new ilMDContribute($this->getRBACId(), $this->getObjId(), $this->getObjType());
97  $con->setParentId($this->getMetaId());
98  $con->setParentType('meta_meta_data');
99 
100  return $con;
101  }
+ Here is the call graph for this function:

◆ addContribute() [3/3]

& ilMDMetaMetadata::addContribute ( )

Definition at line 92 of file class.ilMDMetaMetadata.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

93  {
94  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDContribute.php';
95 
96  $con = new ilMDContribute($this->getRBACId(), $this->getObjId(), $this->getObjType());
97  $con->setParentId($this->getMetaId());
98  $con->setParentType('meta_meta_data');
99 
100  return $con;
101  }
+ Here is the call graph for this function:

◆ addIdentifier() [1/3]

& ilMDMetaMetadata::addIdentifier ( )

Definition at line 54 of file class.ilMDMetaMetadata.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

55  {
56  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
57 
58  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
59  $ide->setParentId($this->getMetaId());
60  $ide->setParentType('meta_meta_data');
61 
62  return $ide;
63  }
+ Here is the call graph for this function:

◆ addIdentifier() [2/3]

& ilMDMetaMetadata::addIdentifier ( )

Definition at line 63 of file class.ilMDMetaMetadata.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

64  {
65  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
66 
67  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
68  $ide->setParentId($this->getMetaId());
69  $ide->setParentType('meta_meta_data');
70 
71  return $ide;
72  }
+ Here is the call graph for this function:

◆ addIdentifier() [3/3]

& ilMDMetaMetadata::addIdentifier ( )

Definition at line 63 of file class.ilMDMetaMetadata.php.

References ilMDBase\getMetaId(), ilMDBase\getObjId(), ilMDBase\getObjType(), and ilMDBase\getRBACId().

64  {
65  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
66 
67  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId(), $this->getObjType());
68  $ide->setParentId($this->getMetaId());
69  $ide->setParentType('meta_meta_data');
70 
71  return $ide;
72  }
+ Here is the call graph for this function:

◆ delete() [1/3]

ilMDMetaMetadata::delete ( )

Definition at line 153 of file class.ilMDMetaMetadata.php.

References $id, $ilDB, $query, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase\getMetaId().

154  {
155  global $ilDB;
156 
157  if ($this->getMetaId()) {
158  $query = "DELETE FROM il_meta_meta_data " .
159  "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId());
160 
161  $this->db->query($query);
162 
163 
164  foreach ($this->getIdentifierIds() as $id) {
165  $ide = $this->getIdentifier($id);
166  $ide->delete();
167  }
168 
169  foreach ($this->getContributeIds() as $id) {
170  $con = $this->getContribute($id);
171  $con->delete();
172  }
173  return true;
174  }
175 
176  return false;
177  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
$query
& getContribute($a_contribute_id)
global $ilDB
+ Here is the call graph for this function:

◆ delete() [2/3]

ilMDMetaMetadata::delete ( )

Definition at line 165 of file class.ilMDMetaMetadata.php.

References $DIC, $id, $ilDB, $query, $res, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase\getMetaId().

166  {
167  global $DIC;
168 
169  $ilDB = $DIC['ilDB'];
170 
171  if ($this->getMetaId()) {
172  $query = "DELETE FROM il_meta_meta_data " .
173  "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId(), 'integer');
174  $res = $ilDB->manipulate($query);
175 
176 
177  foreach ($this->getIdentifierIds() as $id) {
178  $ide = $this->getIdentifier($id);
179  $ide->delete();
180  }
181 
182  foreach ($this->getContributeIds() as $id) {
183  $con = $this->getContribute($id);
184  $con->delete();
185  }
186  return true;
187  }
188 
189  return false;
190  }
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
foreach($_POST as $key=> $value) $res
$query
& getContribute($a_contribute_id)
global $ilDB
+ Here is the call graph for this function:

◆ delete() [3/3]

ilMDMetaMetadata::delete ( )

Definition at line 165 of file class.ilMDMetaMetadata.php.

References $DIC, $id, $ilDB, $query, $res, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase\getMetaId().

166  {
167  global $DIC;
168 
169  $ilDB = $DIC['ilDB'];
170 
171  if ($this->getMetaId()) {
172  $query = "DELETE FROM il_meta_meta_data " .
173  "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId(), 'integer');
174  $res = $ilDB->manipulate($query);
175 
176 
177  foreach ($this->getIdentifierIds() as $id) {
178  $ide = $this->getIdentifier($id);
179  $ide->delete();
180  }
181 
182  foreach ($this->getContributeIds() as $id) {
183  $con = $this->getContribute($id);
184  $con->delete();
185  }
186  return true;
187  }
188 
189  return false;
190  }
global $DIC
Definition: saml.php:7
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
foreach($_POST as $key=> $value) $res
$query
& getContribute($a_contribute_id)
global $ilDB
+ Here is the call graph for this function:

◆ getContribute() [1/3]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

Definition at line 71 of file class.ilMDMetaMetadata.php.

72  {
73  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
74 
75  if (!$a_contribute_id) {
76  return false;
77  }
78  $con = new ilMDContribute();
79  $con->setMetaId($a_contribute_id);
80 
81  return $con;
82  }

◆ getContribute() [2/3]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

81  {
82  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDContribute.php';
83 
84  if (!$a_contribute_id) {
85  return false;
86  }
87  $con = new ilMDContribute();
88  $con->setMetaId($a_contribute_id);
89 
90  return $con;
91  }

◆ getContribute() [3/3]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

Referenced by delete(), and toXML().

81  {
82  include_once 'Services/MetaData/classes/class.ilMDContribute.php';
83 
84  if (!$a_contribute_id) {
85  return false;
86  }
87  $con = new ilMDContribute();
88  $con->setMetaId($a_contribute_id);
89 
90  return $con;
91  }
+ Here is the caller graph for this function:

◆ getContributeIds() [1/3]

& ilMDMetaMetadata::getContributeIds ( )

Definition at line 65 of file class.ilMDMetaMetadata.php.

References ilMDContribute\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

66  {
67  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
68 
69  return ilMDContribute::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
70  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getContributeIds() [2/3]

& ilMDMetaMetadata::getContributeIds ( )

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

References ilMDContribute\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

75  {
76  include_once 'Services/MetaData/classes/class.ilMDContribute.php';
77 
78  return ilMDContribute::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
79  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContributeIds() [3/3]

& ilMDMetaMetadata::getContributeIds ( )

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

References ilMDContribute\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

75  {
76  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDContribute.php';
77 
78  return ilMDContribute::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
79  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getIdentifier() [1/3]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

Definition at line 42 of file class.ilMDMetaMetadata.php.

43  {
44  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
45 
46  if (!$a_identifier_id) {
47  return false;
48  }
49  $ide = new ilMDIdentifier();
50  $ide->setMetaId($a_identifier_id);
51 
52  return $ide;
53  }

◆ getIdentifier() [2/3]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

Definition at line 51 of file class.ilMDMetaMetadata.php.

52  {
53  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
54 
55  if (!$a_identifier_id) {
56  return false;
57  }
58  $ide = new ilMDIdentifier();
59  $ide->setMetaId($a_identifier_id);
60 
61  return $ide;
62  }

◆ getIdentifier() [3/3]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

Definition at line 51 of file class.ilMDMetaMetadata.php.

Referenced by delete(), and toXML().

52  {
53  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
54 
55  if (!$a_identifier_id) {
56  return false;
57  }
58  $ide = new ilMDIdentifier();
59  $ide->setMetaId($a_identifier_id);
60 
61  return $ide;
62  }
+ Here is the caller graph for this function:

◆ getIdentifierIds() [1/3]

& ilMDMetaMetadata::getIdentifierIds ( )

Definition at line 36 of file class.ilMDMetaMetadata.php.

References ilMDIdentifier\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

37  {
38  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
39 
40  return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
41  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getIdentifierIds() [2/3]

& ilMDMetaMetadata::getIdentifierIds ( )

Definition at line 45 of file class.ilMDMetaMetadata.php.

References ilMDIdentifier\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

46  {
47  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDIdentifier.php';
48 
49  return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
50  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:

◆ getIdentifierIds() [3/3]

& ilMDMetaMetadata::getIdentifierIds ( )

Definition at line 45 of file class.ilMDMetaMetadata.php.

References ilMDIdentifier\_getIds(), ilMDBase\getMetaId(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

46  {
47  include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
48 
49  return ilMDIdentifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
50  }
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLanguage() [1/3]

& ilMDMetaMetadata::getLanguage ( )

Definition at line 112 of file class.ilMDMetaMetadata.php.

113  {
114  return is_object($this->language) ? $this->language : false;
115  }

◆ getLanguage() [2/3]

& ilMDMetaMetadata::getLanguage ( )

Definition at line 121 of file class.ilMDMetaMetadata.php.

122  {
123  return is_object($this->language) ? $this->language : false;
124  }

◆ getLanguage() [3/3]

& ilMDMetaMetadata::getLanguage ( )

Definition at line 121 of file class.ilMDMetaMetadata.php.

122  {
123  return is_object($this->language) ? $this->language : false;
124  }

◆ getLanguageCode() [1/3]

ilMDMetaMetadata::getLanguageCode ( )

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

117  {
118  return is_object($this->language) ? $this->language->getLanguageCode() : false;
119  }

◆ getLanguageCode() [2/3]

ilMDMetaMetadata::getLanguageCode ( )

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

126  {
127  return is_object($this->language) ? $this->language->getLanguageCode() : false;
128  }

◆ getLanguageCode() [3/3]

ilMDMetaMetadata::getLanguageCode ( )

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

Referenced by __getFields(), and toXML().

126  {
127  return is_object($this->language) ? $this->language->getLanguageCode() : false;
128  }
+ Here is the caller graph for this function:

◆ getMetaDataScheme() [1/3]

ilMDMetaMetadata::getMetaDataScheme ( )

Definition at line 101 of file class.ilMDMetaMetadata.php.

102  {
103  // Fixed attribute
104  return 'LOM v 1.0';
105  }

◆ getMetaDataScheme() [2/3]

ilMDMetaMetadata::getMetaDataScheme ( )

Definition at line 110 of file class.ilMDMetaMetadata.php.

Referenced by __getFields(), and toXML().

111  {
112  // Fixed attribute
113  return 'LOM v 1.0';
114  }
+ Here is the caller graph for this function:

◆ getMetaDataScheme() [3/3]

ilMDMetaMetadata::getMetaDataScheme ( )

Definition at line 110 of file class.ilMDMetaMetadata.php.

111  {
112  // Fixed attribute
113  return 'LOM v 1.0';
114  }

◆ getPossibleSubelements() [1/2]

ilMDMetaMetadata::getPossibleSubelements ( )

Definition at line 35 of file class.ilMDMetaMetadata.php.

36  {
37  $subs['Identifier'] = 'meta_identifier';
38  $subs['Contribute'] = 'meta_contribute';
39 
40  return $subs;
41  }

◆ getPossibleSubelements() [2/2]

ilMDMetaMetadata::getPossibleSubelements ( )

Definition at line 35 of file class.ilMDMetaMetadata.php.

36  {
37  $subs['Identifier'] = 'meta_identifier';
38  $subs['Contribute'] = 'meta_contribute';
39 
40  return $subs;
41  }

◆ read() [1/3]

ilMDMetaMetadata::read ( )

Definition at line 189 of file class.ilMDMetaMetadata.php.

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setLanguage(), setMetaDataScheme(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), and ilUtil\stripSlashes().

190  {
191  global $ilDB;
192 
193  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
194 
195 
196  if ($this->getMetaId()) {
197  $query = "SELECT * FROM il_meta_meta_data " .
198  "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId());
199 
200 
201  $res = $this->db->query($query);
202  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
203  $this->setRBACId($row->rbac_id);
204  $this->setObjId($row->obj_id);
205  $this->setObjType($row->obj_type);
206  $this->setMetaDataScheme(ilUtil::stripSlashes($row->meta_data_scheme));
207  $this->setLanguage(new ilMDLanguageItem($row->language));
208  }
209  return true;
210  }
211  return false;
212  }
setObjType($a_type)
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$row
global $ilDB
+ Here is the call graph for this function:

◆ read() [2/3]

ilMDMetaMetadata::read ( )

Definition at line 202 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setLanguage(), setMetaDataScheme(), ilMDBase\setObjId(), ilMDBase\setObjType(), and ilMDBase\setRBACId().

203  {
204  global $DIC;
205 
206  $ilDB = $DIC['ilDB'];
207 
208  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
209 
210 
211  if ($this->getMetaId()) {
212  $query = "SELECT * FROM il_meta_meta_data " .
213  "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId(), 'integer');
214 
215 
216  $res = $this->db->query($query);
217  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
218  $this->setRBACId($row->rbac_id);
219  $this->setObjId($row->obj_id);
220  $this->setObjType($row->obj_type);
221  $this->setMetaDataScheme($row->meta_data_scheme);
222  $this->setLanguage(new ilMDLanguageItem($row->language));
223  }
224  return true;
225  }
226  return false;
227  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
$row
global $ilDB
+ Here is the call graph for this function:

◆ read() [3/3]

ilMDMetaMetadata::read ( )

Definition at line 202 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilMDBase\getMetaId(), setLanguage(), setMetaDataScheme(), ilMDBase\setObjId(), ilMDBase\setObjType(), and ilMDBase\setRBACId().

203  {
204  global $DIC;
205 
206  $ilDB = $DIC['ilDB'];
207 
208  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDLanguageItem.php';
209 
210 
211  if ($this->getMetaId()) {
212  $query = "SELECT * FROM il_meta_meta_data " .
213  "WHERE meta_meta_data_id = " . $ilDB->quote($this->getMetaId(), 'integer');
214 
215 
216  $res = $this->db->query($query);
217  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
218  $this->setRBACId($row->rbac_id);
219  $this->setObjId($row->obj_id);
220  $this->setObjType($row->obj_type);
221  $this->setMetaDataScheme($row->meta_data_scheme);
222  $this->setLanguage(new ilMDLanguageItem($row->language));
223  }
224  return true;
225  }
226  return false;
227  }
setObjType($a_type)
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
setObjId($a_id)
setRBACId($a_id)
$query
$row
global $ilDB
+ Here is the call graph for this function:

◆ save() [1/3]

ilMDMetaMetadata::save ( )

Definition at line 122 of file class.ilMDMetaMetadata.php.

References ilDBConstants\AUTOQUERY_INSERT, ilMDBase\getMetaId(), and ilMDBase\setMetaId().

123  {
124  if ($this->db->autoExecute(
125  'il_meta_meta_data',
126  $this->__getFields(),
128  )) {
129  $this->setMetaId($this->db->getLastInsertId());
130 
131  return $this->getMetaId();
132  }
133  return false;
134  }
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ save() [2/3]

ilMDMetaMetadata::save ( )

Definition at line 131 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, __getFields(), ilMDBase\getMetaId(), and ilMDBase\setMetaId().

132  {
133  global $DIC;
134 
135  $ilDB = $DIC['ilDB'];
136 
137  $fields = $this->__getFields();
138  $fields['meta_meta_data_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_meta_data'));
139 
140  if ($this->db->insert('il_meta_meta_data', $fields)) {
141  $this->setMetaId($next_id);
142  return $this->getMetaId();
143  }
144  return false;
145  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ save() [3/3]

ilMDMetaMetadata::save ( )

Definition at line 131 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, __getFields(), ilMDBase\getMetaId(), and ilMDBase\setMetaId().

132  {
133  global $DIC;
134 
135  $ilDB = $DIC['ilDB'];
136 
137  $fields = $this->__getFields();
138  $fields['meta_meta_data_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_meta_data'));
139 
140  if ($this->db->insert('il_meta_meta_data', $fields)) {
141  $this->setMetaId($next_id);
142  return $this->getMetaId();
143  }
144  return false;
145  }
global $DIC
Definition: saml.php:7
setMetaId($a_meta_id, $a_read_data=true)
global $ilDB
+ Here is the call graph for this function:

◆ setLanguage() [1/3]

ilMDMetaMetadata::setLanguage ( $lng_obj)

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

107  {
108  if (is_object($lng_obj)) {
109  $this->language = $lng_obj;
110  }
111  }

◆ setLanguage() [2/3]

ilMDMetaMetadata::setLanguage ( $lng_obj)

Definition at line 115 of file class.ilMDMetaMetadata.php.

Referenced by read().

116  {
117  if (is_object($lng_obj)) {
118  $this->language = $lng_obj;
119  }
120  }
+ Here is the caller graph for this function:

◆ setLanguage() [3/3]

ilMDMetaMetadata::setLanguage ( $lng_obj)

Definition at line 115 of file class.ilMDMetaMetadata.php.

116  {
117  if (is_object($lng_obj)) {
118  $this->language = $lng_obj;
119  }
120  }

◆ setMetaDataScheme() [1/3]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

Definition at line 97 of file class.ilMDMetaMetadata.php.

98  {
99  $this->meta_data_scheme = $a_val;
100  }

◆ setMetaDataScheme() [2/3]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

Referenced by read().

107  {
108  $this->meta_data_scheme = $a_val;
109  }
+ Here is the caller graph for this function:

◆ setMetaDataScheme() [3/3]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

107  {
108  $this->meta_data_scheme = $a_val;
109  }

◆ toXML() [1/3]

ilMDMetaMetadata::toXML ( $writer)

Definition at line 219 of file class.ilMDMetaMetadata.php.

References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and getLanguageCode().

220  {
221  if ($this->getMigration / DBUpdate_426Scheme()) {
222  $attr['Metadata-Scheme'] = $this->getMigration / DBUpdate_426Scheme();
223  }
224  if ($this->getLanguageCode()) {
225  $attr['Language'] = $this->getLanguageCode();
226  }
227  $writer->xmlStartTag('Meta-Metadata', $attr ? $attr : null);
228 
229  // ELEMENT IDENTIFIER
230  foreach ($this->getIdentifierIds() as $id) {
231  $ide = &$this->getIdentifier($id);
232  $ide->toXML($writer);
233  }
234 
235  // ELEMETN Contribute
236  foreach ($this->getContributeIds() as $id) {
237  $con = &$this->getContribute($id);
238  $con->toXML($writer);
239  }
240 
241  $writer->xmlEndTag('Meta-Metadata');
242  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
& getContribute($a_contribute_id)
+ Here is the call graph for this function:

◆ toXML() [2/3]

ilMDMetaMetadata::toXML ( $writer)

Definition at line 234 of file class.ilMDMetaMetadata.php.

References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

235  {
236  if ($this->getMetaDataScheme()) {
237  $attr['MetadataScheme'] = $this->getMetaDataScheme();
238  }
239  if ($this->getLanguageCode()) {
240  $attr['Language'] = $this->getLanguageCode();
241  }
242  $writer->xmlStartTag('Meta-Metadata', $attr ? $attr : null);
243 
244  // ELEMENT IDENTIFIER
245  $identifiers = $this->getIdentifierIds();
246  foreach ($identifiers as $id) {
247  $ide = &$this->getIdentifier($id);
248  $ide->toXML($writer);
249  }
250  if (!count($identifiers)) {
251  include_once 'Services/Metadata/classes/class.ilMDIdentifier.php';
252  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId());
253  $ide->toXML($writer);
254  }
255 
256  // ELEMETN Contribute
257  $contributes = $this->getContributeIds();
258  foreach ($contributes as $id) {
259  $con = &$this->getContribute($id);
260  $con->toXML($writer);
261  }
262  if (!count($contributes)) {
263  include_once 'Services/MetaData/classes/class.ilMDContribute.php';
264  $con = new ilMDContribute($this->getRBACId(), $this->getObjId());
265  $con->toXML($writer);
266  }
267 
268  $writer->xmlEndTag('Meta-Metadata');
269  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
& getContribute($a_contribute_id)
+ Here is the call graph for this function:

◆ toXML() [3/3]

ilMDMetaMetadata::toXML ( $writer)

Definition at line 234 of file class.ilMDMetaMetadata.php.

References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), getLanguageCode(), getMetaDataScheme(), ilMDBase\getObjId(), and ilMDBase\getRBACId().

235  {
236  if ($this->getMetaDataScheme()) {
237  $attr['MetadataScheme'] = $this->getMetaDataScheme();
238  }
239  if ($this->getLanguageCode()) {
240  $attr['Language'] = $this->getLanguageCode();
241  }
242  $writer->xmlStartTag('Meta-Metadata', $attr ? $attr : null);
243 
244  // ELEMENT IDENTIFIER
245  $identifiers = $this->getIdentifierIds();
246  foreach ($identifiers as $id) {
247  $ide = &$this->getIdentifier($id);
248  $ide->toXML($writer);
249  }
250  if (!count($identifiers)) {
251  include_once 'Services/Metadata/classes/class.ilMDIdentifier.php';
252  $ide = new ilMDIdentifier($this->getRBACId(), $this->getObjId());
253  $ide->toXML($writer);
254  }
255 
256  // ELEMETN Contribute
257  $contributes = $this->getContributeIds();
258  foreach ($contributes as $id) {
259  $con = &$this->getContribute($id);
260  $con->toXML($writer);
261  }
262  if (!count($contributes)) {
263  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMDContribute.php';
264  $con = new ilMDContribute($this->getRBACId(), $this->getObjId());
265  $con->toXML($writer);
266  }
267 
268  $writer->xmlEndTag('Meta-Metadata');
269  }
if(!array_key_exists('StateId', $_REQUEST)) $id
& getIdentifier($a_identifier_id)
& getContribute($a_contribute_id)
+ Here is the call graph for this function:

◆ update() [1/3]

ilMDMetaMetadata::update ( )

Definition at line 136 of file class.ilMDMetaMetadata.php.

References $ilDB, ilDBConstants\AUTOQUERY_UPDATE, and ilMDBase\getMetaId().

137  {
138  global $ilDB;
139 
140  if ($this->getMetaId()) {
141  if ($this->db->autoExecute(
142  'il_meta_meta_data',
143  $this->__getFields(),
145  "meta_meta_data_id = " . $ilDB->quote($this->getMetaId())
146  )) {
147  return true;
148  }
149  }
150  return false;
151  }
global $ilDB
+ Here is the call graph for this function:

◆ update() [2/3]

ilMDMetaMetadata::update ( )

Definition at line 147 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, and ilMDBase\getMetaId().

148  {
149  global $DIC;
150 
151  $ilDB = $DIC['ilDB'];
152 
153  if ($this->getMetaId()) {
154  if ($this->db->update(
155  'il_meta_meta_data',
156  $this->__getFields(),
157  array("meta_meta_data_id" => array('integer',$this->getMetaId()))
158  )) {
159  return true;
160  }
161  }
162  return false;
163  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ update() [3/3]

ilMDMetaMetadata::update ( )

Definition at line 147 of file class.ilMDMetaMetadata.php.

References $DIC, $ilDB, and ilMDBase\getMetaId().

148  {
149  global $DIC;
150 
151  $ilDB = $DIC['ilDB'];
152 
153  if ($this->getMetaId()) {
154  if ($this->db->update(
155  'il_meta_meta_data',
156  $this->__getFields(),
157  array("meta_meta_data_id" => array('integer',$this->getMetaId()))
158  )) {
159  return true;
160  }
161  }
162  return false;
163  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

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