source: VirtualCollectionRegistry/tags/VirtualCollectionRegistry-0.4.0-alpha2/VirtualCollectionRegistry/src/main/java/de/uni_leipzig/asv/clarin/webservices/pidservices2/interfaces/PidWriter.java @ 5557

Last change on this file since 5557 was 5557, checked in by Twan Goosen, 10 years ago

tag for VCR alpha 2

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1package de.uni_leipzig.asv.clarin.webservices.pidservices2.interfaces;
2
3import java.util.Map;
4
5import org.apache.commons.httpclient.HttpException;
6
7import de.uni_leipzig.asv.clarin.webservices.pidservices2.Configuration;
8import de.uni_leipzig.asv.clarin.webservices.pidservices2.HandleField;
9
10/**
11 * Registers new handles at handle server or modifies existing handles
12 *
13 * @author Thomas Eckart
14 *
15 */
16public interface PidWriter {
17   
18        /**
19         * Try to register a new PID at handle server. Returns registered handle if successful.
20         *
21         * @param configuration
22         * @param fieldMap
23         *            handle mapping field -> value
24         * @param pid PID to register
25         * @return registered handle identifier
26         * @throws HTTPException if the handle could not be created, possibly
27         * because the ID already exists at the server
28         */
29        public String registerNewPID(final Configuration configuration, Map<HandleField, String> fieldMap, String pid)
30            throws HttpException;
31        /**
32         * Try to register a new PID at handle server. Returns registered handle if successful.
33         *
34         * @param configuration
35         * @param fieldMap
36         *            handle mapping field -> value
37         * @return registered handle identifier
38         * @throws HTTPException
39         */
40        public String registerNewPID(final Configuration configuration, Map<HandleField, String> fieldMap)
41                        throws HttpException;
42
43        /**
44         * Modify existing PID. This method overwrites all existing fields! Fields that should remain stored for the PID have to be added to fieldMap.
45         *
46         * @param configuration
47         * @param pid
48         *            Persistent identifier that will be modified/overwritten
49         * @param fieldMap
50         *            new field values: mapping handle field -> value
51         */
52        public void modifyPid(final Configuration configuration, final String pid, Map<HandleField, String> fieldMap);
53}
Note: See TracBrowser for help on using the repository browser.