ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMDGeneral Class Reference
+ Inheritance diagram for ilMDGeneral:
+ Collaboration diagram for ilMDGeneral:

Public Member Functions

 ilMDGeneral ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 getPossibleSubelements ()
getIdentifierIds ()
getIdentifier ($a_identifier_id)
addIdentifier ()
getLanguageIds ()
getLanguage ($a_language_id)
addLanguage ()
getDescriptionIds ()
getDescription ($a_description_id)
addDescription ()
getKeywordIds ()
getKeyword ($a_keyword_id)
addKeyword ()
 setStructure ($a_structure)
 getStructure ()
 setTitle ($a_title)
 getTitle ()
 setTitleLanguage (&$lng_obj)
getTitleLanguage ()
 getTitleLanguageCode ()
 setCoverage ($a_coverage)
 getCoverage ()
 setCoverageLanguage (&$lng_obj)
getCoverageLanguage ()
 getCoverageLanguageCode ()
 save ()
 update ()
 delete ()
 __getFields ()
 read ()
 toXML (&$writer)
 _getId ($a_rbac_id, $a_obj_id)
 ilMDGeneral ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 getPossibleSubelements ()
getIdentifierIds ()
getIdentifier ($a_identifier_id)
addIdentifier ()
getLanguageIds ()
getLanguage ($a_language_id)
addLanguage ()
getDescriptionIds ()
getDescription ($a_description_id)
addDescription ()
getKeywordIds ()
getKeyword ($a_keyword_id)
addKeyword ()
 setStructure ($a_structure)
 getStructure ()
 setTitle ($a_title)
 getTitle ()
 setTitleLanguage (&$lng_obj)
getTitleLanguage ()
 getTitleLanguageCode ()
 setCoverage ($a_coverage)
 getCoverage ()
 setCoverageLanguage (&$lng_obj)
getCoverageLanguage ()
 getCoverageLanguageCode ()
 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 34 of file class.ilMDGeneral.php.

Member Function Documentation

ilMDGeneral::__getFields ( )

Definition at line 327 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), getTitleLanguageCode(), and ilUtil\prepareDBString().

{
return array('rbac_id' => $this->getRBACId(),
'obj_id' => $this->getObjId(),
'obj_type' => ilUtil::prepareDBString($this->getObjType()),
'general_structure' => $this->getStructure(),
'title' => $this->getTitle(),
'title_language' => $this->getTitleLanguageCode(),
'coverage' => $this->getCoverage(),
'coverage_language' => $this->getCoverageLanguageCode());
}

+ Here is the call graph for this function:

ilMDGeneral::__getFields ( )

Definition at line 327 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), getTitleLanguageCode(), and ilUtil\prepareDBString().

{
return array('rbac_id' => $this->getRBACId(),
'obj_id' => $this->getObjId(),
'obj_type' => ilUtil::prepareDBString($this->getObjType()),
'general_structure' => ilUtil::prepareDBString($this->getStructure()),
'title' => ilUtil::prepareDBString($this->getTitle()),
'title_language' => ilUtil::prepareDBString($this->getTitleLanguageCode()),
'coverage' => ilUtil::prepareDBString($this->getCoverage()),
'coverage_language' => ilUtil::prepareDBString($this->getCoverageLanguageCode()));
}

+ Here is the call graph for this function:

ilMDGeneral::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 417 of file class.ilMDGeneral.php.

References $res, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
$query = "SELECT meta_general_id FROM il_meta_general ".
"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_general_id;
}
return false;
}
ilMDGeneral::_getId (   $a_rbac_id,
  $a_obj_id 
)

Definition at line 464 of file class.ilMDGeneral.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilMD\getGeneral().

{
global $ilDB;
$query = "SELECT meta_general_id FROM il_meta_general ".
"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_general_id;
}
return false;
}

+ Here is the caller graph for this function:

& ilMDGeneral::addDescription ( )

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

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
$des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
$des->setParentId($this->getMetaId());
$des->setParentType('meta_general');
return $des;
}

