31 include_once
'class.ilMDBase.php';
45 $subs[
'Identifier'] =
'meta_identifier';
46 $subs[
'Contribute'] =
'meta_contribute';
55 include_once
'Services/MetaData/classes/class.ilMDIdentifier.php';
61 include_once
'Services/MetaData/classes/class.ilMDIdentifier.php';
68 $ide->setMetaId($a_identifier_id);
74 include_once
'Services/MetaData/classes/class.ilMDIdentifier.php';
78 $ide->setParentType(
'meta_meta_data');
85 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
91 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
98 $con->setMetaId($a_contribute_id);
104 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
108 $con->setParentType(
'meta_meta_data');
118 $this->meta_data_scheme = $a_val;
127 if(is_object($lng_obj))
129 $this->language = $lng_obj;
134 return is_object($this->language) ? $this->language :
false;
138 return is_object($this->language) ? $this->language->getLanguageCode() :
false;
147 $fields[
'meta_meta_data_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_meta_data'));
149 if($this->db->insert(
'il_meta_meta_data',$fields))
163 if($this->db->update(
'il_meta_meta_data',
164 $this->__getFields(),
165 array(
"meta_meta_data_id" => array(
'integer',$this->
getMetaId()))))
179 $query =
"DELETE FROM il_meta_meta_data ".
180 "WHERE meta_meta_data_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
204 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
205 'obj_id' => array(
'integer',$this->
getObjId()),
206 'obj_type' => array(
'text',$this->
getObjType()),
215 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
221 $query =
"SELECT * FROM il_meta_meta_data ".
222 "WHERE meta_meta_data_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
254 $writer->xmlStartTag(
'Meta-Metadata',$attr ? $attr : null);
258 foreach($identifiers as $id)
261 $ide->toXML($writer);
263 if(!count($identifiers))
265 include_once
'Services/Metadata/classes/class.ilMDIdentifier.php';
267 $ide->toXML($writer);
272 foreach($contributes as $id)
275 $con->toXML($writer);
277 if(!count($contributes))
279 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
281 $con->toXML($writer);
284 $writer->xmlEndTag(
'Meta-Metadata');
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');
299 return $row->meta_meta_data_id;