1 package eu.scape_project.watch.adaptor.c3po.client;
2
3 import java.io.InputStream;
4 import java.util.List;
5
6 /**
7 * A simple client interface to the c3po content profiler tool. It allows the
8 * client application to query c3po and fetch content profiles.
9 *
10 * @author Petar Petrov <me@petarpetrov.org>
11 *
12 */
13 public interface C3POClientInterface {
14
15 /**
16 * Fetches the current content profile identifiers stored in the c3po
17 * instance.
18 *
19 * @return a list of collection identifiers
20 */
21 List<String> getCollectionIdentifiers();
22
23 /*
24 * the list properties should probably be changed to some kind of map-like
25 * config object that can hold many parameters and options submitted to the
26 * client.
27 */
28 /**
29 * Submits a new profile creation job to c3po.
30 *
31 * @param identifier
32 * the collection identifier
33 * @param properties
34 * the properties that are of interest
35 * @return a string representing the uuid of the job or null if 404.
36 */
37 String submitCollectionProfileJob(String identifier, List<String> properties);
38
39 /**
40 * Retrieves an input stream with the results of the job for the given uuid,
41 * or null if the job is not yet finished or unknown.
42 *
43 * @param uuid
44 * the job id.
45 * @return the InputStream holding the profile.
46 */
47 InputStream pollJobResult(String uuid);
48 }