+ Here is the call graph for this function:

& ilMDGeneral::addDescription ( )

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

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

{
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
$des =& new ilMDDescription($this->getRBACId(),$this->getObjId(),$this->getObjType());
$des->setParentId($this->getMetaId());
$des->setParentType('meta_general');
return $des;
}

+ Here is the call graph for this function:

& ilMDGeneral::addIdentifier ( )

Definition at line 73 of file class.ilMDGeneral.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_general');
return $ide;
}

+ Here is the call graph for this function:

& ilMDGeneral::addIdentifier ( )

Definition at line 73 of file class.ilMDGeneral.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_general');
return $ide;
}

+ Here is the call graph for this function:

& ilMDGeneral::addKeyword ( )

Definition at line 162 of file class.ilMDGeneral.php.

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
$key =& new ilMDKeyword($this->getRBACId(),$this->getObjId(),$this->getObjType());
$key->setParentId($this->getMetaId());
$key->setParentType('meta_general');
return $key;
}

+ Here is the call graph for this function:

& ilMDGeneral::addKeyword ( )

Definition at line 162 of file class.ilMDGeneral.php.

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

{
include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
$key =& new ilMDKeyword($this->getRBACId(),$this->getObjId(),$this->getObjType());
$key->setParentId($this->getMetaId());
$key->setParentType('meta_general');
return $key;
}

+ Here is the call graph for this function:

& ilMDGeneral::addLanguage ( )

Definition at line 103 of file class.ilMDGeneral.php.

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
$lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
$lan->setParentId($this->getMetaId());
$lan->setParentType('meta_general');
return $lan;
}

+ Here is the call graph for this function:

& ilMDGeneral::addLanguage ( )

Definition at line 103 of file class.ilMDGeneral.php.

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

{
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
$lan =& new ilMDLanguage($this->getRBACId(),$this->getObjId(),$this->getObjType());
$lan->setParentId($this->getMetaId());
$lan->setParentType('meta_general');
return $lan;
}

+ Here is the call graph for this function:

ilMDGeneral::delete ( )

Reimplemented from ilMDBase.

Definition at line 276 of file class.ilMDGeneral.php.

References getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase\getMetaId().

{
global $ilDB;
if(!$this->getMetaId())
{
return false;
}
// Identifier
foreach($this->getIdentifierIds() as $id)
{
$ide = $this->getIdentifier($id);
$ide->delete();
}
// Language
foreach($this->getLanguageIds() as $id)
{
$lan = $this->getLanguage($id);
$lan->delete();
}
// Description
foreach($this->getDescriptionIds() as $id)
{
$des = $this->getDescription($id);
$des->delete();
}
// Keyword
foreach($this->getKeywordIds() as $id)
{
$key = $this->getKeyword($id);
$key->delete();
}
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_general ".
"WHERE meta_general_id = ".$ilDB->quote($this->getMetaId());
$this->db->query($query);
return true;
}
return false;
}

+ Here is the call graph for this function:

ilMDGeneral::delete ( )

Reimplemented from ilMDBase.

Definition at line 276 of file class.ilMDGeneral.php.

References getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), and ilMDBase\getMetaId().

{
global $ilDB;
if(!$this->getMetaId())
{
return false;
}
// Identifier
foreach($this->getIdentifierIds() as $id)
{
$ide = $this->getIdentifier($id);
$ide->delete();
}
// Language
foreach($this->getLanguageIds() as $id)
{
$lan = $this->getLanguage($id);
$lan->delete();
}
// Description
foreach($this->getDescriptionIds() as $id)
{
$des = $this->getDescription($id);
$des->delete();
}
// Keyword
foreach($this->getKeywordIds() as $id)
{
$key = $this->getKeyword($id);
$key->delete();
}
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_general ".
"WHERE meta_general_id = ".$ilDB->quote($this->getMetaId());
$this->db->query($query);
return true;
}
return false;
}

+ Here is the call graph for this function:

