Difference between revisions of "API:EPrints/DataObj"
Line 1: | Line 1: | ||
<!-- Pod2Wiki=_preamble_ | <!-- Pod2Wiki=_preamble_ | ||
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. | This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. | ||
− | --> | + | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj.pm|package_name=EPrints::DataObj}}[[Category:API|DataObj]]<div><!-- Edit below this comment --> |
− | |||
− | {{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj.pm|package_name=EPrints::DataObj}}[[Category:API|DataObj]]<div><!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> |
==NAME== | ==NAME== | ||
'''EPrints::DataObj''' - Base class for records in EPrints. | '''EPrints::DataObj''' - Base class for records in EPrints. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=head_description --> | ||
==DESCRIPTION== | ==DESCRIPTION== | ||
This module is a base class which is inherited by [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]], [[API:EPrints/User|EPrints::User]], [[API:EPrints/DataObj/Subject|EPrints::DataObj::Subject]] and [[API:EPrints/DataObj/Document|EPrints::DataObj::Document]] and several other classes. | This module is a base class which is inherited by [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]], [[API:EPrints/User|EPrints::User]], [[API:EPrints/DataObj/Subject|EPrints::DataObj::Subject]] and [[API:EPrints/DataObj/Document|EPrints::DataObj::Document]] and several other classes. | ||
Line 22: | Line 22: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_system_field_info --> | ||
===$sys_fields = EPrints::DataObj->get_system_field_info=== | ===$sys_fields = EPrints::DataObj->get_system_field_info=== | ||
Line 32: | Line 34: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_new --> | ||
===$dataobj = EPrints::DataObj->new( $session, $id [, $dataset] )=== | ===$dataobj = EPrints::DataObj->new( $session, $id [, $dataset] )=== | ||
Line 44: | Line 48: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_new_from_data --> | ||
===$dataobj = EPrints::DataObj->new_from_data( $session, $data [, $dataset ] )=== | ===$dataobj = EPrints::DataObj->new_from_data( $session, $data [, $dataset ] )=== | ||
Line 56: | Line 62: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_create_subdataobj --> | ||
===$dataobj = $dataobj->create_subdataobj( $fieldname, $epdata )=== | ===$dataobj = $dataobj->create_subdataobj( $fieldname, $epdata )=== | ||
Line 70: | Line 78: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_defaults --> | ||
===$defaults = EPrints::User->get_defaults( $session, $data, $dataset )=== | ===$defaults = EPrints::User->get_defaults( $session, $data, $dataset )=== | ||
Line 82: | Line 92: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove --> | ||
===$success = $dataobj->remove=== | ===$success = $dataobj->remove=== | ||
Line 94: | Line 106: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_clear_changed --> | ||
===$dataobj->clear_changed( )=== | ===$dataobj->clear_changed( )=== | ||
Line 106: | Line 120: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_commit --> | ||
===$success = $dataobj->commit( [$force] )=== | ===$success = $dataobj->commit( [$force] )=== | ||
Line 120: | Line 136: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_value --> | ||
===$value = $dataobj->get_value( $fieldname )=== | ===$value = $dataobj->get_value( $fieldname )=== | ||
Line 130: | Line 148: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_set_value --> | ||
===$dataobj->set_value( $fieldname, $value )=== | ===$dataobj->set_value( $fieldname, $value )=== | ||
Line 140: | Line 160: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_values --> | ||
===@values = $dataobj->get_values( $fieldnames )=== | ===@values = $dataobj->get_values( $fieldnames )=== | ||
Line 152: | Line 174: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_session --> | ||
===$session = $dataobj->get_session=== | ===$session = $dataobj->get_session=== | ||
Line 162: | Line 186: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_data --> | ||
===$data = $dataobj->get_data=== | ===$data = $dataobj->get_data=== | ||
Line 172: | Line 198: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_dataset_id --> | ||
===$dataset = EPrints::DataObj->get_dataset_id=== | ===$dataset = EPrints::DataObj->get_dataset_id=== | ||
Line 182: | Line 210: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_dataset --> | ||
===$dataset = $dataobj->get_dataset=== | ===$dataset = $dataobj->get_dataset=== | ||
Line 192: | Line 222: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_is_set --> | ||
===$bool = $dataobj->is_set( $fieldname )=== | ===$bool = $dataobj->is_set( $fieldname )=== | ||
Line 204: | Line 236: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_exists_and_set --> | ||
===$bool = $dataobj->exists_and_set( $fieldname )=== | ===$bool = $dataobj->exists_and_set( $fieldname )=== | ||
Line 218: | Line 252: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_id --> | ||
===$id = $dataobj->get_id=== | ===$id = $dataobj->get_id=== | ||
Line 228: | Line 264: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_gid --> | ||
===$id = $dataobj->get_gid=== | ===$id = $dataobj->get_gid=== | ||
Line 240: | Line 278: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_datestamp --> | ||
===$datestamp = $dataobj->get_datestamp=== | ===$datestamp = $dataobj->get_datestamp=== | ||
Line 250: | Line 290: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_value --> | ||
===$xhtml = $dataobj->render_value( $fieldname, [$showall] )=== | ===$xhtml = $dataobj->render_value( $fieldname, [$showall] )=== | ||
Line 260: | Line 302: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_citation --> | ||
===$xhtml = $dataobj->render_citation( [$style], [%params] )=== | ===$xhtml = $dataobj->render_citation( [$style], [%params] )=== | ||
Line 270: | Line 314: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_citation_link --> | ||
===$xhtml = $dataobj->render_citation_link( [$style], %params )=== | ===$xhtml = $dataobj->render_citation_link( [$style], %params )=== | ||
Line 280: | Line 326: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_description --> | ||
===$xhtml = $dataobj->render_description=== | ===$xhtml = $dataobj->render_description=== | ||
Line 290: | Line 338: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render --> | ||
===($xhtml, $title ) = $dataobj->render=== | ===($xhtml, $title ) = $dataobj->render=== | ||
Line 300: | Line 350: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_render_full --> | ||
===($xhtml, $title ) = $dataobj->render_full=== | ===($xhtml, $title ) = $dataobj->render_full=== | ||
Line 310: | Line 362: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_uri --> | ||
===$url = $dataobj->uri=== | ===$url = $dataobj->uri=== | ||
Line 322: | Line 376: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_internal_uri --> | ||
===$uri = $dataobj->internal_uri()=== | ===$uri = $dataobj->internal_uri()=== | ||
Line 334: | Line 390: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_url --> | ||
===$url = $dataobj->get_url=== | ===$url = $dataobj->get_url=== | ||
Line 344: | Line 402: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_control_url --> | ||
===$url = $dataobj->get_control_url=== | ===$url = $dataobj->get_control_url=== | ||
Line 354: | Line 414: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_type --> | ||
===$type = $dataobj->get_type=== | ===$type = $dataobj->get_type=== | ||
Line 364: | Line 426: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_to_xml --> | ||
===$xmlfragment = $dataobj->to_xml( %opts )=== | ===$xmlfragment = $dataobj->to_xml( %opts )=== | ||
Line 384: | Line 448: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_xml_to_epdata --> | ||
===$epdata = EPrints::DataObj->xml_to_epdata( $session, $xml, %opts )=== | ===$epdata = EPrints::DataObj->xml_to_epdata( $session, $xml, %opts )=== | ||
Line 394: | Line 460: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_export --> | ||
===$plugin_output = $detaobj->export( $plugin_id, %params )=== | ===$plugin_output = $detaobj->export( $plugin_id, %params )=== | ||
Line 404: | Line 472: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_queue_changes --> | ||
===$dataobj->queue_changes=== | ===$dataobj->queue_changes=== | ||
Line 414: | Line 484: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_queue_all --> | ||
===$dataobj->queue_all=== | ===$dataobj->queue_all=== | ||
Line 424: | Line 496: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_queue_fulltext --> | ||
===$dataobj->queue_fulltext=== | ===$dataobj->queue_fulltext=== | ||
Line 434: | Line 508: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_owner --> | ||
===$boolean = $dataobj->has_owner( $user )=== | ===$boolean = $dataobj->has_owner( $user )=== | ||
Line 446: | Line 522: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_in_editorial_scope_of --> | ||
===$boolean = $dataobj->in_editorial_scope_of( $user )=== | ===$boolean = $dataobj->in_editorial_scope_of( $user )=== | ||
Line 458: | Line 536: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_validate --> | ||
===$problems = $dataobj->validate( [ $for_archive ], $workflow_id )=== | ===$problems = $dataobj->validate( [ $for_archive ], $workflow_id )=== | ||
Line 472: | Line 552: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_warnings --> | ||
===$warnings = $dataobj->get_warnings( )=== | ===$warnings = $dataobj->get_warnings( )=== | ||
Line 484: | Line 566: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
− | ===$file = $dataobj->add_stored_file( $filename, $filehandle | + | </div> |
+ | <!-- Pod2Wiki=item_add_stored_file --> | ||
+ | ===$file = $dataobj->add_stored_file( $filename, $filehandle, $filesize )=== | ||
− | Convenience method to add the file record for $filename to this object. Reads | + | Convenience method to add (or replace) the file record for $filename to this object. Reads $filesize bytes from $filehandle. |
Returns the file object or undef if the storage failed. | Returns the file object or undef if the storage failed. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_stored_file --> | ||
===$file = $dataobj->get_stored_file( $filename )=== | ===$file = $dataobj->get_stored_file( $filename )=== | ||
Line 508: | Line 594: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=head_related_objects --> | ||
===Related Objects=== | ===Related Objects=== | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_add_object_relations --> | ||
====$dataobj->add_object_relations( $target, $has => $is [, $has => $is ] )==== | ====$dataobj->add_object_relations( $target, $has => $is [, $has => $is ] )==== | ||
Line 527: | Line 617: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_object_relations --> | ||
====$bool = $dataobj->has_object_relations( $target, @types )==== | ====$bool = $dataobj->has_object_relations( $target, @types )==== | ||
Line 539: | Line 631: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_has_related_objects --> | ||
====$bool = $dataobj->has_related_objects( @types )==== | ====$bool = $dataobj->has_related_objects( @types )==== | ||
Line 549: | Line 643: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_get_related_objects --> | ||
====$dataobjs = $dataobj->get_related_objects( @types )==== | ====$dataobjs = $dataobj->get_related_objects( @types )==== | ||
Line 559: | Line 655: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki= --> |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_remove_object_relations --> | ||
====$dataobj->remove_object_relations( $target [, $has => $is [, $has => $is ] )==== | ====$dataobj->remove_object_relations( $target [, $has => $is [, $has => $is ] )==== | ||
Line 571: | Line 669: | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
− | + | <span style='display:none'>User Comments</span> | |
<!-- Edit below this comment --> | <!-- Edit below this comment --> | ||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> | <!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> |
Revision as of 13:21, 25 February 2010
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
- 1 NAME
- 2 DESCRIPTION
- 2.1 $sys_fields = EPrints::DataObj->get_system_field_info
- 2.2 $dataobj = EPrints::DataObj->new( $session, $id [, $dataset] )
- 2.3 $dataobj = EPrints::DataObj->new_from_data( $session, $data [, $dataset ] )
- 2.4 $dataobj = $dataobj->create_subdataobj( $fieldname, $epdata )
- 2.5 $defaults = EPrints::User->get_defaults( $session, $data, $dataset )
- 2.6 $success = $dataobj->remove
- 2.7 $dataobj->clear_changed( )
- 2.8 $success = $dataobj->commit( [$force] )
- 2.9 $value = $dataobj->get_value( $fieldname )
- 2.10 $dataobj->set_value( $fieldname, $value )
- 2.11 @values = $dataobj->get_values( $fieldnames )
- 2.12 $session = $dataobj->get_session
- 2.13 $data = $dataobj->get_data
- 2.14 $dataset = EPrints::DataObj->get_dataset_id
- 2.15 $dataset = $dataobj->get_dataset
- 2.16 $bool = $dataobj->is_set( $fieldname )
- 2.17 $bool = $dataobj->exists_and_set( $fieldname )
- 2.18 $id = $dataobj->get_id
- 2.19 $id = $dataobj->get_gid
- 2.20 $datestamp = $dataobj->get_datestamp
- 2.21 $xhtml = $dataobj->render_value( $fieldname, [$showall] )
- 2.22 $xhtml = $dataobj->render_citation( [$style], [%params] )
- 2.23 $xhtml = $dataobj->render_citation_link( [$style], %params )
- 2.24 $xhtml = $dataobj->render_description
- 2.25 ($xhtml, $title ) = $dataobj->render
- 2.26 ($xhtml, $title ) = $dataobj->render_full
- 2.27 $url = $dataobj->uri
- 2.28 $uri = $dataobj->internal_uri()
- 2.29 $url = $dataobj->get_url
- 2.30 $url = $dataobj->get_control_url
- 2.31 $type = $dataobj->get_type
- 2.32 $xmlfragment = $dataobj->to_xml( %opts )
- 2.33 $epdata = EPrints::DataObj->xml_to_epdata( $session, $xml, %opts )
- 2.34 $plugin_output = $detaobj->export( $plugin_id, %params )
- 2.35 $dataobj->queue_changes
- 2.36 $dataobj->queue_all
- 2.37 $dataobj->queue_fulltext
- 2.38 $boolean = $dataobj->has_owner( $user )
- 2.39 $boolean = $dataobj->in_editorial_scope_of( $user )
- 2.40 $problems = $dataobj->validate( [ $for_archive ], $workflow_id )
- 2.41 $warnings = $dataobj->get_warnings( )
- 2.42 $file = $dataobj->add_stored_file( $filename, $filehandle, $filesize )
- 2.43 $file = $dataobj->get_stored_file( $filename )
- 2.44 Related Objects
- 2.44.1 $dataobj->add_object_relations( $target, $has => $is [, $has => $is ] )
- 2.44.2 $bool = $dataobj->has_object_relations( $target, @types )
- 2.44.3 $bool = $dataobj->has_related_objects( @types )
- 2.44.4 $dataobjs = $dataobj->get_related_objects( @types )
- 2.44.5 $dataobj->remove_object_relations( $target [, $has => $is [, $has => $is ] )
NAME
EPrints::DataObj - Base class for records in EPrints.
DESCRIPTION
This module is a base class which is inherited by EPrints::DataObj::EPrint, EPrints::User, EPrints::DataObj::Subject and EPrints::DataObj::Document and several other classes.
It is ABSTRACT - its methods should not be called directly.
$sys_fields = EPrints::DataObj->get_system_field_info
Return an array describing the system metadata of the this dataset.
$dataobj = EPrints::DataObj->new( $session, $id [, $dataset] )
Return new data object, created by loading it from the database.
If $dataset is not defined uses the default dataset for this object.
$dataobj = EPrints::DataObj->new_from_data( $session, $data [, $dataset ] )
Construct a new EPrints::DataObj object based on the $data hash reference of metadata.
Used to create an object from the data retrieved from the database.
$dataobj = $dataobj->create_subdataobj( $fieldname, $epdata )
Creates and returns a new dataobj that is a sub-object of this object in field $fieldname with initial data $epdata.
Clears the sub-object cache for this $fieldname which is equivalent to:
$dataobj->set_value( $fieldname, undef );
$defaults = EPrints::User->get_defaults( $session, $data, $dataset )
Return default values for this object based on the starting data.
Should be subclassed.
$success = $dataobj->remove
Remove this data object from the database and any sub-objects or related files.
Return true if successful.
$dataobj->clear_changed( )
Clear any changed fields, which will result in them not being committed unless force is used.
This method is used by the Database to avoid unnecessary commits.
$success = $dataobj->commit( [$force] )
Write this object to the database and reset the changed fields.
If $force isn't true then it only actually modifies the database if one or more fields have been changed.
Commit may also queue indexer jobs or log changes, depending on the object.
$value = $dataobj->get_value( $fieldname )
Get a the value of a metadata field. If the field is not set then it returns undef unless the field has the property multiple set, in which case it returns [] (a reference to an empty array).
$dataobj->set_value( $fieldname, $value )
Set the value of the named metadata field in this record.
@values = $dataobj->get_values( $fieldnames )
Returns a list of all the values in this record of all the fields specified by $fieldnames. $fieldnames should be in the format used by browse views - slash seperated fieldnames with an optional .id suffix to indicate the id part rather than the main part.
For example "author.id/editor.id" would return a list of all author and editor ids from this record.
$session = $dataobj->get_session
Returns the EPrints::Session object to which this record belongs.
$data = $dataobj->get_data
Returns a reference to the hash table of all the metadata for this record keyed by fieldname.
$dataset = EPrints::DataObj->get_dataset_id
Returns the id of the EPrints::DataSet object to which this record belongs.
$dataset = $dataobj->get_dataset
Returns the EPrints::DataSet object to which this record belongs.
$bool = $dataobj->is_set( $fieldname )
Returns true if the named field is set in this record, otherwise false.
Warns if the field does not exist.
$bool = $dataobj->exists_and_set( $fieldname )
Returns true if the named field is set in this record, otherwise false.
If the field does not exist, just return false.
This method is useful for plugins which may operate on multiple repositories, and the fact a field does not exist is not an issue.
$id = $dataobj->get_id
Returns the value of the primary key of this record.
$id = $dataobj->get_gid
DEPRECATED (see uri())
Returns the globally referential fully-qualified identifier for this object or undef if this object can not be externally referenced.
$datestamp = $dataobj->get_datestamp
Returns the datestamp of this object in "YYYY-MM-DD hh:mm:ss" format.
$xhtml = $dataobj->render_value( $fieldname, [$showall] )
Returns the rendered version of the value of the given field, as appropriate for the current session. If $showall is true then all values are rendered - this is usually used for staff viewing data.
$xhtml = $dataobj->render_citation( [$style], [%params] )
Renders the record as a citation. If $style is set then it uses that citation style from the citations config file. Otherwise $style defaults to the type of this record. If $params{url} is set then the citiation will link to the specified URL.
$xhtml = $dataobj->render_citation_link( [$style], %params )
Renders a citation (as above) but as a link to the URL for this item. For example - the abstract page of an eprint.
$xhtml = $dataobj->render_description
Returns a short description of this object using the default citation style for this dataset.
($xhtml, $title ) = $dataobj->render
Return a chunk of XHTML DOM describing this object in the normal way. This is the public view of the record, not the staff view.
($xhtml, $title ) = $dataobj->render_full
Return an XHTML table in DOM describing this record. All values of all fields are listed. This is the staff view.
$url = $dataobj->uri
Returns a unique URI for this object. Not certain to resolve as a URL.
If $c->{dataobj_uri}->{eprint} is a function, call that to work it out.
$uri = $dataobj->internal_uri()
Return an internal URI for this object (independent of repository hostname).
To retrieve an object by internal URI use EPrints::DataSet::get_object_from_uri().
$url = $dataobj->get_url
Returns the URL for this record, for example the URL of the abstract page of an eprint.
$url = $dataobj->get_control_url
Returns the URL for the control page for this object.
$type = $dataobj->get_type
Returns the type of this record - type of user, type of eprint etc.
$xmlfragment = $dataobj->to_xml( %opts )
Convert this object into an XML fragment.
%opts are:
no_xmlns=>1 : do not include a xmlns attribute in the outer element. (This assumes this chunk appears in a larger tree where the xmlns is already set correctly.
showempty=>1 : fields with no value are shown.
version=>"code" : pick what version of the EPrints XML format to use "1" or "2"
embed=>1 : include the data of a file, not just it's URL.
$epdata = EPrints::DataObj->xml_to_epdata( $session, $xml, %opts )
Populates $epdata based on $xml. This is the inverse of to_xml() but doesn't create a new object.
$plugin_output = $detaobj->export( $plugin_id, %params )
Apply an output plugin to this items. Return the results.
$dataobj->queue_changes
Add all the changed fields into the indexers todo queue.
$dataobj->queue_all
Add all the fields into the indexers todo queue.
$dataobj->queue_fulltext
Add a fulltext index into the indexers todo queue.
$boolean = $dataobj->has_owner( $user )
Return true if $user owns this record. Normally this means they created it, but a group of users could count as owners of the same record if you wanted.
It's false on most dataobjs, except those which override this method.
$boolean = $dataobj->in_editorial_scope_of( $user )
As for has_owner, but if the user is identified as someone with an editorial scope which includes this record.
Defaults to true. Which doesn't mean that they have the right to edit it, just that their scope matches. You also need editor rights to use this. It's currently used just to filter eprint editors so that only ones with a scope AND a priv can edit.
$problems = $dataobj->validate( [ $for_archive ], $workflow_id )
Return a reference to an array of XHTML DOM objects describing validation problems with the entire $dataobj based on $workflow_id.
If $workflow_id is undefined defaults to "default".
A reference to an empty array indicates no problems.
$warnings = $dataobj->get_warnings( )
Return a reference to an array of XHTML DOM objects describing problems with the entire $dataobj.
A reference to an empty array indicates no problems.
$file = $dataobj->add_stored_file( $filename, $filehandle, $filesize )
Convenience method to add (or replace) the file record for $filename to this object. Reads $filesize bytes from $filehandle.
Returns the file object or undef if the storage failed.
$file = $dataobj->get_stored_file( $filename )
Get the file object for $filename.
Returns the file object or undef if the file doesn't exist.
Related Objects
$dataobj->add_object_relations( $target, $has => $is [, $has => $is ] )
Add a relation between this object and $target of type $has. If $is is defined will also add the reciprocal relationship $is from $target to this object. May be repeated to add multiple relationships.
You must commit $target after calling this method.
$bool = $dataobj->has_object_relations( $target, @types )
Returns true if this object is related to $target by all @types.
If @types is empty will return true if any relationships exist.
Returns true if get_related_objects() would return some objects, but without actually retrieving the related objects from the database.
Returns a list of objects related to this object by @types.
$dataobj->remove_object_relations( $target [, $has => $is [, $has => $is ] )
Remove relations between this object and $target. If $has => $is pairs are defined will only remove those relationships given.
You must commit $target after calling this method.