ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 ()
 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 ()

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

ilMDMetaMetadata::__getFields ( )

Definition at line 193 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()));
}

+ Here is the call graph for this function:

ilMDMetaMetadata::__getFields ( )

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

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

Referenced by save().

{
return array('rbac_id' => array('integer',$this->getRBACId()),
'obj_id' => array('integer',$this->getObjId()),
'obj_type' => array('text',$this->getObjType()),
'meta_data_scheme' => array('text',$this->getMetaDataScheme()),
'language' => array('text',$this->getLanguageCode()));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMDMetaMetadata::_getId (   $a_rbac_id,
  $a_obj_id 
)

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

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

{
global $ilDB;
$query = "SELECT meta_meta_data_id FROM il_meta_meta_data ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
"AND obj_id = ".$ilDB->quote($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 288 of file class.ilMDMetaMetadata.php.

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

Referenced by ilMD\getMetaMetadata().

{
global $ilDB;
$query = "SELECT meta_meta_data_id FROM il_meta_meta_data ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
"AND obj_id = ".$ilDB->quote($a_obj_id ,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->meta_meta_data_id;
}
return false;
}

+ Here is the caller graph for this function:

& 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;
}

+ Here is the call graph for this function:

& 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;
}

+ Here is the call graph for this function:

& 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;
}

+ Here is the call graph for this function:

& 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;
}

+ Here is the call graph for this function:

ilMDMetaMetadata::delete ( )

Reimplemented from ilMDBase.

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

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

{
global $ilDB;
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_meta_data ".
"WHERE meta_meta_data_id = ".$ilDB->quote($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;
}

+ Here is the call graph for this function:

ilMDMetaMetadata::delete ( )

Reimplemented from ilMDBase.

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

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

{
global $ilDB;
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_meta_data ".
"WHERE meta_meta_data_id = ".$ilDB->quote($this->getMetaId() ,'integer');
$res = $ilDB->manipulate($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;
}

+ Here is the call graph for this function:

& 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::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;
}

+ Here is the caller graph for this function:

& 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');
}

+ Here is the call graph for this function:

& 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');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& 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::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;
}

+ Here is the caller graph for this function:

& 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');
}

+ Here is the call graph for this function:

& 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');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDMetaMetadata::getLanguage ( )

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

{
return is_object($this->language) ? $this->language : false;
}
& ilMDMetaMetadata::getLanguage ( )

Definition at line 132 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;
}

+ Here is the caller graph for this function:

ilMDMetaMetadata::getMetaDataScheme ( )

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

{
// Fixed attribute
return 'LOM v 1.0';
}
ilMDMetaMetadata::getMetaDataScheme ( )

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

Referenced by __getFields(), and toXML().

{
// Fixed attribute
return 'LOM v 1.0';
}

+ Here is the caller graph for this function:

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);
}

+ Here is the call graph for this function:

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);
}

+ Here is the call graph for this function:

ilMDMetaMetadata::read ( )

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

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

{
global $ilDB;
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 = ".$ilDB->quote($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;
}

+ Here is the call graph for this function:

ilMDMetaMetadata::read ( )

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

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

{
global $ilDB;
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_meta_data ".
"WHERE meta_meta_data_id = ".$ilDB->quote($this->getMetaId() ,'integer');
$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;
}

+ Here is the call graph for this function:

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;
}

+ Here is the call graph for this function:

ilMDMetaMetadata::save ( )

Reimplemented from ilMDBase.

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

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

{
global $ilDB;
$fields = $this->__getFields();
$fields['meta_meta_data_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_meta_data'));
if($this->db->insert('il_meta_meta_data',$fields))
{
$this->setMetaId($next_id);
return $this->getMetaId();
}
return false;
}

+ Here is the call graph for this function:

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;
}
}

+ Here is the caller graph for this function:

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;
}

+ Here is the caller graph for this function:

ilMDMetaMetadata::toXML ( $writer)

Reimplemented from ilMDBase.

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

References 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');
}

+ Here is the call graph for this function:

ilMDMetaMetadata::toXML ( $writer)

Reimplemented from ilMDBase.

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

References 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');
}

+ Here is the call graph for this function:

ilMDMetaMetadata::update ( )

Reimplemented from ilMDBase.

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

References ilMDBase\getMetaId().

{
global $ilDB;
if($this->getMetaId())
{
if($this->db->autoExecute('il_meta_meta_data',
$this->__getFields(),
DB_AUTOQUERY_UPDATE,
"meta_meta_data_id = ".$ilDB->quote($this->getMetaId())))
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

ilMDMetaMetadata::update ( )

Reimplemented from ilMDBase.

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

References ilMDBase\getMetaId().

{
global $ilDB;
if($this->getMetaId())
{
if($this->db->update('il_meta_meta_data',
$this->__getFields(),
array("meta_meta_data_id" => array('integer',$this->getMetaId()))))
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:


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