Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
API:EPrints/DataObj/EPrint
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==METHODS== <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_constructor_methods --> ===Constructor Methods=== <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_create --> ====create==== $eprint = EPrints::DataObj::EPrint->create( $session, $dataset, $data ) Create a new EPrint entry in the given <tt>$dataset</tt>.. If <tt>$data</tt> is defined, then this is used as the base for the new record. Otherwise the repository specific defaults provided by [[API:EPrints/DataObj/EPrint#set_eprint_defaults|set_eprint_defaults]] are used. The fields <tt>eprintid</tt> and <tt>dir</tt> will be overridden even if they are set. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_create_from_data --> ====create_from_data==== $dataobj = EPrints::DataObj::EPrint->create_from_data( $session, $data, $dataset ) Create a new object of this type in the database. <tt>$datase</tt>t is the dataset it will belong to. <tt>$data</tt> is the data structured as with [[API:EPrints/DataObj#new_from_data|EPrints::DataObj#new_from_data]]. This will also create sub-objects also. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_class_methods --> ===Class Methods=== <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_system_field_info --> ====get_system_field_info==== $fields = EPrints::DataObj::EPrint->get_system_field_info Return an array describing the system metadata of the eprint dataset. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_dataset_id --> ====get_dataset_id==== $dataset = EPrints::DataObj::EPrint->get_dataset_id Returns the ID of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_defaults --> ====get_defaults==== $defaults = EPrints::DataObj::EPrint->get_defaults( $class, $session, $data, $dataset ) Returns default values for this data object based on the starting <tt>$data</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_object_methods --> ===Object Methods=== <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_set_item_issues --> ====set_item_issues==== $eprint->set_item_issues( $new_issues ) This method updates the issues associated to this eprint based on the <tt>$new_issues</tt> passed. If an existing issue is set as <tt>discovered</tt> and doesn't exist in <tt>$new_issues</tt> its status will be updated to <tt>autoresolved</tt>, otherwise the old issue's status and description are updated. Any issues in <tt>$new_issues</tt> that don't already exist will be appended. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_fileinfo --> ====fileinfo==== $fileinfo = $eprint->fileinfo The special '''fileinfo''' field contains the icon and main file paths and filenames for each non-volatile document in the eprint. This is a performance tweak to avoid having to retrieve documents when rendering eprint citations. Example: /style/images/fileicons/application_pdf.png;/20/1/paper.pdf|/20/4.hassmallThumbnailVersion/tdb_portrait.jpg;/20/4/tdb_portrait.jpg <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_update_triggers --> ====update_triggers==== $eprint->update_triggers Update all the stuff that needs updating before an eprint data object is written to the database. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_dataset --> ====get_dataset==== $dataset = $eprint->get_dataset Returns the dataset to which this object belongs. This will return one of the virtual datasets, by default: <tt>inbox</tt>, <tt>buffer</tt>, <tt>archive</tt> or <tt>deletion</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_store_path --> ====store_path==== $path = $eprint->store_path Get the storage path for this eprint data object. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_clone --> ====clone==== $eprint = $eprint->clone( $dest_dataset, $copy_documents, $link ) Create a copy of this eprint data object with a new ID in the given <tt>$dest_dataset</tt>. Returns the new eprint, or <tt>undef</tt> in the case of an error. If <tt>$copy_documents</tt> is set and <tt>true</tt> then the documents (and files) will be copied in addition to the metadata. If <tt>$nolink</tt> is <tt>true</tt> then the new eprint is not connected to the old one by not setting the new eprint's <tt>succeeds</tt> field. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_log_mail_owner --> ====log_mail_owner==== $eprint->log_mail_owner( $mail ) Log that the given <tt>$mail</tt> message was sent to the owner of this eprint data object. <tt>$mail</tt> is the same XHTML DOM that was sent as the email. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_editorial_contact --> ====get_editorial_contact==== $user = $eprint->get_editorial_contact Returns the user identified as the editorial contact for this item. By default returns <tt>undef</tt>. N.B. This does no relate to any editors defined in the metadata for this eprint data object. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_empty --> ====empty==== $eprint->empty( [ $clear_all ] ) Remove all documents and set to empty (almost) all fields. If <tt>$clear_all</tt> also unset <tt>rev_number</tt>, <tt>metadata_visibility</tt>, and <tt>eprint_status</tt> fields. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_remove --> ====remove==== $success = $eprint->remove Erase this eprint data object and any associated data objects from the database and filesystem. This should only be called on eprints in <tt>inbox</tt> or <tt>buffer</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_commit --> ====commit==== $success = $eprint->commit( [ $force ] ); Commit any changes to the database. Calls [[API:EPrints/DataObj/EPrint#update_triggers|update_triggers]] just before the database is updated. The actions this method does are dependent on some object attributes: changed - hash of changed fields (from [[API:EPrints/DataObj|EPrints::DataObj]]) non_volatile_change - boolean (from [[API:EPrints/DataObj|EPrints::DataObj]]) under_construction - boolean If <tt>datestamp</tt> is unset and this eprint is in the <tt>archive</tt> dataset <tt>datestamp</tt> will always be set which will in turn set <tt>datestamp</tt> as changed. If no field values were changed and <tt>$force</tt> is false returns. If <tt>under_construction</tt> is <tt>false</tt>: - static files updated If <tt>non_volatile_change</tt> is <tt>true</tt>: - '''lastmod''' field updated - triples update queued If <tt>under_construction</tt> is <tt>false</tt> and <tt>non_volatile_change</tt> is <tt>true</tt>: - revision generated The goal of these controls is to only trigger expensive processes in response to user actions. Revisions need to be generated when the user changes metadata or uploads new files (see [[API:EPrints/DataObj/Document#commit|EPrints::DataObj::Document#commit]]). <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_save_revision --> ====save_revision==== $eprint->save_revision( %opts ) Increase the eprint revision number and save a complete copy of the record into the history (see [[API:EPrints/DataObj/History|EPrints::DataObj::History]]). Options: user - user that caused the action to occur, defaults to current user action - see history.action, defaults to "modify" details - see history.details, defaults to a description of changed fields <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_validate --> ====validate==== $problems = $eprint->validate( [$for_archive], $workflow_id ) Return a reference to an array of XHTML DOM objects describing validation problems with the entire eprint based on <tt>$workflow_id</tt>. If <tt>$workflow_id</tt> is undefined defaults to <tt>default</tt>. A reference to an empty array indicates no problems. Calls [[API:EPrints/DataObj/EPrint#validate_eprint|validate_eprint]] for the <tt>$eprint</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_skip_validation --> ====skip_validation==== $boolean = $eprint->skip_validation Returns <tt>true</tt> if this eprint should pass validation without being properly validated. This is to allow the use of dodgy data imported from legacy systems. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_prune_documents --> ====prune_documents==== $eprint->prune_documents Remove any documents associated with this eprint that do not actually have any files. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_all_documents --> ====get_all_documents==== @documents = $eprint->get_all_documents Return a list of all [[API:EPrints/DataObj/Document|EPrints::DataObj::Document]] objects associated with this eprint excluding documents with a <tt>isVolatileVersionOf</tt> relation, (e.g. thumbnails). <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_move_to_deletion --> ====move_to_deletion==== $success = $eprint->move_to_deletion Transfer the eprint into the <tt>deletion</tt> dataset. Should only be called by eprints in the <tt>archive</tt> dataset. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_move_to_inbox --> ====move_to_inbox==== $success = $eprint->move_to_inbox Transfer the eprint into the <tt>inbox</tt> dataset. Should only be called for eprints in the <tt>buffer</tt> dataset. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_move_to_buffer --> ====move_to_buffer==== $success = $eprint->move_to_buffer Transfer the eprint into the <tt>buffer</tt> dataset. Should only be called by eprints in the <tt>inbox</tt> or <tt>archive</tt> datasets. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_move_to_archive --> ====move_to_archive==== $success = $eprint->move_to_archive Move this eprint into the main <tt>archive</tt> dataset. Normally only called on eprints in <tt>deletion</tt> or <tt>buffer</tt> datasets. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_local_path --> ====local_path==== $path = $eprint->local_path Returns the full path of the eprint data onject directory on the local filesystem with no trailing slash. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_path --> ====path==== $path = $eprint->path Returns the full URL path of the eprint data object including a trailing slash. E.g. <tt>1234/</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_url_stem --> ====url_stem==== $url = $eprint->url_stem Returns the URL to this eprint's directory. N.B. This includes the trailing slash, unlike the local_path method. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_generate_static --> ====generate_static==== $eprint->generate_static Generate the static version of the abstract/summary web page. In a multi-language repository this will generate one version per language. If called on eprints in the <tt>inbox</tt> or <tt>buffer</tt>, remove the abstract/summary page. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_remove_static --> ====remove_static==== $eprint->remove_static Remove the static web page or pages. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render --> ====render==== ( $description, $title, $links ) = $eprint->render( $preview ) Render the eprint. If <tt>$preview</tt> is <tt>true</tt> then render a preview of the eprint data object The 3 returned values are references to XHTML DOM objects. <tt>$description</tt> is the public viewable description of this eprintthat appears as the body of the abstract page. <tt>$title</tt> is the title of the abstract page for this eprint. <tt>$links</tt> is any elements which should go in the <tt>head</tt> elemeny of this HTML page. Calls [[API:EPrints/DataObj/EPrint#eprint_render|eprint_render]] to actually render the <tt>$eprint</tt>, if it isn't in the <tt>deleted</tt> dataset. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_preview --> ====render_preview==== ( $description, $title, $links ) = $eprint->render_preview Render a preview version of this eprint. See [[API:EPrints/DataObj/EPrint#render|render]] for more details <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_control_url --> ====get_control_url==== $url = $eprint->get_control_url Return the URL of the control page for this eprint. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_url --> ====get_url==== $url = $eprint->get_url Return the public URL of this eprints abstract/summary page. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_user --> ====get_user==== $user = $eprint->get_user Return the [[API:EPrints/DataObj/User|EPrints::DataObj::User]] to whom this eprint belongs (if any). <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_later_in_thread --> ====later_in_thread==== $list = $eprint->later_in_thread( $field ) Return an [[API:EPrints/List|EPrints::List]] of the immediately later items in the thread. <tt>$field</tt> is typically the <tt>succeeds</tt> field that generates the thread of eprints. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_in_thread --> ====in_thread==== $boolean = $eprint->in_thread( $field ) Returns <tt>true</tt> if this eprint is in the <tt>$field</tt> thread. <tt>$field</tt> is typically the <tt>succeeds</tt> field that generates the thread of eprints. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_first_in_thread --> ====first_in_thread==== $eprint = $eprint->first_in_thread( $field ) Return the first (earliest) version or first paper in the thread of commentaries of this paper in the repository. <tt>$field</tt> is typically the <tt>succeeds</tt> field that generates the thread of eprints. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_last_in_thread --> ====last_in_thread==== $eprint = $eprint->last_in_thread( $field ) Returns the latest item in the <tt>$field</tt> thread on this eprint's branch of the thread tree. <tt>$field</tt> is typically the <tt>succeeds</tt> field that generates the thread of eprints. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_removed_from_thread --> ====removed_from_thread==== $eprint->removed_from_thread( $field, [ $parent ] ) Fix the <tt>metadata_visibility</tt> for the eprint data object after it has been removed from the <tt>$field</tt> (typically <tt>succeeds</tt>) based thread. The change in <tt>$parent</tt> must be committed before this method is called. N.B. <tt>$parent</tt> (i.e. the eprint this eprint succeeds) is not required for this method but included for consistency. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_added_to_thread --> ====added_to_thread==== $eprint->added_to_thread( $field, $parent ) Fix the <tt>metadata_visibility</tt> for this eprint data object now the has the <tt>$parent</tt> set in the <tt>$field</tt> (typically the <tt>succeeds</tt> field). Does not update <tt>metadata_visibility</tt> if <tt>$parent</tt> is not in <tt>archive</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_map_thread --> ====map_thread==== $eprint->map_thread( $field, $f ) Apply function <tt>$f</tt> to every eprint data object in the <tt>$field</tt> based thread that includes this eprint. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_version_thread --> ====render_version_thread==== $xhtml = $eprint->render_version_thread( $field ) Return XHTML DOM rendering describing the entire <tt>$field</tt> based thread for this eprint data object as nested unordered lists. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_loop_error --> ====loop_error==== $eprint->loop_error( $field, @looped_ids ) Log repository error message because this eprint is part of a loop of eprint data objects (with IDs <tt>looped_ids</tt>) in a <tt>$field</tt> based thread. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_get_type --> ====get_type==== $type = $eprint->get_type Return the type of this eprint. This is an alias of: $eprint->value( "type" ) <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_user_roles --> ====user_roles==== @roles = $eprint->user_roles( $user ) Return the roles the specified <tt>$user</tt> has for this eprint. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_datestamp --> ====datestamp==== $eprint->datestamp DEPRECATED Now just generates a deprecated error message to the log. Use: $eprint->value( 'datestamp' ); <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_in_editorial_scope_of --> ====in_editorial_scope_of==== $boolean = $eprint->in_editorial_scope_of( $possible_editor ) Returns <tt>true</tt> if <tt>$possible_editor</tt> can edit this eprint. This is according to the user's <tt>editperms</tt>. This does not mean the user has the editor privilege, just that if they do then they may edit the eprint. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_has_owner --> ====has_owner==== $boolean = $eprint->has_owner( $possible_owner ) Returns <tt>true</tt> if <tt>$possible_owner</tt> can edit this eprint. This is according to the user's <tt>editperms</tt>. This does not mean the user has the editor privilege, just that if they do then they may edit the given eprint. Uses the callback <tt>does_user_own_eprint</tt> if available. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_obtain_lock --> ====obtain_lock==== $boolean = $eprint->obtain_lock( $user ) Assign the edit lock for this eprint data object to the specified <tt>$user</tt>. Returns a boolean depending on whether the edit lock was successfully assigned. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_remove_lock --> ====remove_lock==== $boolean = $eprint->remove_lock( $user ) Remove the edit lock for this eprint data object to the specified <tt>$user</tt>. Returns a boolean depending on whether the edit lock was successfully removed. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_could_obtain_lock --> ====could_obtain_lock==== $boolean = $eprint->could_obtain_lock( $user ) Return a boolean depending on whether the specified <tt>$user</tt> could obtain ane edit lock on this eprint. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_is_locked --> ====is_locked==== $boolean = $eprint->is_locked Return a boolean depending on whether this eprint currently has an edit lock. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_utility_methods --> ===Utility Methods=== <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_issues --> ====render_issues==== $ol_frag = EPrints::DataObj::EPrint::render_issues( $session, $field, $value ) Returns a rendering of the list of issues from <tt>$value</tt> array reference (as a <tt>ol</tt> (ordered list) XHTML DOM fragment) for the <tt>item_issues</tt> field provided by <tt>$field</tt>. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_order_issues_newest_open_timestamp --> ====order_issues_newest_open_timestamp==== $timestamps = EPrints::DataObj::EPrint::order_issues_newest_open_timestamp( $field, $value, $session, $langid, $dataset ) Returns a string containing the timestamp for the newest issue that has <tt>status</tt> <tt>reported</tt> or <tt>discovered</tt>. This method is called through the [[API:EPrints/MetaField|EPrints::MetaField]] <tt>make_value_orderkey</tt> attribute. <tt>$field</tt> is the <tt>item_issues</tt> field. <tt>$value</tt> is an array reference of the issues. <tt>$session</tt> is the [[API:EPrints/Repository|EPrints::Repository]] object, <tt>$langid</tt> is the language ID and <tt>$dataset</tt> is the eprint dataset <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_fileinfo --> ====render_fileinfo==== $frag = EPrints::DataObj::EPrint::render_fileinfo( $session, $field, $value, $alllangs, $nolink, $eprint ) Render method for fileinfo field. Returns a XHTML DOM fragment containing the documents stored in the <tt>fileinfo</tt> field. This method is called through the [[API:EPrints/MetaField|EPrints::MetaField]] <tt>render_value</tt> attribute. <tt>$session</tt> is the [[API:EPrints/Repository|EPrints::Repository]] object. <tt>$field</tt> is the <tt>fileinfo</tt> field. <tt>$value</tt> is the value for this field. <tt>$session</tt> is the [[API:EPrints/Repository|EPrints::Repository]] object, <tt>$alllangs</tt> is a boolean to render in all languages if an <tt>EPrints::MetaField::Multilang</tt> field. <tt>$nolink</tt> is a boolean on whether to not render links. <tt>$eprint</tt> is the eprint data object that has the <tt>fileinfo</tt> field. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_eprintid_to_path --> ====eprintid_to_path==== $path = EPrints::DataObj::eprintid_to_path( $id ) Returns path of the storage directory based on the eprint <tt>$id</tt> provided. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_box_list --> ====render_box_list==== $frag = EPrints::DataObj::EPrint::render_box_list( $session, $eprint, $list ) Returns a rendering of the [[API:EPrints/Plugin/Screen/Box|EPrints::Plugin::Screen::Box]] plugins from <tt>$list</tt> against the <tt>$eprint</tt> specified <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=item_render_edit_lock --> ====render_edit_lock==== $xhtml = EPrints::DataObj::EPrints::render_edit_lock( $session, $field, $value, $alllangs, $nolink, $eprint ) Returns an XHTML DOM fragment providing information about the edit lock for metadata provided by <tt>$value</tt>. This is used by the <tt>render_value</tt> attribute of the <tt>edit_lock</tt> field, which specified, the <tt>$session</tt>, <tt>$field</tt>, <tt>$value</tt>, <tt>$alllangs</tt>, <tt>$nolink</tt> and <tt>$eprint</tt> parameters. However, only the <tt>$session</tt>, <tt>$field</tt>, <tt>$value</tt> and <tt>$eprint</tt> parameters are required. <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 --> <!-- Pod2Wiki= --> </div> <!-- Pod2Wiki=head_callbacks -->
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)