API:EPrints/NamedSet

From EPrints Documentation
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::NamedSet - Repository Configuration


SYNOPSIS

$namedset = EPrints::NamedSet->new( "eprint",
	repository => $repository
);
 
$namedset->add_option( "performance", "my_package" );
$namedset->remove_option( "thesis", "my_package" );


DESCRIPTION

A utility class to manipulate named sets. Add and remove methods are designed to be called by Bazaar Packages


METHODS

new

$namedset = EPrints::NamedSet->new( $id, %opts )


add_option

$nameset->add_option( $option, $package_name [, $index] )

Add an option to the named set.

If the option already exists and is not core or already beloning to this package then a required_by field is added to the file.

If it already exists, index is ignored.


remove_option

$namedset->remove_option( $option, $package_name )

Remove an option from the named set.


remove

$ok = $namedset->remove

Remove the namedset from the file system.


COPYRIGHT

Copyright 2000-2011 University of Southampton.
This file is part of EPrints http://www.eprints.org/.
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
EPrints 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. If not, see http://www.gnu.org/licenses/.