ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilMDMetaMetadata Class Reference
+ Inheritance diagram for ilMDMetaMetadata:
+ Collaboration diagram for ilMDMetaMetadata:

Public Member Functions

 ilMDMetaMetadata ($a_rbac_id=0, $a_obj_id=0, $a_obj_type='')
 
 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)
 
 _getId ($a_rbac_id, $a_obj_id)
 
 ilMDMetaMetadata ($a_rbac_id=0, $a_obj_id=0, $a_obj_type='')
 
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
 ilMDBase ($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)
 
 ilMDBase ($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)
 

Additional Inherited Members

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

Detailed Description

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

Member Function Documentation

◆ __getFields() [1/2]

ilMDMetaMetadata::__getFields ( )

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

203 {
204 return array('rbac_id' => array('integer',$this->getRBACId()),
205 'obj_id' => array('integer',$this->getObjId()),
206 'obj_type' => array('text',$this->getObjType()),
207 'meta_data_scheme' => array('text',$this->getMetaDataScheme()),
208 'language' => array('text',$this->getLanguageCode()));
209 }

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

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getFields() [2/2]

ilMDMetaMetadata::__getFields ( )

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

194 {
195 return array('rbac_id' => $this->getRBACId(),
196 'obj_id' => $this->getObjId(),
197 'obj_type' => ilUtil::prepareDBString($this->getObjType()),
198 'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()),
199 'language' => ilUtil::prepareDBString($this->getLanguageCode()));
200 }
static prepareDBString($a_str)
prepare a string for db writing (insert/update)

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

+ Here is the call graph for this function:

◆ _getId() [1/2]

ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)

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

289 {
290 global $ilDB;
291
292 $query = "SELECT meta_meta_data_id FROM il_meta_meta_data ".
293 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
294 "AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
295
296 $res = $ilDB->query($query);
297 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
298 {
299 return $row->meta_meta_data_id;
300 }
301 return false;
302 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilMD\getMetaMetadata().

+ Here is the caller graph for this function:

◆ _getId() [2/2]

ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)

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