ilMDGeneral::getCoverage ( )

Definition at line 224 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

{
return $this->coverage;
}

+ Here is the caller graph for this function:

ilMDGeneral::getCoverage ( )

Definition at line 224 of file class.ilMDGeneral.php.

{
return $this->coverage;
}
& ilMDGeneral::getCoverageLanguage ( )

Definition at line 236 of file class.ilMDGeneral.php.

{
return is_object($this->coverage_language) ? $this->coverage_language : false;
}
& ilMDGeneral::getCoverageLanguage ( )

Definition at line 236 of file class.ilMDGeneral.php.

{
return is_object($this->coverage_language) ? $this->coverage_language : false;
}
ilMDGeneral::getCoverageLanguageCode ( )

Definition at line 240 of file class.ilMDGeneral.php.

{
return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false;
}
ilMDGeneral::getCoverageLanguageCode ( )

Definition at line 240 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

{
return is_object($this->coverage_language) ? $this->coverage_language->getLanguageCode() : false;
}

+ Here is the caller graph for this function:

& ilMDGeneral::getDescription (   $a_description_id)

Definition at line 119 of file class.ilMDGeneral.php.

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
if(!$a_description_id)
{
return false;
}
$des =& new ilMDDescription();
$des->setMetaId($a_description_id);
return $des;
}
& ilMDGeneral::getDescription (   $a_description_id)

Definition at line 119 of file class.ilMDGeneral.php.

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
if(!$a_description_id)
{
return false;
}
$des =& new ilMDDescription();
$des->setMetaId($a_description_id);
return $des;
}

+ Here is the caller graph for this function:

& ilMDGeneral::getDescriptionIds ( )

Definition at line 113 of file class.ilMDGeneral.php.

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

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDGeneral::getDescriptionIds ( )

Definition at line 113 of file class.ilMDGeneral.php.

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDDescription.php';
return ilMDDescription::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');
}

+ Here is the call graph for this function:

& ilMDGeneral::getIdentifier (   $a_identifier_id)

Definition at line 60 of file class.ilMDGeneral.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;
}
& ilMDGeneral::getIdentifier (   $a_identifier_id)

Definition at line 60 of file class.ilMDGeneral.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:

& ilMDGeneral::getIdentifierIds ( )

Definition at line 54 of file class.ilMDGeneral.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_general');
}

+ Here is the call graph for this function:

& ilMDGeneral::getIdentifierIds ( )

Definition at line 54 of file class.ilMDGeneral.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_general');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDGeneral::getKeyword (   $a_keyword_id)

Definition at line 149 of file class.ilMDGeneral.php.

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
if(!$a_keyword_id)
{
return false;
}
$key =& new ilMDKeyword();
$key->setMetaId($a_keyword_id);
return $key;
}
& ilMDGeneral::getKeyword (   $a_keyword_id)

Definition at line 149 of file class.ilMDGeneral.php.

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
if(!$a_keyword_id)
{
return false;
}
$key =& new ilMDKeyword();
$key->setMetaId($a_keyword_id);
return $key;
}

+ Here is the caller graph for this function:

& ilMDGeneral::getKeywordIds ( )

Definition at line 143 of file class.ilMDGeneral.php.

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDKeyword.php';
return ilMDKeyword::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');
}

+ Here is the call graph for this function:

& ilMDGeneral::getKeywordIds ( )

Definition at line 143 of file class.ilMDGeneral.php.

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

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
return ilMDKeyword::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDGeneral::getLanguage (   $a_language_id)

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
if(!$a_language_id)
{
return false;
}
$lan =& new ilMDLanguage();
$lan->setMetaId($a_language_id);
return $lan;
}
& ilMDGeneral::getLanguage (   $a_language_id)

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

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
if(!$a_language_id)
{
return false;
}
$lan =& new ilMDLanguage();
$lan->setMetaId($a_language_id);
return $lan;
}

+ Here is the caller graph for this function:

& ilMDGeneral::getLanguageIds ( )

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

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

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguage.php';
return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');
}

