⧼vector-jumptocontent⧽

API:EPrints/NamedSet: Difference between revisions

From EPrints Documentation
Created page with '<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' com…'
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_  
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/NamedSet.pm|package_name=EPrints::NamedSet}}[[Category:API|NAMEDSET]][[Category:API:EPrints/NamedSet|NAMEDSET]]<div><!-- Edit below this comment -->
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/NamedSet.pm|package_name=EPrints::NamedSet}}[[Category:API|NAMEDSET]][[Category:API:EPrints/NamedSet|NAMEDSET]]<div><!-- Edit below this comment -->




Line 8: Line 8:
'''EPrints::NamedSet''' - Repository Configuration
'''EPrints::NamedSet''' - Repository Configuration


<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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_synopsis -->
<!-- Pod2Wiki=head_synopsis -->
==SYNOPSIS==
==SYNOPSIS==
  $namedset = EPrints::NamedSet-&gt;new( "eprint",
<source lang="perl">$namedset = EPrints::NamedSet->new( "eprint",
    repository =&gt; $repository
repository => $repository
  );
);
 
 
  $namedset-&gt;add_option( "performance", "my_package" );
$namedset->add_option( "performance", "my_package" );
  $namedset-&gt;remove_option( "thesis", "my_package" );
$namedset->remove_option( "thesis", "my_package" );</source>
 
 
<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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_description -->
<!-- Pod2Wiki=head_description -->
==DESCRIPTION==
==DESCRIPTION==
A utility class to manipulate named sets. Add and remove methods are designed to be called by Bazaar Packages
A utility class to manipulate named sets. Add and remove methods are designed to be called by Bazaar Packages


<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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- 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%; '>
<!-- Pod2Wiki=head_new -->
<span style='display:none'>User Comments</span>
===new===
<!-- Edit below this comment -->
 


<!-- Pod2Wiki= -->
<source lang="perl">$namedset = EPrints::NamedSet->new( $id, %opts )
</div>
<!-- Pod2Wiki=item_new -->
===new===


$namedset = EPrints::NamedSet-&gt;new( $id, %opts )
</source>
<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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_add_option -->
<!-- Pod2Wiki=item_add_option -->
===add_option===
===add_option===


$nameset-&gt;add_option( $option, $package_name [, $index] )
<source lang="perl">$nameset->add_option( $option, $package_name [, $index] )
 
</source>
Add an option to the named set.  
Add an option to the named set.  


Line 72: Line 57:
If it already exists, index is ignored.
If it already exists, index is ignored.


<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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_remove_option -->
<!-- Pod2Wiki=item_remove_option -->
===remove_option===
===remove_option===


$namedset-&gt;remove_option( $option, $package_name )
<source lang="perl">$namedset->remove_option( $option, $package_name )
 
</source>
Remove an option from the named set.
Remove an option from the named 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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_remove -->
<!-- Pod2Wiki=item_remove -->
===remove===
===remove===


$ok = $namedset-&gt;remove
<source lang="perl">$ok = $namedset->remove
 
</source>
Remove the namedset from the file system.
Remove the namedset from the file system.


<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 -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=head_copyright -->
<!-- Pod2Wiki=head_copyright -->
==COPYRIGHT==
==COPYRIGHT==
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
: Copyright 2000-2011 University of Southampton.
<span style='display:none'>User Comments</span>
 
: 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/.
 
<!-- Edit below this comment -->
<!-- Edit below this comment -->




<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
<!-- Pod2Wiki=_postamble_ -->
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->
<!-- Edit below this comment -->

Latest revision as of 09:56, 22 January 2013

Latest Source Code (3.4, 3.3) | 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/.