266 {
267 global $ilDB;
268
269 $query = "SELECT meta_meta_data_id FROM il_meta_meta_data ".
270 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
271 "AND obj_id = ".$ilDB->quote($a_obj_id);
272
273 $res = $ilDB->query($query);
274 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
275 {
276 return $row->meta_meta_data_id;
277 }
278 return false;
279 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

◆ addContribute() [1/2]

& ilMDMetaMetadata::addContribute ( )

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

103 {
104 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
105
106 $con =& new ilMDContribute($this->getRBACId(),$this->getObjId(),$this->getObjType());
107 $con->setParentId($this->getMetaId());
108 $con->setParentType('meta_meta_data');
109
110 return $con;
111 }

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

+ Here is the call graph for this function:

◆ addContribute() [2/2]

& ilMDMetaMetadata::addContribute ( )

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

94 {
95 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
96
97 $con =& new ilMDContribute($this->getRBACId(),$this->getObjId(),$this->getObjType());
98 $con->setParentId($this->getMetaId());
99 $con->setParentType('meta_meta_data');
100
101 return $con;
102 }

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

+ Here is the call graph for this function:

◆ addIdentifier() [1/2]

& ilMDMetaMetadata::addIdentifier ( )

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

73 {
74 include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
75
76 $ide =& new ilMDIdentifier($this->getRBACId(),$this->getObjId(),$this->getObjType());
77 $ide->setParentId($this->getMetaId());
78 $ide->setParentType('meta_meta_data');
79
80 return $ide;
81 }

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

+ Here is the call graph for this function:

◆ addIdentifier() [2/2]

& ilMDMetaMetadata::addIdentifier ( )

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

64 {
65 include_once 'Services/Migration/DBUpdate_426/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 }

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

+ Here is the call graph for this function:

◆ delete() [1/2]

ilMDMetaMetadata::delete ( )

Reimplemented from ilMDBase.

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

174 {
175 global $ilDB;
176
177 if($this->getMetaId())
178 {
179 $query = "DELETE FROM il_meta_meta_data ".
180 "WHERE meta_meta_data_id = ".$ilDB->quote($this->getMetaId() ,'integer');
181 $res = $ilDB->manipulate($query);
182
183
184 foreach($this->getIdentifierIds() as $id)
185 {
186 $ide = $this->getIdentifier($id);
187 $ide->delete();
188 }
189
190 foreach($this->getContributeIds() as $id)
191 {
192 $con = $this->getContribute($id);
193 $con->delete();
194 }
195 return true;
196 }
197
198 return false;
199 }
& getContribute($a_contribute_id)
& getIdentifier($a_identifier_id)

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

+ Here is the call graph for this function:

◆ delete() [2/2]

ilMDMetaMetadata::delete ( )

Reimplemented from ilMDBase.

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

164 {
165 global $ilDB;
166
167 if($this->getMetaId())
168 {
169 $query = "DELETE FROM il_meta_meta_data ".
170 "WHERE meta_meta_data_id = ".$ilDB->quote($this->getMetaId());
171
172 $this->db->query($query);
173
174
175 foreach($this->getIdentifierIds() as $id)
176 {
177 $ide = $this->getIdentifier($id);
178 $ide->delete();
179 }
180
181 foreach($this->getContributeIds() as $id)
182 {
183 $con = $this->getContribute($id);
184 $con->delete();
185 }
186 return true;
187 }
188
189 return false;
190 }

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

+ Here is the call graph for this function:

◆ getContribute() [1/2]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

90 {
91 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
92
93 if(!$a_contribute_id)
94 {
95 return false;
96 }
97 $con =& new ilMDContribute();
98 $con->setMetaId($a_contribute_id);
99
100 return $con;
101 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getContribute() [2/2]

& ilMDMetaMetadata::getContribute (   $a_contribute_id)

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

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

◆ getContributeIds() [1/2]

& ilMDMetaMetadata::getContributeIds ( )

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

84 {
85 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
86
87 return ilMDContribute::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data');
88 }
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

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

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContributeIds() [2/2]

& ilMDMetaMetadata::getContributeIds ( )

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

75 {
76 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php';
77
78 return ilMDContribute::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data');
79 }

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

+ Here is the call graph for this function:

◆ getIdentifier() [1/2]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

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

60 {
61 include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
62
63 if(!$a_identifier_id)
64 {
65 return false;
66 }
67 $ide =& new ilMDIdentifier();
68 $ide->setMetaId($a_identifier_id);
69
70 return $ide;
71 }

Referenced by delete(), and toXML().

+ Here is the caller graph for this function:

◆ getIdentifier() [2/2]

& ilMDMetaMetadata::getIdentifier (   $a_identifier_id)

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

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

◆ getIdentifierIds() [1/2]

& ilMDMetaMetadata::getIdentifierIds ( )

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

54 {
55 include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
56
57 return ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data');
58 }
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

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

Referenced by delete(), and toXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIdentifierIds() [2/2]

& ilMDMetaMetadata::getIdentifierIds ( )

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

45 {
46 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php';
47
48 return ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data');
49 }

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

+ Here is the call graph for this function:

◆ getLanguage() [1/2]

& ilMDMetaMetadata::getLanguage ( )

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

133 {
134 return is_object($this->language) ? $this->language : false;
135 }

◆ getLanguage() [2/2]

& ilMDMetaMetadata::getLanguage ( )

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

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

◆ getLanguageCode() [1/2]

ilMDMetaMetadata::getLanguageCode ( )

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

137 {
138 return is_object($this->language) ? $this->language->getLanguageCode() : false;
139 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getLanguageCode() [2/2]

ilMDMetaMetadata::getLanguageCode ( )

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

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

◆ getMetaDataScheme() [1/2]

ilMDMetaMetadata::getMetaDataScheme ( )

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

121 {
122 // Fixed attribute
123 return 'LOM v 1.0';
124 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getMetaDataScheme() [2/2]

ilMDMetaMetadata::getMetaDataScheme ( )

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

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

◆ getPossibleSubelements()

ilMDMetaMetadata::getPossibleSubelements ( )

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

44 {
45 $subs['Identifier'] = 'meta_identifier';
46 $subs['Contribute'] = 'meta_contribute';
47
48 return $subs;
49 }

◆ ilMDMetaMetadata() [1/2]

ilMDMetaMetadata::ilMDMetaMetadata (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

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

37 {
38 parent::ilMDBase($a_rbac_id,
39 $a_obj_id,
40 $a_obj_type);
41 }

◆ ilMDMetaMetadata() [2/2]

ilMDMetaMetadata::ilMDMetaMetadata (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

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

37 {
38 parent::ilMDBase($a_rbac_id,
39 $a_obj_id,
40 $a_obj_type);
41 }

◆ read() [1/2]

ilMDMetaMetadata::read ( )

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

212 {
213 global $ilDB;
214
215 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
216
217
218 if($this->getMetaId())
219 {
220
221 $query = "SELECT * FROM il_meta_meta_data ".
222 "WHERE meta_meta_data_id = ".$ilDB->quote($this->getMetaId() ,'integer');
223
224
225 $res = $this->db->query($query);
226 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
227 {
228 $this->setRBACId($row->rbac_id);
229 $this->setObjId($row->obj_id);
230 $this->setObjType($row->obj_type);
231 $this->setMetaDataScheme($row->meta_data_scheme);
232 $this->setLanguage(new ilMDLanguageItem($row->language));
233 }
234 return true;
235 }
236 return false;
237 }
setObjId($a_id)
setObjType($a_type)
setRBACId($a_id)

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

+ Here is the call graph for this function:

◆ read() [2/2]

ilMDMetaMetadata::read ( )

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

203 {
204 global $ilDB;
205
206 include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
207
208
209 if($this->getMetaId())
210 {
211
212 $query = "SELECT * FROM il_meta_meta_data ".
213 "WHERE meta_meta_data_id = ".$ilDB->quote($this->getMetaId());
214
215
216 $res = $this->db->query($query);
217 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
218 {
219 $this->setRBACId($row->rbac_id);
220 $this->setObjId($row->obj_id);
221 $this->setObjType($row->obj_type);
222 $this->setMetaDataScheme(ilUtil::stripSlashes($row->meta_data_scheme));
223 $this->setLanguage(new ilMDLanguageItem($row->language));
224 }
225 return true;
226 }
227 return false;
228 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

+ Here is the call graph for this function:

◆ save() [1/2]

ilMDMetaMetadata::save ( )

Reimplemented from ilMDBase.

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

143 {
144 global $ilDB;
145
146 $fields = $this->__getFields();
147 $fields['meta_meta_data_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_meta_data'));
148
149 if($this->db->insert('il_meta_meta_data',$fields))
150 {
151 $this->setMetaId($next_id);
152 return $this->getMetaId();
153 }
154 return false;
155 }
setMetaId($a_meta_id, $a_read_data=true)

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

+ Here is the call graph for this function:

◆ save() [2/2]

ilMDMetaMetadata::save ( )

Reimplemented from ilMDBase.

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

134 {
135 if($this->db->autoExecute('il_meta_meta_data',
136 $this->__getFields(),
137 DB_AUTOQUERY_INSERT))
138 {
139 $this->setMetaId($this->db->getLastInsertId());
140
141 return $this->getMetaId();
142 }
143 return false;
144 }

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

+ Here is the call graph for this function:

◆ setLanguage() [1/2]

ilMDMetaMetadata::setLanguage ( $lng_obj)

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

126 {
127 if(is_object($lng_obj))
128 {
129 $this->language = $lng_obj;
130 }
131 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLanguage() [2/2]

ilMDMetaMetadata::setLanguage ( $lng_obj)

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

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

◆ setMetaDataScheme() [1/2]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

117 {
118 $this->meta_data_scheme = $a_val;
119 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMetaDataScheme() [2/2]

ilMDMetaMetadata::setMetaDataScheme (   $a_val)

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

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

◆ toXML() [1/2]

ilMDMetaMetadata::toXML ( $writer)

Reimplemented from ilMDBase.

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

245 {
246 if($this->getMetaDataScheme())
247 {
248 $attr['MetadataScheme'] = $this->getMetaDataScheme();
249 }
250 if($this->getLanguageCode())
251 {
252 $attr['Language'] = $this->getLanguageCode();
253 }
254 $writer->xmlStartTag('Meta-Metadata',$attr ? $attr : null);
255
256 // ELEMENT IDENTIFIER
257 $identifiers = $this->getIdentifierIds();
258 foreach($identifiers as $id)
259 {
260 $ide =& $this->getIdentifier($id);
261 $ide->toXML($writer);
262 }
263 if(!count($identifiers))
264 {
265 include_once 'Services/Metadata/classes/class.ilMDIdentifier.php';
266 $ide = new ilMDIdentifier($this->getRBACId(),$this->getObjId());
267 $ide->toXML($writer);
268 }
269
270 // ELEMETN Contribute
271 $contributes = $this->getContributeIds();
272 foreach($contributes as $id)
273 {
274 $con =& $this->getContribute($id);
275 $con->toXML($writer);
276 }
277 if(!count($contributes))
278 {
279 include_once 'Services/MetaData/classes/class.ilMDContribute.php';
280 $con = new ilMDContribute($this->getRBACId(),$this->getObjId());
281 $con->toXML($writer);
282 }
283
284 $writer->xmlEndTag('Meta-Metadata');
285 }

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

+ Here is the call graph for this function:

◆ toXML() [2/2]

ilMDMetaMetadata::toXML ( $writer)

Reimplemented from ilMDBase.

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

236 {
237 if($this->getMigration/DBUpdate_426Scheme())
238 {
239 $attr['Metadata-Scheme'] = $this->getMigration/DBUpdate_426Scheme();
240 }
241 if($this->getLanguageCode())
242 {
243 $attr['Language'] = $this->getLanguageCode();
244 }
245 $writer->xmlStartTag('Meta-Metadata',$attr ? $attr : null);
246
247 // ELEMENT IDENTIFIER
248 foreach($this->getIdentifierIds() as $id)
249 {
250 $ide =& $this->getIdentifier($id);
251 $ide->toXML($writer);
252 }
253
254 // ELEMETN Contribute
255 foreach($this->getContributeIds() as $id)
256 {
257 $con =& $this->getContribute($id);
258 $con->toXML($writer);
259 }
260
261 $writer->xmlEndTag('Meta-Metadata');
262 }

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

+ Here is the call graph for this function:

◆ update() [1/2]

ilMDMetaMetadata::update ( )

Reimplemented from ilMDBase.

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

158 {
159 global $ilDB;
160
161 if($this->getMetaId())
162 {
163 if($this->db->update('il_meta_meta_data',
164 $this->__getFields(),
165 array("meta_meta_data_id" => array('integer',$this->getMetaId()))))
166 {
167 return true;
168 }
169 }
170 return false;
171 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

◆ update() [2/2]

ilMDMetaMetadata::update ( )

Reimplemented from ilMDBase.

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

147 {
148 global $ilDB;
149
150 if($this->getMetaId())
151 {
152 if($this->db->autoExecute('il_meta_meta_data',
153 $this->__getFields(),
154 DB_AUTOQUERY_UPDATE,
155 "meta_meta_data_id = ".$ilDB->quote($this->getMetaId())))
156 {
157 return true;
158 }
159 }
160 return false;
161 }

References $ilDB, and ilMDBase\getMetaId().

+ Here is the call graph for this function:

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