+ Here is the call graph for this function:

& ilMDGeneral::getLanguageIds ( )

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

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

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
return ilMDLanguage::_getIds($this->getRBACId(),$this->getObjId(),$this->getMetaId(),'meta_general');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMDGeneral::getPossibleSubelements ( )

Definition at line 42 of file class.ilMDGeneral.php.

{
$subs['Identifier'] = 'meta_identifier';
$subs['Language'] = 'meta_language';
$subs['Description'] = 'meta_description';
$subs['Keyword'] = 'meta_keyword';
return $subs;
}
ilMDGeneral::getPossibleSubelements ( )

Definition at line 42 of file class.ilMDGeneral.php.

{
$subs['Keyword'] = 'meta_keyword';
$subs['Language'] = 'meta_language';
$subs['Identifier'] = 'meta_identifier';
$subs['Description'] = 'meta_description';
return $subs;
}
ilMDGeneral::getStructure ( )

Definition at line 192 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

{
return $this->structure;
}

+ Here is the caller graph for this function:

ilMDGeneral::getStructure ( )

Definition at line 192 of file class.ilMDGeneral.php.

{
return $this->structure;
}
ilMDGeneral::getTitle ( )

Definition at line 200 of file class.ilMDGeneral.php.

References $title.

Referenced by __getFields(), and toXML().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilMDGeneral::getTitle ( )

Definition at line 200 of file class.ilMDGeneral.php.

References $title.

{
return $this->title;
}
& ilMDGeneral::getTitleLanguage ( )

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

{
return is_object($this->title_language) ? $this->title_language : false;
}
& ilMDGeneral::getTitleLanguage ( )

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

{
return is_object($this->title_language) ? $this->title_language : false;
}
ilMDGeneral::getTitleLanguageCode ( )

Definition at line 215 of file class.ilMDGeneral.php.

Referenced by __getFields(), and toXML().

{
return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false;
}

+ Here is the caller graph for this function:

ilMDGeneral::getTitleLanguageCode ( )

Definition at line 215 of file class.ilMDGeneral.php.

{
return is_object($this->title_language) ? $this->title_language->getLanguageCode() : false;
}
ilMDGeneral::ilMDGeneral (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

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

References ilMDBase\ilMDBase().

{
parent::ilMDBase($a_rbac_id,
$a_obj_id,
$a_obj_type);
}

+ Here is the call graph for this function:

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

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

References ilMDBase\ilMDBase().

{
parent::ilMDBase($a_rbac_id,
$a_obj_id,
$a_obj_type);
}

+ Here is the call graph for this function:

ilMDGeneral::read ( )

Definition at line 339 of file class.ilMDGeneral.php.

References $res, DB_FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setStructure(), setTitle(), setTitleLanguage(), and ilUtil\stripSlashes().

{
global $ilDB;
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_general ".
"WHERE meta_general_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->setStructure(ilUtil::stripSlashes($row->general_structure));
$this->setTitle(ilUtil::stripSlashes($row->title));
$this->setTitleLanguage(new ilMDLanguageItem($row->title_language));
$this->setCoverage(ilUtil::stripSlashes($row->coverage));
$this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language));
}
}
return true;
}

+ Here is the call graph for this function:

ilMDGeneral::read ( )

Definition at line 339 of file class.ilMDGeneral.php.

References $res, DB_FETCHMODE_OBJECT, ilMDBase\getMetaId(), setCoverage(), setCoverageLanguage(), ilMDBase\setObjId(), ilMDBase\setObjType(), ilMDBase\setRBACId(), setStructure(), setTitle(), and setTitleLanguage().

{
global $ilDB;
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_general ".
"WHERE meta_general_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->setStructure($row->general_structure);
$this->setTitle($row->title);
$this->setTitleLanguage(new ilMDLanguageItem($row->title_language));
$this->setCoverage($row->coverage);
$this->setCoverageLanguage(new ilMDLanguageItem($row->coverage_language));
}
}
return true;
}

