31 include_once
'class.ilMDBase.php';
45 $this->entity = $a_entity;
53 $this->date = $a_date;
61 $this->description = $a_desc;
65 return $this->description;
69 if(is_object($lng_obj))
71 $this->description_language =& $lng_obj;
76 return $this->description_language;
80 if(is_object($this->description_language))
82 return $this->description_language->getLanguageCode();
92 $fields[
'meta_annotation_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_annotation'));
94 if($this->db->insert(
'il_meta_annotation',$fields))
108 if($this->db->update(
'il_meta_annotation',
109 $this->__getFields(),
110 array(
"meta_annotation_id" => array(
'integer',$this->
getMetaId()))))
124 $query =
"DELETE FROM il_meta_annotation ".
125 "WHERE meta_annotation_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
136 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
137 'obj_id' => array(
'integer',$this->
getObjId()),
138 'obj_type' => array(
'text',$this->
getObjType()),
139 'entity' => array(
'clob',$this->
getEntity()),
140 'a_date' => array(
'clob',$this->
getDate()),
149 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
153 $query =
"SELECT * FROM il_meta_annotation ".
154 "WHERE meta_annotation_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
178 $writer->xmlStartTag(
'Annotation');
179 $writer->xmlElement(
'Entity',null,$this->
getEntity());
180 $writer->xmlElement(
'Date',null,$this->
getDate());
185 $writer->xmlEndTag(
'Annotation');
195 $query =
"SELECT meta_annotation_id FROM il_meta_annotation ".
196 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
197 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
203 $ids[] =
$row->meta_annotation_id;
205 return $ids ? $ids : array();