API:EPrints/DataObj/EPM

From EPrints Documentation
Revision as of 10:47, 25 August 2011 by Tdb01r (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

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


NAME

EPrints::DataObj::EPM - Class representing an EPrints Package

User Comments


DESCRIPTION

User Comments


SYSTEM METADATA

User Comments


METHODS

User Comments


get_system_field_info

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

Return an array describing the system metadata of the EPrint dataset.

User Comments


map

EPrints::DataObj::EPM->map( $repo, sub { ... }, $ctx )

Apply a function over all installed EPMs.

 sub {
   my( $repo, $dataset, $epm [, $ctx ] ) = @_;
 }
 

This loads the EPM index files only.

User Comments


new

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

Returns a new object representing the installed package $id.

User Comments


new_from_manifest

$epm = EPrint::DataObj::EPM->new_from_manifest( $repo, $epdata [, @manifest ] )

Makes and returns a new EPM object based on a manifest of installable files.

User Comments


commit

$epm->commit

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

User Comments


rebuild

$epm->rebuild

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

User Comments


version

$v = $epm->version

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

User Comments


is_enabled

$bool = $epm->is_enabled

Returns true if the $epm is enabled for the current repository.

User Comments


repositories

@repoids = $epm->repositories

Returns a list of repository ids this $epm is enabled in.

User Comments


package_filename

$filename = $epm->package_filename()

Returns the complete package filename.

User Comments


epm_dir

$dir = $epm->epm_dir

Path to the epm directory for this $epm.

User Comments


installed_files

@files = $epm->installed_files()

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

User Comments


repository_files

@files = $epm->repository_files()

Returns the list of configuration files used to enable/configure an $epm.

User Comments


control_screen

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

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

User Comments


serialise

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

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

User Comments


install

$ok = $epm->install( HANDLER [, FORCE ] )

Install the EPM into the system. HANDLER is a EPrints::CLIProcessor or EPrints::ScreenProcessor, used for reporting errors.

User Comments


uninstall

$ok = $epm->uninstall( HANDLER [, FORCE ] )

Remove the EPM from the system. HANDLER is a EPrints::CLIProcessor or EPrints::ScreenProcessor, used for reporting errors.

User Comments


enable

$ok = $epm->enable( $handler )

Enables the $epm for the current repository.

User Comments


Utility Methods

User Comments


current_counters

$conf = $epm->current_counters()

User Comments


current_datasets

$conf = $epm->current_datasets()

User Comments


update_counters

$ok = $epm->update_counters( $conf )

User Comments


update_datasets

$ok = $epm->update_datasets( $conf )

Update the datasets following any configuration changes made by the extension on being enabled. $conf should be retrieved before enabling by using current_datasets.

User Comments


publish

$ok = $epm->publish( $handler, $base_url, %opts )

Publish this EPM to a remote system using SWORD.

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

User Comments


COPYRIGHT

User Comments