+ Here is the call graph for this function:

ilMDGeneral::save ( )

Reimplemented from ilMDBase.

Definition at line 246 of file class.ilMDGeneral.php.

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

{
if($this->db->autoExecute('il_meta_general',
$this->__getFields(),
DB_AUTOQUERY_INSERT))
{
$this->setMetaId($this->db->getLastInsertId());
return $this->getMetaId();
}
return false;
}

+ Here is the call graph for this function:

ilMDGeneral::save ( )

Reimplemented from ilMDBase.

Definition at line 246 of file class.ilMDGeneral.php.

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

{
if($this->db->autoExecute('il_meta_general',
$this->__getFields(),
DB_AUTOQUERY_INSERT))
{
$this->setMetaId($this->db->getLastInsertId());
return $this->getMetaId();
}
return false;
}

+ Here is the call graph for this function:

ilMDGeneral::setCoverage (   $a_coverage)

Definition at line 220 of file class.ilMDGeneral.php.

{
$this->coverage = $a_coverage;
}
ilMDGeneral::setCoverage (   $a_coverage)

Definition at line 220 of file class.ilMDGeneral.php.

Referenced by read().

{
$this->coverage = $a_coverage;
}

+ Here is the caller graph for this function:

ilMDGeneral::setCoverageLanguage ( $lng_obj)

Definition at line 229 of file class.ilMDGeneral.php.

Referenced by read().

{
if(is_object($lng_obj))
{
$this->coverage_language = $lng_obj;
}
}

+ Here is the caller graph for this function:

ilMDGeneral::setCoverageLanguage ( $lng_obj)

Definition at line 229 of file class.ilMDGeneral.php.

{
if(is_object($lng_obj))
{
$this->coverage_language =& $lng_obj;
}
}
ilMDGeneral::setStructure (   $a_structure)

Definition at line 176 of file class.ilMDGeneral.php.

Referenced by read().

{
switch($a_structure)
{
case 'Atomic':
case 'Collection':
case 'Networked':
case 'Hierarchical':
case 'Linear':
$this->structure = $a_structure;
return true;
default:
return false;
}
}

+ Here is the caller graph for this function:

ilMDGeneral::setStructure (   $a_structure)

Definition at line 176 of file class.ilMDGeneral.php.

{
switch($a_structure)
{
case 'Atomic':
case 'Collection':
case 'Networked':
case 'Hierarchical':
case 'Linear':
$this->structure = $a_structure;
return true;
default:
return false;
}
}
ilMDGeneral::setTitle (   $a_title)

Definition at line 196 of file class.ilMDGeneral.php.

{
$this->title = $a_title;
}
ilMDGeneral::setTitle (   $a_title)

Definition at line 196 of file class.ilMDGeneral.php.

Referenced by read().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

ilMDGeneral::setTitleLanguage ( $lng_obj)

Definition at line 204 of file class.ilMDGeneral.php.

Referenced by read().

{
if(is_object($lng_obj))
{
$this->title_language = $lng_obj;
}
}

+ Here is the caller graph for this function:

ilMDGeneral::setTitleLanguage ( $lng_obj)

Definition at line 204 of file class.ilMDGeneral.php.

{
if(is_object($lng_obj))
{
$this->title_language = $lng_obj;
}
}
ilMDGeneral::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 371 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), ilMDBase\getExportMode(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), ilMDBase\getObjId(), ilMDBase\getObjType(), ilMDBase\getRBACId(), getStructure(), getTitle(), and getTitleLanguageCode().

