ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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)
 
- 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)
 

Static Public Member Functions

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/2]

ilMDMetaMetadata::__getFields ( )

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

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

186  {
187  return array('rbac_id' => $this->getRBACId(),
188  'obj_id' => $this->getObjId(),
189  'obj_type' => ilUtil::prepareDBString($this->getObjType()),
190  'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()),
191  'language' => ilUtil::prepareDBString($this->getLanguageCode()));
192  }
Create styles array
The data for the language used.
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ __getFields() [2/2]

ilMDMetaMetadata::__getFields ( )

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

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

Referenced by save().

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

◆ _getId() [1/2]

ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)

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

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

258  {
259  global $ilDB;
260 
261  $query = "SELECT meta_meta_data_id FROM il_meta_meta_data ".
262  "WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
263  "AND obj_id = ".$ilDB->quote($a_obj_id);
264 
265  $res = $ilDB->query($query);
266  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
267  {
268  return $row->meta_meta_data_id;
269  }
270  return false;
271  }
global $ilDB

◆ _getId() [2/2]

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

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

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

Referenced by ilMD\getMetaMetadata().

281  {
282  global $ilDB;
283 
284  $query = "SELECT meta_meta_data_id FROM il_meta_meta_data ".
285  "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
286  "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
287 
288  $res = $ilDB->query($query);
289  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
290  {
291  return $row->meta_meta_data_id;
292  }
293  return false;
294  }
global $ilDB
+ Here is the caller graph for this function:

◆ addContribute() [1/2]

& ilMDMetaMetadata::addContribute ( )

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

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

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

◆ addContribute() [2/2]

& ilMDMetaMetadata::addContribute ( )

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

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

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

◆ addIdentifier() [1/2]

& ilMDMetaMetadata::addIdentifier ( )

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

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

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

◆ addIdentifier() [2/2]

& ilMDMetaMetadata::addIdentifier ( )

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

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

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

◆ delete() [1/2]

ilMDMetaMetadata::delete ( )

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

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

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

◆ delete() [2/2]

ilMDMetaMetadata::delete ( )

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

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

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

◆ getContribute() [1/2]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

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

◆ getContribute() [2/2]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

Referenced by delete(), and toXML().

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

◆ getContributeIds() [1/2]

& ilMDMetaMetadata::getContributeIds ( )

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

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

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

◆ getContributeIds() [2/2]

& ilMDMetaMetadata::getContributeIds ( )

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

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

Referenced by delete(), and toXML().

76  {
77  include_once 'Services/MetaData/classes/class.ilMDContribute.php';
78 
79  return ilMDContribute::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data');
80  }
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:

◆ getIdentifier() [1/2]

& 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  {
48  return false;
49  }
50  $ide = new ilMDIdentifier();
51  $ide->setMetaId($a_identifier_id);
52 
53  return $ide;
54  }

◆ getIdentifier() [2/2]

& 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  {
57  return false;
58  }
59  $ide = new ilMDIdentifier();
60  $ide->setMetaId($a_identifier_id);
61 
62  return $ide;
63  }
+ Here is the caller graph for this function:

◆ getIdentifierIds() [1/2]

& 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/2]

& 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/2]

& ilMDMetaMetadata::getLanguage ( )

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

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

◆ getLanguage() [2/2]

& ilMDMetaMetadata::getLanguage ( )

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

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

◆ getLanguageCode() [1/2]

ilMDMetaMetadata::getLanguageCode ( )

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

120  {
121  return is_object($this->language) ? $this->language->getLanguageCode() : false;
122  }

◆ getLanguageCode() [2/2]

ilMDMetaMetadata::getLanguageCode ( )

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

Referenced by __getFields(), and toXML().

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

◆ getMetaDataScheme() [1/2]

ilMDMetaMetadata::getMetaDataScheme ( )

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

104  {
105  // Fixed attribute
106  return 'LOM v 1.0';
107  }

◆ getMetaDataScheme() [2/2]

ilMDMetaMetadata::getMetaDataScheme ( )

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

Referenced by __getFields(), and toXML().

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

◆ getPossibleSubelements()

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/2]

ilMDMetaMetadata::read ( )

Definition at line 194 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().

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

◆ read() [2/2]

ilMDMetaMetadata::read ( )

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

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

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

◆ save() [1/2]

ilMDMetaMetadata::save ( )

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

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

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

◆ save() [2/2]

ilMDMetaMetadata::save ( )

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

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

135  {
136  global $ilDB;
137 
138  $fields = $this->__getFields();
139  $fields['meta_meta_data_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_meta_data'));
140 
141  if($this->db->insert('il_meta_meta_data',$fields))
142  {
143  $this->setMetaId($next_id);
144  return $this->getMetaId();
145  }
146  return false;
147  }
setMetaId($a_meta_id, $a_read_data=true)
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ setLanguage() [1/2]

ilMDMetaMetadata::setLanguage ( $lng_obj)

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

109  {
110  if(is_object($lng_obj))
111  {
112  $this->language = $lng_obj;
113  }
114  }

◆ setLanguage() [2/2]

ilMDMetaMetadata::setLanguage ( $lng_obj)

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

Referenced by read().

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

◆ setMetaDataScheme() [1/2]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

100  {
101  $this->meta_data_scheme = $a_val;
102  }

◆ setMetaDataScheme() [2/2]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

Referenced by read().

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

◆ toXML() [1/2]

ilMDMetaMetadata::toXML ( $writer)

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

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

228  {
229  if($this->getMigration/DBUpdate_426Scheme())
230  {
231  $attr['Metadata-Scheme'] = $this->getMigration/DBUpdate_426Scheme();
232  }
233  if($this->getLanguageCode())
234  {
235  $attr['Language'] = $this->getLanguageCode();
236  }
237  $writer->xmlStartTag('Meta-Metadata',$attr ? $attr : null);
238 
239  // ELEMENT IDENTIFIER
240  foreach($this->getIdentifierIds() as $id)
241  {
242  $ide =& $this->getIdentifier($id);
243  $ide->toXML($writer);
244  }
245 
246  // ELEMETN Contribute
247  foreach($this->getContributeIds() as $id)
248  {
249  $con =& $this->getContribute($id);
250  $con->toXML($writer);
251  }
252 
253  $writer->xmlEndTag('Meta-Metadata');
254  }
& getIdentifier($a_identifier_id)
& getContribute($a_contribute_id)
+ Here is the call graph for this function:

◆ toXML() [2/2]

ilMDMetaMetadata::toXML ( $writer)

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

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

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

◆ update() [1/2]

ilMDMetaMetadata::update ( )

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

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

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

◆ update() [2/2]

ilMDMetaMetadata::update ( )

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

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

150  {
151  global $ilDB;
152 
153  if($this->getMetaId())
154  {
155  if($this->db->update('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  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

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