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) |
Definition at line 33 of file class.ilMDMetaMetadata.php.
ilMDMetaMetadata::__getFields | ( | ) |
Definition at line 198 of file class.ilMDMetaMetadata.php.
References getLanguageCode(), getMetaDataScheme(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'meta_data_scheme' => $this->getMetaDataScheme(), 'language' => $this->getLanguageCode()); }
ilMDMetaMetadata::__getFields | ( | ) |
Definition at line 189 of file class.ilMDMetaMetadata.php.
References getLanguageCode(), getMetaDataScheme(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().
{ return array('rbac_id' => $this->getRBACId(), 'obj_id' => $this->getObjId(), 'obj_type' => ilUtil::prepareDBString($this->getObjType()), 'meta_data_scheme' => ilUtil::prepareDBString($this->getMetaDataScheme()), 'language' => ilUtil::prepareDBString($this->getLanguageCode())); }
ilMDMetaMetadata::_getId | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 282 of file class.ilMDMetaMetadata.php.
References $query, $res, and $row.
Referenced by ilMD::getMetaMetadata().
{ global $ilDB; $query = "SELECT meta_meta_data_id FROM il_meta_meta_data ". "WHERE rbac_id = '".$a_rbac_id."' ". "AND obj_id = '".$a_obj_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { return $row->meta_meta_data_id; } return false; }
ilMDMetaMetadata::_getId | ( | $ | a_rbac_id, | |
$ | a_obj_id | |||
) |
Definition at line 259 of file class.ilMDMetaMetadata.php.
& ilMDMetaMetadata::addContribute | ( | ) |
Definition at line 102 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDContribute.php'; $con =& new ilMDContribute($this->getRBACId(),$this->getObjId(),$this->getObjType()); $con->setParentId($this->getMetaId()); $con->setParentType('meta_meta_data'); return $con; }
& ilMDMetaMetadata::addContribute | ( | ) |
Definition at line 93 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php'; $con =& new ilMDContribute($this->getRBACId(),$this->getObjId(),$this->getObjType()); $con->setParentId($this->getMetaId()); $con->setParentType('meta_meta_data'); return $con; }
& ilMDMetaMetadata::addIdentifier | ( | ) |
Definition at line 72 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; $ide =& new ilMDIdentifier($this->getRBACId(),$this->getObjId(),$this->getObjType()); $ide->setParentId($this->getMetaId()); $ide->setParentType('meta_meta_data'); return $ide; }
& ilMDMetaMetadata::addIdentifier | ( | ) |
Definition at line 63 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId(), ilMDBase::getObjId(), ilMDBase::getObjType(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php'; $ide =& new ilMDIdentifier($this->getRBACId(),$this->getObjId(),$this->getObjType()); $ide->setParentId($this->getMetaId()); $ide->setParentType('meta_meta_data'); return $ide; }
ilMDMetaMetadata::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 170 of file class.ilMDMetaMetadata.php.
References $id, $query, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_meta_data ". "WHERE meta_meta_data_id = '".$this->getMetaId()."'"; $this->db->query($query); foreach($this->getIdentifierIds() as $id) { $ide = $this->getIdentifier($id); $ide->delete(); } foreach($this->getContributeIds() as $id) { $con = $this->getContribute($id); $con->delete(); } return true; } return false; }
ilMDMetaMetadata::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 161 of file class.ilMDMetaMetadata.php.
References $id, $query, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and ilMDBase::getMetaId().
{ if($this->getMetaId()) { $query = "DELETE FROM il_meta_meta_data ". "WHERE meta_meta_data_id = '".$this->getMetaId()."'"; $this->db->query($query); foreach($this->getIdentifierIds() as $id) { $ide = $this->getIdentifier($id); $ide->delete(); } foreach($this->getContributeIds() as $id) { $con = $this->getContribute($id); $con->delete(); } return true; } return false; }
& ilMDMetaMetadata::getContribute | ( | $ | a_contribute_id | ) |
Definition at line 89 of file class.ilMDMetaMetadata.php.
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDContribute.php'; if(!$a_contribute_id) { return false; } $con =& new ilMDContribute(); $con->setMetaId($a_contribute_id); return $con; }
& ilMDMetaMetadata::getContribute | ( | $ | a_contribute_id | ) |
Definition at line 80 of file class.ilMDMetaMetadata.php.
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php'; if(!$a_contribute_id) { return false; } $con =& new ilMDContribute(); $con->setMetaId($a_contribute_id); return $con; }
& ilMDMetaMetadata::getContributeIds | ( | ) |
Definition at line 74 of file class.ilMDMetaMetadata.php.
References ilMDContribute::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDContribute.php'; return ilMDContribute::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data'); }
& ilMDMetaMetadata::getContributeIds | ( | ) |
Definition at line 83 of file class.ilMDMetaMetadata.php.
References ilMDContribute::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDContribute.php'; return ilMDContribute::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data'); }
& ilMDMetaMetadata::getIdentifier | ( | $ | a_identifier_id | ) |
Definition at line 59 of file class.ilMDMetaMetadata.php.
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; if(!$a_identifier_id) { return false; } $ide =& new ilMDIdentifier(); $ide->setMetaId($a_identifier_id); return $ide; }
& ilMDMetaMetadata::getIdentifier | ( | $ | a_identifier_id | ) |
Definition at line 50 of file class.ilMDMetaMetadata.php.
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php'; if(!$a_identifier_id) { return false; } $ide =& new ilMDIdentifier(); $ide->setMetaId($a_identifier_id); return $ide; }
& ilMDMetaMetadata::getIdentifierIds | ( | ) |
Definition at line 53 of file class.ilMDMetaMetadata.php.
References ilMDIdentifier::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
Referenced by delete(), and toXML().
{ include_once 'Services/MetaData/classes/class.ilMDIdentifier.php'; return ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data'); }
& ilMDMetaMetadata::getIdentifierIds | ( | ) |
Definition at line 44 of file class.ilMDMetaMetadata.php.
References ilMDIdentifier::_getIds(), ilMDBase::getMetaId(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDIdentifier.php'; return ilMDIdentifier::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_meta_data'); }
& ilMDMetaMetadata::getLanguage | ( | ) |
Definition at line 132 of file class.ilMDMetaMetadata.php.
{ return is_object($this->language) ? $this->language : false; }
& ilMDMetaMetadata::getLanguage | ( | ) |
Definition at line 123 of file class.ilMDMetaMetadata.php.
{ return is_object($this->language) ? $this->language : false; }
ilMDMetaMetadata::getLanguageCode | ( | ) |
Definition at line 127 of file class.ilMDMetaMetadata.php.
{ return is_object($this->language) ? $this->language->getLanguageCode() : false; }
ilMDMetaMetadata::getLanguageCode | ( | ) |
Definition at line 136 of file class.ilMDMetaMetadata.php.
Referenced by __getFields(), and toXML().
{ return is_object($this->language) ? $this->language->getLanguageCode() : false; }
ilMDMetaMetadata::getMetaDataScheme | ( | ) |
Definition at line 120 of file class.ilMDMetaMetadata.php.
Referenced by __getFields(), and toXML().
{ // Fixed attribute return 'LOM v 1.0'; }
ilMDMetaMetadata::getMetaDataScheme | ( | ) |
Definition at line 111 of file class.ilMDMetaMetadata.php.
{ // Fixed attribute return 'LOM v 1.0'; }
ilMDMetaMetadata::getPossibleSubelements | ( | ) |
Definition at line 43 of file class.ilMDMetaMetadata.php.
{ $subs['Identifier'] = 'meta_identifier'; $subs['Contribute'] = 'meta_contribute'; return $subs; }
ilMDMetaMetadata::ilMDMetaMetadata | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDMetaMetadata.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDMetaMetadata::ilMDMetaMetadata | ( | $ | a_rbac_id = 0 , |
|
$ | a_obj_id = 0 , |
|||
$ | a_obj_type = '' | |||
) |
Definition at line 36 of file class.ilMDMetaMetadata.php.
References ilMDBase::ilMDBase().
{ parent::ilMDBase($a_rbac_id, $a_obj_id, $a_obj_type); }
ilMDMetaMetadata::read | ( | ) |
Definition at line 198 of file class.ilMDMetaMetadata.php.
References $query, $res, $row, ilMDBase::getMetaId(), setLanguage(), setMetaDataScheme(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setRBACId(), and ilUtil::stripSlashes().
{ include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_meta_data ". "WHERE meta_meta_data_id = '".$this->getMetaId()."'"; $res = $this->db->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setRBACId($row->rbac_id); $this->setObjId($row->obj_id); $this->setObjType($row->obj_type); $this->setMetaDataScheme(ilUtil::stripSlashes($row->meta_data_scheme)); $this->setLanguage(new ilMDLanguageItem($row->language)); } return true; } return false; }
ilMDMetaMetadata::read | ( | ) |
Definition at line 207 of file class.ilMDMetaMetadata.php.
References $query, $res, $row, ilMDBase::getMetaId(), setLanguage(), setMetaDataScheme(), ilMDBase::setObjId(), ilMDBase::setObjType(), and ilMDBase::setRBACId().
{ include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php'; if($this->getMetaId()) { $query = "SELECT * FROM il_meta_meta_data ". "WHERE meta_meta_data_id = '".$this->getMetaId()."'"; $res = $this->db->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->setRBACId($row->rbac_id); $this->setObjId($row->obj_id); $this->setObjType($row->obj_type); $this->setMetaDataScheme($row->meta_data_scheme); $this->setLanguage(new ilMDLanguageItem($row->language)); } return true; } return false; }
ilMDMetaMetadata::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 142 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_meta_data', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDMetaMetadata::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 133 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{ if($this->db->autoExecute('il_meta_meta_data', $this->__getFields(), DB_AUTOQUERY_INSERT)) { $this->setMetaId($this->db->getLastInsertId()); return $this->getMetaId(); } return false; }
ilMDMetaMetadata::setLanguage | ( | &$ | lng_obj | ) |
Definition at line 116 of file class.ilMDMetaMetadata.php.
{
if(is_object($lng_obj))
{
$this->language = $lng_obj;
}
}
ilMDMetaMetadata::setLanguage | ( | &$ | lng_obj | ) |
Definition at line 125 of file class.ilMDMetaMetadata.php.
Referenced by read().
{
if(is_object($lng_obj))
{
$this->language = $lng_obj;
}
}
ilMDMetaMetadata::setMetaDataScheme | ( | $ | a_val | ) |
Definition at line 107 of file class.ilMDMetaMetadata.php.
{ $this->meta_data_scheme = $a_val; }
ilMDMetaMetadata::setMetaDataScheme | ( | $ | a_val | ) |
Definition at line 116 of file class.ilMDMetaMetadata.php.
Referenced by read().
{ $this->meta_data_scheme = $a_val; }
ilMDMetaMetadata::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 229 of file class.ilMDMetaMetadata.php.
References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), and getLanguageCode().
{ if($this->getMigration/DBUpdate_426Scheme()) { $attr['Metadata-Scheme'] = $this->getMigration/DBUpdate_426Scheme(); } if($this->getLanguageCode()) { $attr['Language'] = $this->getLanguageCode(); } $writer->xmlStartTag('Meta-Metadata',$attr ? $attr : null); // ELEMENT IDENTIFIER foreach($this->getIdentifierIds() as $id) { $ide =& $this->getIdentifier($id); $ide->toXML($writer); } // ELEMETN Contribute foreach($this->getContributeIds() as $id) { $con =& $this->getContribute($id); $con->toXML($writer); } $writer->xmlEndTag('Meta-Metadata'); }
ilMDMetaMetadata::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 238 of file class.ilMDMetaMetadata.php.
References $id, getContribute(), getContributeIds(), getIdentifier(), getIdentifierIds(), getLanguageCode(), getMetaDataScheme(), ilMDBase::getObjId(), and ilMDBase::getRBACId().
{ if($this->getMetaDataScheme()) { $attr['MetadataScheme'] = $this->getMetaDataScheme(); } if($this->getLanguageCode()) { $attr['Language'] = $this->getLanguageCode(); } $writer->xmlStartTag('Meta-Metadata',$attr ? $attr : null); // ELEMENT IDENTIFIER $identifiers = $this->getIdentifierIds(); foreach($identifiers as $id) { $ide =& $this->getIdentifier($id); $ide->toXML($writer); } if(!count($identifiers)) { include_once 'Services/Metadata/classes/class.ilMDIdentifier.php'; $ide = new ilMDIdentifier($this->getRBACId(),$this->getObjId()); $ide->toXML($writer); } // ELEMETN Contribute $contributes = $this->getContributeIds(); foreach($contributes as $id) { $con =& $this->getContribute($id); $con->toXML($writer); } if(!count($contributes)) { include_once 'Services/MetaData/classes/class.ilMDContribute.php'; $con = new ilMDContribute($this->getRBACId(),$this->getObjId()); $con->toXML($writer); } $writer->xmlEndTag('Meta-Metadata'); }
ilMDMetaMetadata::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 146 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_meta_data', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_meta_data_id = '".$this->getMetaId()."'")) { return true; } } return false; }
ilMDMetaMetadata::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 155 of file class.ilMDMetaMetadata.php.
References ilMDBase::getMetaId().
{ if($this->getMetaId()) { if($this->db->autoExecute('il_meta_meta_data', $this->__getFields(), DB_AUTOQUERY_UPDATE, "meta_meta_data_id = '".$this->getMetaId()."'")) { return true; } } return false; }