{
$writer->xmlStartTag('General',array('Structure' => $this->getStructure() ?
$this->getStructure() :
'Atomic'));
// Identifier
$first = true;
$identifiers = array();
$identifiers = $this->getIdentifierIds();
foreach($identifiers as $id)
{
$ide =& $this->getIdentifier($id);
$ide->setExportMode($this->getExportMode());
$ide->toXML($writer);
$first = false;
}
if(!count($identifiers))
{
include_once 'Services/MetaData/classes/class.ilMDIdentifier.php';
$ide = new ilMDIdentifier($this->getRBACId(),$this->getObjId(),
$this->getObjType()); // added type, alex, 31 Oct 2007
$ide->setExportMode(true);
$ide->toXML($writer,true);
}
// Title
$writer->xmlElement('Title',array('Language' => $this->getTitleLanguageCode() ?
'en'),
$this->getTitle());
// Language
$languages = $this->getLanguageIds();
foreach($languages as $id)
{
$lan =& $this->getLanguage($id);
$lan->toXML($writer);
}
if(!count($languages))
{
// Default
include_once 'Services/MetaData/classes/class.ilMDLanguage.php';
$lan = new ilMDLanguage($this->getRBACId(),$this->getObjId());
$lan->toXML($writer);
}
// Description
$descriptions = $this->getDescriptionIds();
foreach($descriptions as $id)
{
$des =& $this->getDescription($id);
$des->toXML($writer);
}
if(!count($descriptions))
{
// Default
include_once 'Services/MetaData/classes/class.ilMDDescription.php';
$des = new ilMDDescription($this->getRBACId(),$this->getObjId());
$des->toXML($writer);
}
// Keyword
$keywords = $this->getKeywordIds();
foreach($keywords as $id)
{
$key =& $this->getKeyword($id);
$key->toXML($writer);
}
if(!count($keywords))
{
// Default
include_once 'Services/MetaData/classes/class.ilMDKeyword.php';
$key = new ilMDKeyword($this->getRBACId(),$this->getObjId());
$key->toXML($writer);
}
// Copverage
if(strlen($this->getCoverage()))
{
$writer->xmlElement('Coverage',array('Language' => $this->getCoverageLanguageCode() ?
'en'),
$this->getCoverage());
}
$writer->xmlEndTag('General');
}

+ Here is the call graph for this function:

ilMDGeneral::toXML ( $writer)

Reimplemented from ilMDBase.

Definition at line 371 of file class.ilMDGeneral.php.

References getCoverage(), getCoverageLanguageCode(), getDescription(), getDescriptionIds(), getIdentifier(), getIdentifierIds(), getKeyword(), getKeywordIds(), getLanguage(), getLanguageIds(), getStructure(), getTitle(), and getTitleLanguageCode().

{
$writer->xmlStartTag('General',array('Structure' => $this->getStructure()));
// Identifier
foreach($this->getIdentifierIds() as $id)
{
$ide =& $this->getIdentifier($id);
$ide->toXML($writer);
}
// TItle
$writer->xmlElement('Title',array('Language' => $this->getTitleLanguageCode()),$this->getTitle());
// Language
foreach($this->getLanguageIds() as $id)
{
$lan =& $this->getLanguage($id);
$lan->toXML($writer);
}
// Description
foreach($this->getDescriptionIds() as $id)
{
$des =& $this->getDescription($id);
$des->toXML($writer);
}
// Keyword
foreach($this->getKeywordIds() as $id)
{
$key =& $this->getKeyword($id);
$key->toXML($writer);
}
// Copverage
if(strlen($this->getCoverage()))
{
$writer->xmlElement('Coverage',array('Language' => $this->getCoverageLanguageCode()),$this->getCoverage());
}
$writer->xmlEndTag('General');
}

+ Here is the call graph for this function:

ilMDGeneral::update ( )

Reimplemented from ilMDBase.

Definition at line 259 of file class.ilMDGeneral.php.

References ilMDBase\getMetaId().

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

+ Here is the call graph for this function:

ilMDGeneral::update ( )

Reimplemented from ilMDBase.

Definition at line 259 of file class.ilMDGeneral.php.

References ilMDBase\getMetaId().

{
global $ilDB;
if($this->getMetaId())
{
if($this->db->autoExecute('il_meta_general',
$this->__getFields(),
DB_AUTOQUERY_UPDATE,
"meta_general_id = ".$ilDB->quote($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: