Difference between revisions of "API:EPrints/DataObj/EPM"
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<!-- Pod2Wiki=_preamble_ | <!-- Pod2Wiki=_preamble_ | ||
− | This page has been automatically generated from the EPrints 3. | + | This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. |
− | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/EPM.pm|package_name=EPrints::DataObj::EPM}}[[Category:API|EPM]][[Category:API:EPrints/DataObj | + | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/EPM.pm|package_name=EPrints::DataObj::EPM}}[[Category:API|EPM]][[Category:API:EPrints/DataObj|EPM]]<div><!-- Edit below this comment --> |
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | ||
==NAME== | ==NAME== | ||
− | '''EPrints::DataObj::EPM''' - | + | '''EPrints::DataObj::EPM''' - An EPrints Package Manager (EPM) package. |
<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%; '> | ||
Line 17: | Line 17: | ||
<!-- Pod2Wiki=head_description --> | <!-- Pod2Wiki=head_description --> | ||
==DESCRIPTION== | ==DESCRIPTION== | ||
+ | This class represents an EPrint Package Manager (EPM) package that can be stored in XML format as a .epm file or are hosted on EPM repositories such as http://bazaar.eprints.org. | ||
+ | |||
+ | The EPM data object is now hosted in the bazaar ingredient found at: | ||
+ | |||
+ | ingredients/bazaar/plugins/EPrints/DataObj/EPM.pm | ||
+ | |||
+ | <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_core_metadata_fields --> | ||
+ | ==CORE METADATA 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_epmid --> | ||
+ | ===epmid (id)=== | ||
+ | |||
+ | The text ID of the EPM package | ||
+ | |||
+ | <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 --> | ||
+ | ===eprintid (int)=== | ||
+ | |||
+ | The ID number of the EPrint record from the EPM repository. | ||
+ | |||
+ | E.g. http://bazaar.eprints.org/. | ||
+ | |||
+ | <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_uri --> | ||
+ | ===uri (url)=== | ||
+ | |||
+ | The URI of the EPM package from the EPM repository it is hosted. | ||
+ | |||
+ | E.g. http://bazaar.eprints.org/id/epm/reports | ||
+ | |||
+ | <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_version --> | ||
+ | ===version (text)=== | ||
+ | |||
+ | The version (e.g. 1.0.0) of the EPM package. | ||
+ | |||
+ | <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_controller --> | ||
+ | ===controller (text)=== | ||
+ | |||
+ | <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_creators --> | ||
+ | ===creators (compound, multiple)=== | ||
+ | |||
+ | Creators of the EPM package including both their full name and email address. | ||
+ | |||
+ | <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 (time)=== | ||
+ | |||
+ | The date and time this version of this EPM package was published. | ||
+ | |||
+ | <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_title --> | ||
+ | ===title (longtext)=== | ||
+ | |||
+ | The title of this EPM package. | ||
+ | |||
+ | <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_description --> | ||
+ | ===description (longtext)=== | ||
+ | |||
+ | The description of this EPM package and its purpose. | ||
+ | |||
<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> | <span style='display:none'>User Comments</span> | ||
Line 24: | Line 149: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_requirements --> |
− | == | + | ===requirements (longtext)=== |
+ | |||
+ | A description of the requirements for this EPM package. | ||
+ | |||
+ | <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_home_page --> | ||
+ | ===home_page (url)=== | ||
+ | |||
+ | A URL for the home page of the EPM package. Maybe a page including documentation on how to use the EPM package. | ||
+ | |||
+ | <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_icon --> | ||
+ | ===icon (url)=== | ||
+ | |||
+ | A URL for the icon for the EPM package. | ||
+ | |||
+ | <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_references_and_related_objects --> | ||
+ | ==REFERENCES AND 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%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_documents --> | ||
+ | ===documents (subobject, multiple)=== | ||
+ | |||
+ | The documents for this EPM package. Effectively a manifest of files required to install the EPM om a repository. | ||
+ | |||
+ | <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_instance_variables --> | ||
+ | ==INSTANCE VARIABLES== | ||
+ | See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj]]. | ||
+ | |||
<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> | <span style='display:none'>User Comments</span> | ||
Line 35: | Line 219: | ||
<!-- Pod2Wiki=head_methods --> | <!-- Pod2Wiki=head_methods --> | ||
==METHODS== | ==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_new --> | ||
+ | ====new==== | ||
+ | |||
+ | $epm = EPrints::DataObj::EPM->new( $repo, $id ) | ||
+ | Returns a new object representing the installed EPM package <tt>$id</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_new_from_data --> | ||
+ | ====new_from_data==== | ||
+ | |||
+ | $epm = EPrints::DataObj::EPM->new_from_data( $repo, $epdata, $dataset ) | ||
+ | Returns a new object representing the EPM package based on the <tt>$epdata</tt> and <tt>$dataset</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_new_from_data --> | ||
+ | ====new_from_data==== | ||
+ | |||
+ | $epm = EPrints::DataObj::EPM->new_from_data( $repo, $xml ) | ||
+ | Returns a new object representing the EPM package based on the <tt>$xml</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_new_from_data --> | ||
+ | ====new_from_data==== | ||
+ | |||
+ | $epm = EPrints::DataObj::EPM->new_from_data( $repo, $fh ) | ||
+ | Returns a new object representing the EPM package based on the XML from the file handle <tt>$fh</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_new_from_manifest --> | ||
+ | ====new_from_manifest==== | ||
+ | |||
+ | $epm = EPrint::DataObj::EPM->new_from_manifest( $repo, $epdata, [ @manifest ] ) | ||
+ | Makes and returns a new EPM object based on the <tt>$epdata</tt> and a manifest of installable 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=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%; '> | <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> | <span style='display:none'>User Comments</span> | ||
Line 43: | Line 310: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_get_system_field_info --> | <!-- Pod2Wiki=item_get_system_field_info --> | ||
− | ===get_system_field_info=== | + | ====get_system_field_info==== |
$metadata = EPrints::DataObj::EPM->get_system_field_info | $metadata = EPrints::DataObj::EPM->get_system_field_info | ||
− | + | Returns an array describing the system metadata of the epm dataset. | |
<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%; '> | ||
Line 55: | Line 322: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_get_dataset_id --> |
− | === | + | ====get_dataset_id==== |
+ | |||
+ | $dataset = EPrints::DataObj::EPM->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_render_controller --> | |
− | + | ====render_controller==== | |
− | + | ||
+ | $xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm ) | ||
+ | Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by <tt>$value</tt>. | ||
<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%; '> | ||
Line 74: | Line 348: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_render_icon --> |
− | === | + | ====render_icon==== |
− | $ | + | $xhtml = EPrints::DataObj::EPM::render_icon( $repo, $field, $value, under, undef, $epm ) |
− | Returns | + | Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by <tt>$value</tt>. |
<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%; '> | ||
Line 87: | Line 361: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_map --> |
− | === | + | ====map==== |
+ | |||
+ | EPrints::DataObj::EPM->map( $repo, $f, $ctx ) | ||
+ | Apply a function <tt>$f</tt> over all installed EPMs with and only context <tt>$ctx</tt>, which is not currently implemented. | ||
+ | |||
+ | sub { | ||
+ | my( $repo, $dataset, $epm, [ $ctx ] ) = @_; | ||
+ | } | ||
+ | |||
+ | This loads the EPM index files only. | ||
+ | |||
+ | <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%; '> | <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> | <span style='display:none'>User Comments</span> | ||
Line 101: | Line 390: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_commit --> | <!-- Pod2Wiki=item_commit --> | ||
− | ===commit=== | + | ====commit==== |
$epm->commit | $epm->commit | ||
Line 114: | Line 403: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_rebuild --> | <!-- Pod2Wiki=item_rebuild --> | ||
− | ===rebuild=== | + | ====rebuild==== |
$epm->rebuild | $epm->rebuild | ||
Line 127: | Line 416: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_version --> | <!-- Pod2Wiki=item_version --> | ||
− | ===version=== | + | ====version==== |
$v = $epm->version | $v = $epm->version | ||
Line 140: | Line 429: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_is_enabled --> | <!-- Pod2Wiki=item_is_enabled --> | ||
− | ===is_enabled=== | + | ====is_enabled==== |
$bool = $epm->is_enabled | $bool = $epm->is_enabled | ||
− | Returns true if the | + | Returns <tt>true</tt> if the EPM is enabled for the current repository. |
<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%; '> | ||
Line 153: | Line 442: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_repositories --> | <!-- Pod2Wiki=item_repositories --> | ||
− | ===repositories=== | + | ====repositories==== |
@repoids = $epm->repositories | @repoids = $epm->repositories | ||
− | Returns a list of repository | + | Returns a list of repository IDs in which this EPM is enabled. |
<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%; '> | ||
Line 166: | Line 455: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_package_filename --> | <!-- Pod2Wiki=item_package_filename --> | ||
− | ===package_filename=== | + | ====package_filename==== |
− | $filename = $epm->package_filename | + | $filename = $epm->package_filename |
Returns the complete package filename. | Returns the complete package filename. | ||
Line 179: | Line 468: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_epm_dir --> | <!-- Pod2Wiki=item_epm_dir --> | ||
− | ===epm_dir=== | + | ====epm_dir==== |
$dir = $epm->epm_dir | $dir = $epm->epm_dir | ||
− | Path to the epm directory for this | + | Path to the epm directory for this EPM. |
<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%; '> | ||
Line 192: | Line 481: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_installed_files --> | <!-- Pod2Wiki=item_installed_files --> | ||
− | ===installed_files=== | + | ====installed_files==== |
− | @files = $epm->installed_files | + | @files = $epm->installed_files |
Returns a list of installed files as [[API:EPrints/DataObj/File|EPrints::DataObj::File]]. | Returns a list of installed files as [[API:EPrints/DataObj/File|EPrints::DataObj::File]]. | ||
Line 205: | Line 494: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_repository_files --> | <!-- Pod2Wiki=item_repository_files --> | ||
− | ===repository_files=== | + | ====repository_files==== |
− | @files = $epm->repository_files | + | @files = $epm->repository_files |
− | Returns the list of configuration files used to enable/configure | + | Returns the list of configuration files used to enable/configure this EPM. |
<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%; '> | ||
Line 218: | Line 507: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_control_screen --> | <!-- Pod2Wiki=item_control_screen --> | ||
− | ===control_screen=== | + | ====control_screen==== |
$screen = $epm->control_screen( %params ) | $screen = $epm->control_screen( %params ) | ||
− | Returns the control screen for this | + | Returns the control screen for this EPM. <tt>%params</tt> are passed to the plugin constructor. |
<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%; '> | ||
Line 231: | Line 520: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_serialise --> | <!-- Pod2Wiki=item_serialise --> | ||
− | ===serialise=== | + | ====serialise==== |
− | $epm->serialise( $fh, [ | + | $epm->serialise( $fh, [ $files ] ) |
− | Serialises this EPM to the open file handle $fh. If | + | Serialises this EPM to the open file handle <tt>$fh</tt>. If <tt>$files</tt> is true file contents are included. |
+ | |||
+ | <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_stem = $epm->url_stem | ||
+ | Returns the URL stem for this EPM. Always just an empty string. | ||
+ | |||
+ | <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_html_phrase --> | ||
+ | ====html_phrase==== | ||
+ | |||
+ | $xhtml_phrase = $epm->html_phrase( $phraseid, [ @pins ] ) | ||
+ | Returns and XHTML DOM oject of the HTML phrase for and EPM with the <tt>$phraseid</tt> using the <tt>@pins</tt> provided if required. | ||
<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%; '> | ||
Line 244: | Line 559: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_install --> | <!-- Pod2Wiki=item_install --> | ||
− | ===install=== | + | ====install==== |
− | $ok = $epm->install( | + | $ok = $epm->install( $handler, [ $force ] ) |
− | Install the EPM into the system. | + | Install the EPM into the system. <tt>$handler</tt> is a [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for reporting errors. |
+ | |||
+ | <tt>$force</tt> ignores checking the hashes of the files to make sure they have not been changed. | ||
+ | |||
+ | Returns boolean dependent on whether install was successful. | ||
<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%; '> | ||
Line 257: | Line 576: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_uninstall --> | <!-- Pod2Wiki=item_uninstall --> | ||
− | ===uninstall=== | + | ====uninstall==== |
+ | |||
+ | $ok = $epm->uninstall( $handler, [ $force ] ) | ||
+ | Remove the EPM from the system. <tt>$handler</tt> is a [[API:EPrints/CLIProcessor|EPrints::CLIProcessor]] or [[API:EPrints/ScreenProcessor|EPrints::ScreenProcessor]], used for reporting errors. | ||
+ | |||
+ | <tt>$force</tt> ignores checking the hashes of the files to make sure they have not been changed. | ||
− | + | Returns boolean dependent on whether uninstall was successful. | |
− | |||
<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%; '> | ||
Line 270: | Line 593: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_disable_unchanged --> | <!-- Pod2Wiki=item_disable_unchanged --> | ||
− | ===disable_unchanged=== | + | ====disable_unchanged==== |
+ | |||
+ | $ok = $epm->disable_unchanged | ||
+ | Remove unchanged files from the repository directory. This allows a new version of the EPM to be installed/enabled. | ||
− | + | Returns boolean dependent on whether disabling unchanged was successful. | |
− | |||
<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%; '> | ||
Line 283: | Line 608: | ||
</div> | </div> | ||
<!-- Pod2Wiki=item_enable --> | <!-- Pod2Wiki=item_enable --> | ||
− | ===enable=== | + | ====enable==== |
$ok = $epm->enable( $handler ) | $ok = $epm->enable( $handler ) | ||
− | Enables the | + | Enables the EPM for the current repository using <tt>$handler</tt> to manage messaging for the enabling process. |
+ | |||
+ | Returns boolean dependent on whether enabling was successful. | ||
<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%; '> | ||
Line 295: | Line 622: | ||
<!-- Pod2Wiki= --> | <!-- Pod2Wiki= --> | ||
</div> | </div> | ||
− | <!-- Pod2Wiki= | + | <!-- Pod2Wiki=item_enable --> |
− | === | + | ====enable==== |
+ | |||
+ | $ok = $epm->enable( $handler ) | ||
+ | Enables the EPM for the current repository using <tt>$handler</tt> to manage messaging for the disabling process. | ||
+ | |||
+ | Returns boolean dependent on whether disabling was successful. | ||
+ | |||
<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> | <span style='display:none'>User Comments</span> | ||
Line 307: | Line 640: | ||
====current_counters==== | ====current_counters==== | ||
− | $conf = $epm->current_counters | + | $conf = $epm->current_counters |
+ | Get SQL counters for current data 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> | <span style='display:none'>User Comments</span> | ||
Line 318: | Line 653: | ||
====current_datasets==== | ====current_datasets==== | ||
− | $conf = $epm->current_datasets | + | $conf = $epm->current_datasets |
+ | Get dataset for current data 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> | <span style='display:none'>User Comments</span> | ||
Line 329: | Line 666: | ||
====update_counters==== | ====update_counters==== | ||
− | $ok = $epm->update_counters( $ | + | $ok = $epm->update_counters( $before ) |
+ | Update the SQL counters. Removing any counters listed in <tt>$before</tt> that are not used any more. (<tt>$before</tt> should be retrieved before enabling by using [[API:EPrints/DataObj/EPM#current_counters|current_counters]].) | ||
+ | |||
<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> | <span style='display:none'>User Comments</span> | ||
Line 340: | Line 679: | ||
====update_datasets==== | ====update_datasets==== | ||
− | $ok = $epm->update_datasets( $ | + | $ok = $epm->update_datasets( $before ) |
− | Update the datasets following any configuration changes made by the extension on being enabled. $ | + | Update the datasets following any configuration changes made by the extension on being enabled. Removing any datasets listed in <tt>$before</tt> that are not used any more. <tt>$before</tt> should be retrieved before enabling by using [[API:EPrints/DataObj/EPM#current_datasets|current_datasets]]. |
<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%; '> | ||
Line 353: | Line 692: | ||
====publish==== | ====publish==== | ||
− | $ok = $epm->publish( $handler, $ | + | $ok = $epm->publish( $handler, $url, %opts ) |
− | Publish this EPM to a remote system using SWORD. | + | Publish this EPM to a remote system using SWORD, using <tt>$handler</tt> to manage messaging for the publishing process. |
− | $ | + | <tt>$url</tt> is the URL of the SWORD endpoint or a page containing a SWORD link. |
Options: | Options: | ||
− | + | username - username for Basic auth | |
− | + | password - password for Basic auth | |
+ | Returns a boolean dependent on whether the publishing was successful. | ||
+ | |||
+ | <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_set --> | ||
+ | ====is_set==== | ||
+ | |||
+ | $ok = $epm->is_set( $fieldid ) | ||
+ | Returns a boolean dependent on whether a value is set for the field with <tt>$fieldid</tt> for this EPM. | ||
+ | |||
+ | <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_controller --> | ||
+ | ====render_controller==== | ||
+ | |||
+ | $xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm ) | ||
+ | Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by <tt>$value</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_render_icon --> | ||
+ | ====render_icon==== | ||
+ | |||
+ | $xhtml = EPrints::DataObj::EPM::render_icon( $repo, $field, $value, under, undef, $epm ) | ||
+ | Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by <tt>$value</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_see_also --> | ||
+ | ==SEE ALSO== | ||
+ | [[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]] | ||
+ | |||
<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> | <span style='display:none'>User Comments</span> | ||
Line 372: | Line 772: | ||
<!-- Pod2Wiki=head_copyright --> | <!-- Pod2Wiki=head_copyright --> | ||
==COPYRIGHT== | ==COPYRIGHT== | ||
+ | {{API:Copyright}} | ||
<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> | <span style='display:none'>User Comments</span> |
Latest revision as of 01:46, 11 January 2022
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
- 3 CORE METADATA FIELDS
- 4 REFERENCES AND RELATED OBJECTS
- 5 INSTANCE VARIABLES
- 6 METHODS
- 6.1 Constructor Methods
- 6.2 Class Methods
- 6.3 Object Methods
- 6.3.1 commit
- 6.3.2 rebuild
- 6.3.3 version
- 6.3.4 is_enabled
- 6.3.5 repositories
- 6.3.6 package_filename
- 6.3.7 epm_dir
- 6.3.8 installed_files
- 6.3.9 repository_files
- 6.3.10 control_screen
- 6.3.11 serialise
- 6.3.12 url_stem
- 6.3.13 html_phrase
- 6.3.14 install
- 6.3.15 uninstall
- 6.3.16 disable_unchanged
- 6.3.17 enable
- 6.3.18 enable
- 6.3.19 current_counters
- 6.3.20 current_datasets
- 6.3.21 update_counters
- 6.3.22 update_datasets
- 6.3.23 publish
- 6.3.24 is_set
- 6.4 Utility Methods
- 7 SEE ALSO
- 8 COPYRIGHT
NAME
EPrints::DataObj::EPM - An EPrints Package Manager (EPM) package.
DESCRIPTION
This class represents an EPrint Package Manager (EPM) package that can be stored in XML format as a .epm file or are hosted on EPM repositories such as http://bazaar.eprints.org.
The EPM data object is now hosted in the bazaar ingredient found at:
ingredients/bazaar/plugins/EPrints/DataObj/EPM.pm
CORE METADATA FIELDS
epmid (id)
The text ID of the EPM package
eprintid (int)
The ID number of the EPrint record from the EPM repository.
E.g. http://bazaar.eprints.org/.
uri (url)
The URI of the EPM package from the EPM repository it is hosted.
E.g. http://bazaar.eprints.org/id/epm/reports
version (text)
The version (e.g. 1.0.0) of the EPM package.
controller (text)
creators (compound, multiple)
Creators of the EPM package including both their full name and email address.
datestamp (time)
The date and time this version of this EPM package was published.
title (longtext)
The title of this EPM package.
description (longtext)
The description of this EPM package and its purpose.
requirements (longtext)
A description of the requirements for this EPM package.
home_page (url)
A URL for the home page of the EPM package. Maybe a page including documentation on how to use the EPM package.
icon (url)
A URL for the icon for the EPM package.
REFERENCES AND RELATED OBJECTS
documents (subobject, multiple)
The documents for this EPM package. Effectively a manifest of files required to install the EPM om a repository.
INSTANCE VARIABLES
See EPrints::DataObj.
METHODS
Constructor Methods
new
$epm = EPrints::DataObj::EPM->new( $repo, $id )
Returns a new object representing the installed EPM package $id.
new_from_data
$epm = EPrints::DataObj::EPM->new_from_data( $repo, $epdata, $dataset )
Returns a new object representing the EPM package based on the $epdata and $dataset.
new_from_data
$epm = EPrints::DataObj::EPM->new_from_data( $repo, $xml )
Returns a new object representing the EPM package based on the $xml provided.
new_from_data
$epm = EPrints::DataObj::EPM->new_from_data( $repo, $fh )
Returns a new object representing the EPM package based on the XML from the file handle $fh provided.
new_from_manifest
$epm = EPrint::DataObj::EPM->new_from_manifest( $repo, $epdata, [ @manifest ] )
Makes and returns a new EPM object based on the $epdata and a manifest of installable files.
Class Methods
get_system_field_info
$metadata = EPrints::DataObj::EPM->get_system_field_info
Returns an array describing the system metadata of the epm dataset.
get_dataset_id
$dataset = EPrints::DataObj::EPM->get_dataset_id
Returns the ID of the EPrints::DataSet object to which this record belongs.
render_controller
$xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm )
Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by $value.
render_icon
$xhtml = EPrints::DataObj::EPM::render_icon( $repo, $field, $value, under, undef, $epm )
Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by $value.
map
EPrints::DataObj::EPM->map( $repo, $f, $ctx )
Apply a function $f over all installed EPMs with and only context $ctx, which is not currently implemented.
sub { my( $repo, $dataset, $epm, [ $ctx ] ) = @_; }
This loads the EPM index files only.
Object Methods
commit
$epm->commit
Commit any changes to the installed .epm, .epmi files.
rebuild
$epm->rebuild
Reload all of the installed files (regenerating hashes if necessary).
version
$v = $epm->version
Returns a stringified version suitable for string gt/lt matching.
is_enabled
$bool = $epm->is_enabled
Returns true if the EPM is enabled for the current repository.
repositories
@repoids = $epm->repositories
Returns a list of repository IDs in which this EPM is enabled.
package_filename
$filename = $epm->package_filename
Returns the complete package filename.
epm_dir
$dir = $epm->epm_dir
Path to the epm directory for this EPM.
installed_files
@files = $epm->installed_files
Returns a list of installed files as EPrints::DataObj::File.
repository_files
@files = $epm->repository_files
Returns the list of configuration files used to enable/configure this EPM.
control_screen
$screen = $epm->control_screen( %params )
Returns the control screen for this EPM. %params are passed to the plugin constructor.
serialise
$epm->serialise( $fh, [ $files ] )
Serialises this EPM to the open file handle $fh. If $files is true file contents are included.
url_stem
$url_stem = $epm->url_stem
Returns the URL stem for this EPM. Always just an empty string.
html_phrase
$xhtml_phrase = $epm->html_phrase( $phraseid, [ @pins ] )
Returns and XHTML DOM oject of the HTML phrase for and EPM with the $phraseid using the @pins provided if required.
install
$ok = $epm->install( $handler, [ $force ] )
Install the EPM into the system. $handler is a EPrints::CLIProcessor or EPrints::ScreenProcessor, used for reporting errors.
$force ignores checking the hashes of the files to make sure they have not been changed.
Returns boolean dependent on whether install was successful.
uninstall
$ok = $epm->uninstall( $handler, [ $force ] )
Remove the EPM from the system. $handler is a EPrints::CLIProcessor or EPrints::ScreenProcessor, used for reporting errors.
$force ignores checking the hashes of the files to make sure they have not been changed.
Returns boolean dependent on whether uninstall was successful.
disable_unchanged
$ok = $epm->disable_unchanged
Remove unchanged files from the repository directory. This allows a new version of the EPM to be installed/enabled.
Returns boolean dependent on whether disabling unchanged was successful.
enable
$ok = $epm->enable( $handler )
Enables the EPM for the current repository using $handler to manage messaging for the enabling process.
Returns boolean dependent on whether enabling was successful.
enable
$ok = $epm->enable( $handler )
Enables the EPM for the current repository using $handler to manage messaging for the disabling process.
Returns boolean dependent on whether disabling was successful.
current_counters
$conf = $epm->current_counters
Get SQL counters for current data objects.
current_datasets
$conf = $epm->current_datasets
Get dataset for current data objects.
update_counters
$ok = $epm->update_counters( $before )
Update the SQL counters. Removing any counters listed in $before that are not used any more. ($before should be retrieved before enabling by using current_counters.)
update_datasets
$ok = $epm->update_datasets( $before )
Update the datasets following any configuration changes made by the extension on being enabled. Removing any datasets listed in $before that are not used any more. $before should be retrieved before enabling by using current_datasets.
publish
$ok = $epm->publish( $handler, $url, %opts )
Publish this EPM to a remote system using SWORD, using $handler to manage messaging for the publishing process.
$url is the URL of the SWORD endpoint or a page containing a SWORD link.
Options:
username - username for Basic auth password - password for Basic auth
Returns a boolean dependent on whether the publishing was successful.
is_set
$ok = $epm->is_set( $fieldid )
Returns a boolean dependent on whether a value is set for the field with $fieldid for this EPM.
Utility Methods
render_controller
$xhtml = EPrints::DataObj::EPM::render_controller( $repo, $field, $value, under, undef, $epm )
Returns and XHTML DOM object rendering for the action link of the EPM using the screen plugin with name supplied by $value.
render_icon
$xhtml = EPrints::DataObj::EPM::render_icon( $repo, $field, $value, under, undef, $epm )
Returns and XHTML DOM object rendering for the icon of the EPM using the image with the filename supplied by $value.
SEE ALSO
EPrints::DataObj and EPrints::DataSet
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.