source: VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/de/uni_leipzig/asv/clarin/webservices/pidservices2/interfaces/PidResolver.java @ 5482

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

Updated the PID services according to a the new version (2.0.6-SNAPSHOT) provided by Thomas Eckart

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1package de.uni_leipzig.asv.clarin.webservices.pidservices2.interfaces;
2
3import java.io.IOException;
4import java.util.List;
5import java.util.Map;
6
7import net.sf.json.JSONArray;
8import de.uni_leipzig.asv.clarin.webservices.pidservices2.Configuration;
9import de.uni_leipzig.asv.clarin.webservices.pidservices2.HandleField;
10import de.uni_leipzig.asv.clarin.webservices.pidservices2.PidObject;
11
12/**
13 * Requests information about handle from handle server
14 *
15 * @author Thomas Eckart
16 */
17public interface PidResolver {
18
19        /**
20         * Get information about handle from handle server.
21         *
22         * @param configuration
23         * @param pid
24         *            Handle Id
25         * @return all information from handle server in JSON
26         * @throws IOException
27         */
28        public JSONArray resolvePidAsJSON(final Configuration configuration, final String pid) throws IOException;
29
30        /**
31         * Get information about handle from handle server.
32         *
33         * The returned object only provides some fields of the handle (like referenced URL). To have access to the complete content use resolvePidAsJSON().
34         *
35         * @param configuration
36         * @param pid
37         *            Handle Id
38         * @return all information from handle server as simple Java object
39         * @throws IOException
40         */
41        public PidObject resolvePidAsPOJO(final Configuration configuration, final String pid) throws IOException;
42
43        /**
44         * Search all handles with matching field assignments.
45         *
46         * @param configuration
47         * @param fieldMap
48         *            searched handle field assignments
49         * @return Map handles -> handle fields as JSONArray
50         * @throws IOException
51         */
52        public Map<String, JSONArray> searchPidAsJSON(final Configuration configuration, Map<HandleField, String> fieldMap)
53                        throws IOException;
54
55        /**
56         * Search all handles with matching field assignments.
57         *
58         * @param configuration
59         * @param fieldMap
60         *            searched handle field assignments
61         * @return Map handles -> handle fields as PidObject
62         * @throws IOException
63         */
64        public Map<String, PidObject> searchPidAsPOJO(final Configuration configuration, Map<HandleField, String> fieldMap)
65                        throws IOException;
66
67        /**
68         * Search all handles with matching field assignments.
69         *
70         * @param configuration
71         * @param fieldMap
72         *            searched handle field assignments
73         * @return List of handle identifiers
74         * @throws IOException
75         */
76        public List<String> searchPidAsList(final Configuration configuration, Map<HandleField, String> fieldMap)
77                        throws IOException;
78}
Note: See TracBrowser for help on using the repository browser.