Jump to content

API:EPrints/DataObj/EPM

From EPrints Documentation

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME[edit]

EPrints::DataObj::EPM - An EPrints Package Manager (EPM) package.

User Comments


DESCRIPTION[edit]

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
 

User Comments


CORE METADATA FIELDS[edit]

User Comments


epmid (id)[edit]

The text ID of the EPM package

User Comments


eprintid (int)[edit]

The ID number of the EPrint record from the EPM repository.

E.g. http://bazaar.eprints.org/.

User Comments


uri (url)[edit]

The URI of the EPM package from the EPM repository it is hosted.

E.g. http://bazaar.eprints.org/id/epm/reports

User Comments


version (text)[edit]

The version (e.g. 1.0.0) of the EPM package.

User Comments


controller (text)[edit]

User Comments


creators (compound, multiple)[edit]

Creators of the EPM package including both their full name and email address.

User Comments


datestamp (time)[edit]

The date and time this version of this EPM package was published.

User Comments


title (longtext)[edit]

The title of this EPM package.

User Comments


description (longtext)[edit]

The description of this EPM package and its purpose.

User Comments


requirements (longtext)[edit]

A description of the requirements for this EPM package.

User Comments


home_page (url)[edit]

A URL for the home page of the EPM package. Maybe a page including documentation on how to use the EPM package.

User Comments


icon (url)[edit]

A URL for the icon for the EPM package.

User Comments


REFERENCES AND RELATED OBJECTS[edit]

User Comments


documents (subobject, multiple)[edit]

The documents for this EPM package. Effectively a manifest of files required to install the EPM om a repository.

User Comments


INSTANCE VARIABLES[edit]

See EPrints::DataObj.

User Comments


METHODS[edit]

User Comments


Constructor Methods[edit]

User Comments


new[edit]

$epm = EPrints::DataObj::EPM->new( $repo, $id )

Returns a new object representing the installed EPM package $id.

User Comments


new_from_data[edit]

$epm = EPrints::DataObj::EPM->new_from_data( $repo, $epdata, $dataset )

Returns a new object representing the EPM package based on the $epdata and $dataset.

User Comments


new_from_data[edit]

$epm = EPrints::DataObj::EPM->new_from_data( $repo, $xml )

Returns a new object representing the EPM package based on the $xml provided.

User Comments


new_from_data[edit]

$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.

User Comments


new_from_manifest[edit]

$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.

User Comments


Class Methods[edit]

User Comments


get_system_field_info[edit]

$metadata = EPrints::DataObj::EPM->get_system_field_info

Returns an array describing the system metadata of the epm dataset.

User Comments


get_dataset_id[edit]

$dataset = EPrints::DataObj::EPM->get_dataset_id

Returns the ID of the EPrints::DataSet object to which this record belongs.

User Comments


render_controller[edit]

$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.

User Comments


render_icon[edit]

$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.

User Comments


map[edit]

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.

User Comments


Object Methods[edit]

User Comments


commit[edit]

$epm->commit

Commit any changes to the installed .epm, .epmi files.

User Comments


rebuild[edit]

$epm->rebuild

Reload all of the installed files (regenerating hashes if necessary).

User Comments


version[edit]

$v = $epm->version

Returns a stringified version suitable for string gt/lt matching.

User Comments


is_enabled[edit]

$bool = $epm->is_enabled

Returns true if the EPM is enabled for the current repository.

User Comments


repositories[edit]

@repoids = $epm->repositories

Returns a list of repository IDs in which this EPM is enabled.

User Comments


package_filename[edit]

$filename = $epm->package_filename

Returns the complete package filename.

User Comments


epm_dir[edit]

$dir = $epm->epm_dir

Path to the epm directory for this EPM.

User Comments


installed_files[edit]

@files = $epm->installed_files

Returns a list of installed files as EPrints::DataObj::File.

User Comments


repository_files[edit]

@files = $epm->repository_files

Returns the list of configuration files used to enable/configure this EPM.

User Comments


control_screen[edit]

$screen = $epm->control_screen( %params )

Returns the control screen for this EPM. %params are passed to the plugin constructor.

User Comments


serialise[edit]

$epm->serialise( $fh, [ $files ] )

Serialises this EPM to the open file handle $fh. If $files is true file contents are included.

User Comments


url_stem[edit]

$url_stem = $epm->url_stem

Returns the URL stem for this EPM. Always just an empty string.

User Comments


html_phrase[edit]

$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.

User Comments


install[edit]

$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.

User Comments


uninstall[edit]

$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.

User Comments


disable_unchanged[edit]

$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.

User Comments


enable[edit]

$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.

User Comments


enable[edit]

$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.

User Comments


current_counters[edit]

$conf = $epm->current_counters

Get SQL counters for current data objects.

User Comments


current_datasets[edit]

$conf = $epm->current_datasets

Get dataset for current data objects.

User Comments


update_counters[edit]

$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.)

User Comments


update_datasets[edit]

$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.

User Comments


publish[edit]

$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.

User Comments


is_set[edit]

$ok = $epm->is_set( $fieldid )

Returns a boolean dependent on whether a value is set for the field with $fieldid for this EPM.

User Comments


Utility Methods[edit]

User Comments


render_controller[edit]

$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.

User Comments


render_icon[edit]

$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.

User Comments


SEE ALSO[edit]

EPrints::DataObj and EPrints::DataSet

User Comments


COPYRIGHT[edit]

© Copyright 2000-2024 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE[edit]

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/.

User Comments