Project

General

Profile

« Previous | Next » 

Revision 39115

[maven-release-plugin] copy for tag dnet-objectstore-rmi-2.0.5-TAG

View differences:

modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/deploy.info
1
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-objectstore-rmi/trunk/", "deploy_repository": "dnet4-snapshots", "version": "4", "mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it", "deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet4-snapshots", "name": "dnet-objectstore-rmi"}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/test/java/eu/dnetlib/data/objectstore/rmi/ObjectStoreFileTest.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
import static org.junit.Assert.assertEquals;
4
import static org.junit.Assert.assertNotNull;
5

  
6
import org.junit.Test;
7

  
8
public class ObjectStoreFileTest {
9

  
10
	private final String inputJson = "{\"objectID\":\"1\",\"mimeType\":\"PDF\",\"accessProtocol\":\"FTP\",\"URI\":\"prova=p\",\"usernameAuth\":\"user\",\"passwordAuth\":\"pass\",\"fileSizeKB\":0}";
11

  
12
	@Test
13
	public void testSerializeObjectStoreFile() {
14
		ObjectStoreFile f = new ObjectStoreFile();
15
		f.setAccessProtocol(Protocols.FTP);
16
		f.setMimeType("PDF");
17
		f.setObjectID("1");
18
		f.setPasswordAuth("pass");
19
		f.setUsernameAuth("user");
20
		f.setURI("prova=p");
21
		System.out.println(f.toJSON());
22
		assertNotNull(f.toJSON());
23
	}
24

  
25
	@Test
26
	public void testDeserializeObjectStoreFile() {
27
		ObjectStoreFile f = ObjectStoreFile.createObject(inputJson);
28
		assertNotNull(f);
29

  
30
		assertEquals(inputJson, f.toJSON());
31
	}
32

  
33
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/test/java/eu/dnetlib/data/objectstore/rmi/MetadataObjectRecordTest.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
import java.io.FileInputStream;
4
import java.io.IOException;
5
import java.net.URL;
6

  
7
import org.apache.commons.io.IOUtils;
8
import org.junit.Assert;
9
import org.junit.Test;
10

  
11
import eu.dnetlib.data.objectstore.rmi.MetadataObjectRecord;
12

  
13
public class MetadataObjectRecordTest {
14

  
15
	@Test
16
	public void test() throws IOException {
17
		URL resource = MetadataObjectRecordTest.class.getResource("input.xml");
18
		FileInputStream inputStream = new FileInputStream(resource.getPath());
19
		String everything = IOUtils.toString(inputStream);
20
		MetadataObjectRecord record = new MetadataObjectRecord();
21
		record.setId("1");
22
		record.setRecord(everything);
23
		MetadataObjectRecord newrecord = MetadataObjectRecord.initFromJson(record.toJSON());
24
		Assert.assertEquals(everything, newrecord.getRecord());
25
		inputStream.close();
26

  
27
	}
28
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/test/resources/eu/dnetlib/data/objectstore/rmi/input.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<oai:record xmlns:oai="http://www.openarchives.org/OAI/2.0/"
3
	xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:oaf="http://namespace.openaire.eu/oaf"
4
	xmlns:dnet="eu.dnetlib.data.transform.xml.DataciteToHbaseXsltFunctions">
5
	<header>
6
		<dri:objIdentifier>issn18663516::00024ad2ad3c0d32eee67c9a6bc4a54a
7
		</dri:objIdentifier>
8
		<dri:recordIdentifier>WOS:000308558000053</dri:recordIdentifier>
9
		<dri:dateOfCollection>2013-10-29T12:45:29+01:00</dri:dateOfCollection>
10
		<dri:repositoryId>ac41dbfc-9f0e-479d-8489-fd6596c3858a_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=
11
		</dri:repositoryId>
12
		<oaf:datasourceprefix>issn18663516</oaf:datasourceprefix>
13
	</header>
14
	<metadata>
15
		<csvRecord>
16
			<row name="OA">false</row>
17
			<row name="PT">J</row>
18
			<row name="AU">Ribeiro, RM; Li, H; Wang, SY; Stoddard, MB; Learn, GH;
19
				Korber, BT; Bhattacharya, T; Guedj, J; Parrish, EH; Hahn, BH; Shaw,
20
				GM; Perelson, AS</row>
21
			<row name="BA" />
22
			<row name="BE" />
23
			<row name="GP" />
24
			<row name="AF">Ribeiro, Ruy M.; Li, Hui; Wang, Shuyi; Stoddard, Mark
25
				B.; Learn, Gerald H.; Korber, Bette T.; Bhattacharya, Tanmoy; Guedj,
26
				Jeremie; Parrish, Erica H.; Hahn, Beatrice H.; Shaw, George M.;
27
				Perelson, Alan S.</row>
28
			<row name="BF" />
29
			<row name="CA" />
30
			<row name="TI">Quantifying the Diversification of Hepatitis C Virus
31
				(HCV) during Primary Infection: Estimates of the In Vivo Mutation
32
				Rate</row>
33
			<row name="SO">PLOS PATHOGENS</row>
34
			<row name="SE" />
35
			<row name="LA">English</row>
36
			<row name="DT">Article</row>
37
			<row name="CT" />
38
			<row name="CY" />
39
			<row name="CL" />
40
			<row name="SP" />
41
			<row name="HO" />
42
			<row name="DE" />
43
			<row name="ID">VIRAL DYNAMICS; SUPERINFECTION EXCLUSION; PHYLOGENETIC
44
				ANALYSIS; REPLICATION MODE; DRUG-RESISTANCE; RNA VIRUSES; CELLS;
45
				POPULATION; INTERFERON; DIVERSITY</row>
46
			<row name="AB">Hepatitis C virus (HCV) is present in the host with
47
				multiple variants generated by its error prone RNA-dependent RNA
48
				polymerase. Little is known about the initial viral diversification
49
				and the viral life cycle processes that influence diversity. We
50
				studied the diversification of HCV during acute infection in 17
51
				plasma donors, with frequent sampling early in infection. To analyze
52
				these data, we developed a new stochastic model of the HCV life
53
				cycle. We found that the accumulation of mutations is surprisingly
54
				slow: at 30 days, the viral population on average is still 46%
55
				identical to its transmitted viral genome. Fitting the model to the
56
				sequence data, we estimate the median in vivo viral mutation rate is
57
				2.5 x 10(-5) mutations per nucleotide per genome replication (range
58
				1.6-6.2 x 10(-5)), about 5-fold lower than previous estimates. To
59
				confirm these results we analyzed the frequency of stop codons (N =
60
				10) among all possible non-sense mutation targets (M = 898,335), and
61
				found a mutation rate of 2.8-3.2 x 10(-5), consistent with the
62
				estimate from the dynamical model. The slow accumulation of
63
				mutations is consistent with slow turnover of infected cells and
64
				replication complexes within infected cells. This slow turnover is
65
				also inferred from the viral load kinetics. Our estimated mutation
66
				rate, which is similar to that of other RNA viruses (e.g., HIV and
67
				influenza), is also compatible with the accumulation of
68
				substitutions seen in HCV at the population level. Our model
69
				identifies the relevant processes (long-lived cells and slow
70
				turnover of replication complexes) and parameters involved in
71
				determining the rate of HCV diversification.</row>
72
			<row name="C1">[Ribeiro, Ruy M.; Korber, Bette T.; Bhattacharya,
73
				Tanmoy; Guedj, Jeremie; Perelson, Alan S.] Los Alamos Natl Lab, Div
74
				Theoret, Los Alamos, NM USA; [Li, Hui; Wang, Shuyi; Stoddard, Mark
75
				B.; Learn, Gerald H.; Parrish, Erica H.; Hahn, Beatrice H.; Shaw,
76
				George M.] Univ Penn, Perelman Sch Med, Philadelphia, PA 19104 USA
77
			</row>
78
			<row name="RP">Ribeiro, RM (reprint author), Univ Lisbon, Fac Med,
79
				Inst Med Mol, Lisbon, Portugal.</row>
80
			<row name="EM">asp@lanl.gov</row>
81
			<row name="RI" />
82
			<row name="FU">U. S. Department of Energy [DE-AC52-06NA25396];
83
				National Center for Research Resources; Office of Research
84
				Infrastructure Programs (ORIP) of the National Institutes of Health
85
				(NIH) [8R01-OD011095-21]; NIH Center for HIV/AIDS Vaccine Immunology
86
				[AI67854]; NIH [AI028433, P20-RR018754, AI45008, AI27767];
87
				University of Pennsylvania Center for AIDS Research; European Union
88
				[PCOFUND-GA-2009-246542]; Foundation for Science and Technology of
89
				Portugal</row>
90
			<row name="FX">Portions of this work were done under the auspices of
91
				the U. S. Department of Energy under contract DE-AC52-06NA25396 and
92
				supported by the National Center for Research Resources and the
93
				Office of Research Infrastructure Programs (ORIP) of the National
94
				Institutes of Health (NIH) through Grant Number 8R01-OD011095-21,
95
				the NIH Center for HIV/AIDS Vaccine Immunology (AI67854) and through
96
				NIH grants AI028433, P20-RR018754, AI45008 and AI27767 and by a
97
				developmental grant from the University of Pennsylvania Center for
98
				AIDS Research. RMR has received partial funding from the European
99
				Union 7th Framework Programme under grant no PCOFUND-GA-2009-246542
100
				and from the Foundation for Science and Technology of Portugal. The
101
				funders had no role in study design, data collection and analysis,
102
				decision to publish, or preparation of the manuscript.</row>
103
			<row name="CR" />
104
			<row name="NR">64</row>
105
			<row name="TC">1</row>
106
			<row name="Z9">1</row>
107
			<row name="PU">PUBLIC LIBRARY SCIENCE</row>
108
			<row name="PI">SAN FRANCISCO</row>
109
			<row name="PA">1160 BATTERY STREET, STE 100, SAN FRANCISCO, CA 94111
110
				USA</row>
111
			<row name="SN">1553-7374</row>
112
			<row name="BN" />
113
			<row name="J9">PLOS PATHOG</row>
114
			<row name="JI">PLoS Pathog.</row>
115
			<row name="PD">AUG</row>
116
			<row name="PY">2012</row>
117
			<row name="VL">8</row>
118
			<row name="IS">8</row>
119
			<row name="PN" />
120
			<row name="SU" />
121
			<row name="SI" />
122
			<row name="MA" />
123
			<row name="BP" />
124
			<row name="EP" />
125
			<row name="AR">e1002881</row>
126
			<row name="DI">10.1371/journal.ppat.1002881</row>
127
			<row name="D2" />
128
			<row name="PG">13</row>
129
			<row name="WC">Microbiology; Parasitology; Virology</row>
130
			<row name="SC">Microbiology; Parasitology; Virology</row>
131
			<row name="GA">002TI</row>
132
			<row isID="true" name="UT">WOS:000308558000053</row>
133
		</csvRecord>
134
	</metadata>
135
</oai:record>
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/main/java/eu/dnetlib/data/objectstore/rmi/ObjectStoreFileNotFoundException.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
/**
4
 * The Class ObjectStoreFileNotFoundException.
5
 */
6
public class ObjectStoreFileNotFoundException extends ObjectStoreServiceException {
7

  
8
	/** The Constant serialVersionUID. */
9
	private static final long serialVersionUID = -5418923557898374219L;
10

  
11
	/**
12
	 * Instantiates a new object store file not found exception.
13
	 *
14
	 * @param string
15
	 *            the string
16
	 * @param exception
17
	 *            the exception
18
	 */
19
	public ObjectStoreFileNotFoundException(final String string) {
20
		super(string);
21

  
22
	}
23

  
24
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/main/java/eu/dnetlib/data/objectstore/rmi/ObjectStoreFile.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
import java.io.Serializable;
4
import java.util.Set;
5

  
6
import com.google.gson.Gson;
7

  
8
/**
9
 * The Class ObjectStoreFile.
10
 */
11
public class ObjectStoreFile implements Serializable {
12

  
13
	/** The Constant serialVersionUID. */
14
	private static final long serialVersionUID = -6501291693572693712L;
15

  
16
	/** The metadata related id. */
17
	private String metadataRelatedID;
18

  
19
	/** The object id. */
20
	private String objectID;
21

  
22
	/** The mime type. */
23
	private String mimeType;
24

  
25
	/** The access protocol. */
26
	private Protocols accessProtocol;
27

  
28
	/** The object uri . */
29
	private String URI;
30

  
31
	/** The username auth. */
32
	private String usernameAuth;
33

  
34
	/** The password auth. */
35
	private String passwordAuth;
36

  
37
	/** The downloaded url. */
38
	private String downloadedURL;
39

  
40
	/** The md5 sum of the file. */
41
	private String md5Sum;
42

  
43
	/** The file size. */
44
	private long fileSizeKB;
45

  
46
	/** The tags. */
47
	private Set<String> tags;
48

  
49
	/**
50
	 * Gets the downloaded url.
51
	 *
52
	 * @return the downloaded url
53
	 */
54
	public String getDownloadedURL() {
55
		return downloadedURL;
56
	}
57

  
58
	/**
59
	 * Sets the downloaded url.
60
	 *
61
	 * @param downloadedURL
62
	 *            the new downloaded url
63
	 */
64
	public void setDownloadedURL(final String downloadedURL) {
65
		this.downloadedURL = downloadedURL.replace("\\u003d", "=").replace("\\u0026", "&");;
66
	}
67

  
68
	/**
69
	 * Instantiates a new object store file.
70
	 */
71
	public ObjectStoreFile() {
72
		this.accessProtocol = Protocols.None;
73

  
74
	}
75

  
76
	/**
77
	 * Return a new instance of the object from a json String.
78
	 *
79
	 * @param jsonObject
80
	 *            the json object
81
	 * @return the object store file
82
	 */
83
	public static ObjectStoreFile createObject(final String jsonObject) {
84
		Gson g = new Gson();
85
		return g.fromJson(jsonObject, ObjectStoreFile.class);
86
	}
87

  
88
	/**
89
	 * Gets the object id.
90
	 *
91
	 * @return the object id
92
	 */
93
	public String getObjectID() {
94
		return objectID;
95
	}
96

  
97
	/**
98
	 * Sets the object id.
99
	 *
100
	 * @param objectID
101
	 *            the new object id
102
	 */
103
	public void setObjectID(final String objectID) {
104
		this.objectID = objectID;
105
	}
106

  
107
	/**
108
	 * Gets the mime type.
109
	 *
110
	 * @return the mime type
111
	 */
112
	public String getMimeType() {
113
		return mimeType;
114
	}
115

  
116
	/**
117
	 * Sets the mime type.
118
	 *
119
	 * @param mimeType
120
	 *            the new mime type
121
	 */
122
	public void setMimeType(final String mimeType) {
123
		this.mimeType = mimeType;
124
	}
125

  
126
	/**
127
	 * Gets the access protocol.
128
	 *
129
	 * @return the access protocol
130
	 */
131
	public Protocols getAccessProtocol() {
132
		return accessProtocol;
133
	}
134

  
135
	/**
136
	 * Sets the access protocol.
137
	 *
138
	 * @param accessProtocol
139
	 *            the new access protocol
140
	 */
141
	public void setAccessProtocol(final Protocols accessProtocol) {
142
		this.accessProtocol = accessProtocol;
143
	}
144

  
145
	/**
146
	 * Gets the username auth.
147
	 *
148
	 * @return the username auth
149
	 */
150
	public String getUsernameAuth() {
151
		return usernameAuth;
152
	}
153

  
154
	/**
155
	 * Sets the username auth.
156
	 *
157
	 * @param usernameAuth
158
	 *            the new username auth
159
	 */
160
	public void setUsernameAuth(final String usernameAuth) {
161
		this.usernameAuth = usernameAuth;
162
	}
163

  
164
	/**
165
	 * Gets the password auth.
166
	 *
167
	 * @return the password auth
168
	 */
169
	public String getPasswordAuth() {
170
		return passwordAuth;
171
	}
172

  
173
	/**
174
	 * Sets the password auth.
175
	 *
176
	 * @param passwordAuth
177
	 *            the new password auth
178
	 */
179
	public void setPasswordAuth(final String passwordAuth) {
180
		this.passwordAuth = passwordAuth;
181
	}
182

  
183
	/**
184
	 * Gets the uri.
185
	 *
186
	 * @return the uri
187
	 */
188
	public String getURI() {
189
		return URI.replace("\\u003d", "=").replace("\\u0026", "&");
190
	}
191

  
192
	/**
193
	 * Sets the uri.
194
	 *
195
	 * @param uRI
196
	 *            the new uri
197
	 */
198
	public void setURI(final String uRI) {
199

  
200
		URI = uRI.replace("\\u003d", "=").replace("\\u0026", "&");
201
	}
202

  
203
	/**
204
	 * Convert the object into a json String.
205
	 *
206
	 * @return the string
207
	 */
208
	public String toJSON() {
209
		Gson g = new Gson();
210
		return g.toJson(this).replace("\\u003d", "=").replace("\\u0026", "&");
211
	}
212

  
213
	/**
214
	 * Gets the related metadata id.
215
	 *
216
	 * @return the related metadata id.
217
	 */
218
	public String getMetadataRelatedID() {
219
		return metadataRelatedID;
220
	}
221

  
222
	/**
223
	 * Sets the related metadata id.
224
	 *
225
	 * @param metadataRelatedID
226
	 *            the related metadata id.
227
	 */
228
	public void setMetadataRelatedID(final String metadataRelatedID) {
229
		this.metadataRelatedID = metadataRelatedID;
230
	}
231

  
232
	/**
233
	 * @return the md5Sum
234
	 */
235
	public String getMd5Sum() {
236
		return md5Sum;
237
	}
238

  
239
	/**
240
	 * @param md5Sum
241
	 *            the md5Sum to set
242
	 */
243
	public void setMd5Sum(final String md5Sum) {
244
		this.md5Sum = md5Sum;
245
	}
246

  
247
	/**
248
	 * @return the fileSizeKB
249
	 */
250
	public long getFileSizeKB() {
251
		return fileSizeKB;
252
	}
253

  
254
	/**
255
	 * @param fileSizeKB
256
	 *            the fileSizeKB to set
257
	 */
258
	public void setFileSizeKB(final long fileSizeKB) {
259
		this.fileSizeKB = fileSizeKB;
260
	}
261

  
262
	/**
263
	 * @return the tags
264
	 */
265
	public Set<String> getTags() {
266
		return tags;
267
	}
268

  
269
	/**
270
	 * @param tags the tags to set
271
	 */
272
	public void setTags(Set<String> tags) {
273
		this.tags = tags;
274
	}
275

  
276
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/main/java/eu/dnetlib/data/objectstore/rmi/ObjectStoreServiceException.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
import eu.dnetlib.common.rmi.RMIException;
4

  
5
/**
6
 * The Class ObjectStoreServiceException.
7
 */
8
public class ObjectStoreServiceException extends RMIException {
9

  
10
	/** The Constant serialVersionUID. */
11
	private static final long serialVersionUID = -7073846285219543315L;
12

  
13
	/**
14
	 * Instantiates a new object store service exception.
15
	 *
16
	 * @param string
17
	 *            the string
18
	 */
19
	public ObjectStoreServiceException(final String string) {
20
		super(string);
21
	}
22

  
23
	/**
24
	 * Instantiates a new object store service exception.
25
	 *
26
	 * @param string
27
	 *            the string
28
	 * @param exception
29
	 *            the exception
30
	 */
31
	public ObjectStoreServiceException(final String string, final Throwable exception) {
32
		super(string, exception);
33
	}
34

  
35
	/**
36
	 * Instantiates a new object store service exception.
37
	 *
38
	 * @param exception
39
	 *            the exception
40
	 */
41
	public ObjectStoreServiceException(final Throwable exception) {
42
		super(exception);
43
	}
44

  
45
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/main/java/eu/dnetlib/data/objectstore/rmi/ObjectStoreService.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
import java.util.List;
4

  
5
import javax.jws.WebMethod;
6
import javax.jws.WebParam;
7
import javax.jws.WebService;
8
import javax.xml.ws.wsaddressing.W3CEndpointReference;
9

  
10
import eu.dnetlib.common.rmi.BaseService;
11

  
12
// TODO: Auto-generated Javadoc
13
/**
14
 * Main ObjectStore Service interface.
15
 *
16
 * @author <a href="mailto:sandro.labruzzo at isti.cnr.it">Sandro La Bruzzo</a>
17
 * @version 0.0.1
18
 */
19
@WebService(targetNamespace = "http://services.dnetlib.eu/")
20
public interface ObjectStoreService extends BaseService {
21

  
22
	/**
23
	 * Returns ResultSet EPR for delivered ObjectStore records in a particular range date.
24
	 * <p>
25
	 * Please check service implementations for details on the expected format of the records in the result set epr.
26
	 * </p>
27
	 * <p>
28
	 * This method could be used for a bulk deliver of all objects in the store
29
	 * </p>
30
	 *
31
	 * @param obsId
32
	 *            identifier of the ObjectStore
33
	 * @param from
34
	 *            the minimum date of the object
35
	 * @param until
36
	 *            the maximum date of the object
37
	 * @return a ResultSet EPR. Each element of the result set contains the objIdentifier of a record and its URL for retrieve the
38
	 *         inputstream of the file.
39
	 * @throws ObjectStoreServiceException
40
	 *             the object store service exception
41
	 */
42
	@WebMethod(operationName = "deliverObjects", action = "deliverObjects")
43
	public W3CEndpointReference deliverObjects(@WebParam(name = "obsId") String obsId, @WebParam(name = "from") Long from, @WebParam(name = "until") Long until)
44
			throws ObjectStoreServiceException;
45

  
46
	/**
47
	 * Returns ResultSet EPR for delivered ObjectStore records.
48
	 * <p>
49
	 * Please check service implementations for details on the expected format of the records in the result set epr.
50
	 * </p>
51
	 *
52
	 * @param obsId
53
	 *            identifier of the ObjectStore
54
	 * @param eprId
55
	 *            id of a ResultSet EPR with the identifiers of the interesting objects. Each element of the result set contains the
56
	 *            objIdentifier of a record
57
	 * @return a ResultSet EPR. Each element of the result set contains the objIdentifier of a record and its URL for retrieve the
58
	 *         inputstream of the file.
59
	 * @throws ObjectStoreServiceException
60
	 *             the object store service exception
61
	 */
62
	@WebMethod(operationName = "deliverObjectsByIds", action = "deliverObjectsByIds")
63
	public W3CEndpointReference deliverObjectsByIds(@WebParam(name = "obsId") String obsId, @WebParam(name = "eprId") W3CEndpointReference eprId)
64
			throws ObjectStoreServiceException;
65

  
66
	/**
67
	 * deliver records with a specified tag.
68
	 *
69
	 * @param obsId
70
	 *            identifier of the ObjectStore
71
	 * @param tags
72
	 *            the tags
73
	 * @return the URL for retrieve the record
74
	 * @throws ObjectStoreServiceException
75
	 *             the object store service exception
76
	 */
77
	@WebMethod(operationName = "deliverRecordsByTag", action = "deliverRecordsByTag")
78
	public W3CEndpointReference deliverRecordsByTag(@WebParam(name = "obsId") String obsId, @WebParam(name = "tags") List<String> tags)
79
			throws ObjectStoreServiceException;
80

  
81
	/**
82
	 * Returns an URL to retrieve the ObjectStore record.
83
	 *
84
	 * @param obsId
85
	 *            identifier of the ObjectStore
86
	 * @param objectId
87
	 *            the id of the object
88
	 * @return the URL for retrieve the record
89
	 * @throws ObjectStoreServiceException
90
	 *             the object store service exception
91
	 */
92
	@WebMethod(operationName = "deliverRecord", action = "deliverRecord")
93
	public String deliverRecord(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectId") String objectId) throws ObjectStoreServiceException;
94

  
95
	/**
96
	 * Feed the object in the objectStore.
97
	 *
98
	 * @param obsId
99
	 *            identifier of the ObjectStore
100
	 * @param objectMetadata
101
	 *            the String serialized of the JSON object ObjectStoreFile
102
	 * @throws ObjectStoreServiceException
103
	 *             the object store service exception
104
	 */
105

  
106
	@WebMethod(operationName = "feedObject", action = "feedObject")
107
	public void feedObject(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectMetadata") String objectMetadata) throws ObjectStoreServiceException;
108

  
109
	/**
110
	 * Returns list of all stored indices.
111
	 *
112
	 * @return list of all stored indices
113
	 */
114
	@WebMethod(operationName = "getListOfObjectStores", action = "getListOfObjectStores")
115
	public List<String> getListOfObjectStores();
116

  
117
	/**
118
	 * Gets the size of the objectStore ID.
119
	 *
120
	 * @param obsId
121
	 *            the obs id
122
	 * @return the size
123
	 * @throws ObjectStoreServiceException
124
	 *             the object store service exception
125
	 */
126
	@WebMethod(operationName = "getSize", action = "getSize")
127
	public int getSize(@WebParam(name = "obsId") String obsId) throws ObjectStoreServiceException;
128

  
129
	/**
130
	 * Tag a set of of object with a particular tag.
131
	 *
132
	 * @param objectStoreId
133
	 *            the object store id
134
	 * @param eprId
135
	 *            the epr id
136
	 * @param tag
137
	 *            the tag
138
	 * @return the int
139
	 */
140
	@WebMethod(operationName = "tagIds", action = "tagIds")
141
	public int tagIds(@WebParam(name = "objectStoreId") String objectStoreId,
142
			@WebParam(name = "eprId") W3CEndpointReference eprId,
143
			@WebParam(name = "tag") String tag);
144

  
145
	/**
146
	 * Tag ids by a list of identifiers.
147
	 *
148
	 * @param objectStoreId
149
	 *            the object store id
150
	 * @param ids
151
	 *            the ids
152
	 * @param tag
153
	 *            the tag
154
	 * @return the int
155
	 */
156
	@WebMethod(operationName = "tagIdsByList", action = "tagIds")
157
	public int tagIdsByList(@WebParam(name = "objectStoreId") String objectStoreId,
158
			@WebParam(name = "ids") List<String> ids,
159
			@WebParam(name = "tag") String tag);
160

  
161
	/**
162
	 * UnTag a set of of object with a particular tag.
163
	 *
164
	 * @param objectStoreId
165
	 *            the object store id
166
	 * @param eprId
167
	 *            the epr id
168
	 * @param tag
169
	 *            the tag
170
	 * @return the int
171
	 */
172
	@WebMethod(operationName = "untagIds", action = "untagIds")
173
	public int untagIds(@WebParam(name = "objectStoreId") String objectStoreId,
174
			@WebParam(name = "eprId") W3CEndpointReference eprId,
175
			@WebParam(name = "tag") String tag);
176

  
177
	/**
178
	 * Untag ids by a list of identifiers.
179
	 *
180
	 * @param objectStoreId
181
	 *            the object store id
182
	 * @param ids
183
	 *            the ids
184
	 * @param tag
185
	 *            the tag
186
	 * @return the int
187
	 */
188
	@WebMethod(operationName = "untagIdsByList", action = "tagIds")
189
	public int untagIdsByList(@WebParam(name = "objectStoreId") String objectStoreId,
190
			@WebParam(name = "ids") List<String> ids,
191
			@WebParam(name = "tag") String tag);
192

  
193
	/**
194
	 * Tag all record of the objectstore with a particular tag.
195
	 *
196
	 * @param objectStoreId
197
	 *            the object store id
198
	 * @param tag
199
	 *            the tag
200
	 * @return the int
201
	 */
202
	@WebMethod(operationName = "tagObjectstore", action = "tagObjectstore")
203
	public int tagObjectstore(@WebParam(name = "objectStoreId") String objectStoreId, @WebParam(name = "tag") String tag);
204

  
205
	/**
206
	 * UnTag all record of the objectstore with a particular tag.
207
	 *
208
	 * @param objectStoreId
209
	 *            the object store id
210
	 * @param tag
211
	 *            the tag
212
	 * @return the int
213
	 */
214
	@WebMethod(operationName = "untagObjectstore", action = "untagObjectstore")
215
	public int untagObjectstore(@WebParam(name = "objectStoreId") String objectStoreId, @WebParam(name = "tag") String tag);
216

  
217
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/main/java/eu/dnetlib/data/objectstore/rmi/Protocols.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
/**
4
  * The Enum Protocols.
5
  */
6
 public enum Protocols {
7
	 None,
8
	 HTTP, 
9
	 HTTPS,
10
	 FTP,
11
	 File_System,
12
	 FTPS
13
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/main/java/eu/dnetlib/data/objectstore/rmi/MetadataObjectRecord.java
1
package eu.dnetlib.data.objectstore.rmi;
2

  
3
import java.io.Serializable;
4

  
5
import com.google.gson.Gson;
6

  
7
public class MetadataObjectRecord implements Serializable {
8

  
9
	/** The Constant serialVersionUID. */
10
	private static final long serialVersionUID = -5640196854633924754L;
11

  
12
	public static MetadataObjectRecord initFromJson(final String input) {
13
		return new Gson().fromJson(input, MetadataObjectRecord.class);
14
	}
15

  
16
	public MetadataObjectRecord() {
17

  
18
	}
19

  
20
	public MetadataObjectRecord(final String id, final String record, final String mime) {
21
		super();
22
		this.id = id;
23
		this.record = record;
24
		this.mime = mime;
25
	}
26

  
27
	private String id;
28

  
29
	private String record;
30

  
31
	private String mime;
32

  
33
	public String getId() {
34
		return id;
35
	}
36

  
37
	public String getRecord() {
38
		return record;
39
	}
40

  
41
	public void setId(final String id) {
42
		this.id = id;
43
	}
44

  
45
	public void setRecord(final String record) {
46
		this.record = record;
47
	}
48

  
49
	public String toJSON() {
50
		return new Gson().toJson(this);
51
	}
52

  
53
	public String getMime() {
54
		return mime;
55
	}
56

  
57
	public void setMime(final String mime) {
58
		this.mime = mime;
59
	}
60

  
61
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/css/dnet-doc.css
1
* {
2
	font-size: inherit;
3
	font-family: inherit;
4
}
5

  
6
@font-face {
7
  font-family: Helvetica Neue;
8
  src: url("Porcospino.eot");
9
  src: local("Helvetica Neue Light"), local("HelveticaNeue-Light"), url("Porcospino.woff") format("woff"), url("Porcospino.ttf") format("truetype"), url("Porcospino.svg#HelveticaNeue-Light") format("svg");
10
}
11

  
12

  
13
body {
14
    height: 100%;
15
	margin: 40px;
16
	background-color: #f3f1e5;
17

  
18
  font: 300 100.01%/1.5 "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; 
19

  
20
 	font-size: 16px;
21
  color:  	#333;
22
}
23

  
24

  
25
h1 {
26
	margin-top: 35px;
27
	font-size: 38px;
28
  padding:0;
29
}
30

  
31
h1.title {
32
	font-size: 52px;
33
  margin-bottom: 0;
34
}
35

  
36

  
37
h2 {
38
	margin-top: 35px;
39
	font-size: 28px;
40
  border-bottom: 1px solid #666;
41
}
42
h3 {
43
	margin-top: 35px;
44
	font-size: 20px;
45
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
46
  font-weight: 200;
47
}
48

  
49
h4 {
50
	margin-top: 35px;
51
	font-size: 18px;
52
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
53
  font-weight: 200;
54
}
55

  
56
code, pre, span.command {
57
	font-family:'andale mono','lucida console', monospace;
58
	font-size:1em;
59
}
60

  
61
table {
62
	border-collapse: collapse;
63
}
64

  
65
table th {
66
	background-color: #3E6B99;
67
	color: white;
68
	padding: 4px
69
}
70

  
71
table td {
72
	padding: 4px;
73
}
74

  
75

  
76
a { 
77
  color:#3E6B99; 
78
	font-weight:bold;
79
	text-decoration:none;
80
  font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
81
  
82
}
83

  
84
a:visited { 
85
	color:#3E6B99;
86
}
87

  
88
a:hover { 
89
	color:#5184B9;
90
}
91

  
92

  
93
span.command {
94
	white-space:nowrap;
95
}
96

  
97
pre.programlisting {
98
	background-color: #FFFFDD;
99
	border: 1px solid #DDDD00;
100
	padding: 10px;
101
}
102

  
103

  
104
.authorgroup {
105
  font-size: 80%;
106
  margin-top: 24px;
107
    margin-left: 64px;
108
}
109

  
110
.authorgroup h3 {
111
  margin-bottom: 4px;
112
}
113

  
114
.author {
115
  margin: 0;
116
  margin-bottom: 4px;
117
 }
118

  
119
.affiliation {
120
  margin-top: 2px;
121
 }
122

  
123
.code, .screen {
124
  white-space: pre-line;
125
  margin: 12px;
126
  display: block;
127
  margin-right: 8px;
128
  margin-left: 8px;
129
  padding: 8px;
130
  width: 100%;
131
  
132
 }
133

  
134

  
135

  
136

  
137
.code, .screen, .note, .programlisting {
138
  border: 1px solid #FFFFFF;
139

  
140
  -moz-border-radius: 8px;
141
  -webkit-border-radius: 8px;
142
  -khtml-border-radius: 8px;
143
  border-radius: 8px;
144

  
145
 -moz-box-shadow: 3px 3px 5px #DFDFDF;
146
  -webkit-box-shadow: 3px 3px 5px #DFDFDF;
147
  -khtml-box-shadow: 3px 3px 5px #DFDFDF;
148
  -o-box-shadow: 3px 3px 5px #DFDFDF;
149
  box-shadow: 3px 3px 5px #DFDFDF;
150

  
151
  -moz-box-shadow: 2px 2px 4px #666;
152
  -webkit-box-shadow: 2px 2px 4px #666;
153
  box-shadow: 2px 2px 4px #666;
154

  
155
 }
156

  
157
.code {  background-color: #777777; }
158
.screen {  background-color: #fff8e3;  }
159
.note {  background-color: #fff8e3; margin-top: 24px; padding: 8px; padding-top: 0px; padding-bottom: 0px;}
160
.note p { margin-left: 16px; margin-top: 4px; }
161
.note h3 { margin-top: 8px; margin-bottom: 8px;}
162

  
163
.note .screen, .code { 
164
  width: auto;
165
}
166
.note .screen { 
167
  background-color: #fff7d3; 
168
 }
169

  
170
.prompt { 
171
-webkit-user-select:none;
172
-moz-user-select:-moz-none;
173
user-select: none;
174
 }
175

  
176
video 
177
{
178
  /*width: 400px; */
179
  height: 300px;
180

  
181
 -moz-box-shadow: 3px 3px 5px #444;
182
  -webkit-box-shadow: 3px 3px 5px #444;
183
  -khtml-box-shadow: 3px 3px 5px #444;
184
  -o-box-shadow: 3px 3px 5px #444;
185
  box-shadow: 3px 3px 5px #444;
186

  
187
  }
188

  
189
video.active
190
{ 
191
  position: fixed;
192
  margin-left: auto;
193
  margin-right: auto;
194
  top: 40px;
195
  left: 0;
196
  right: 0;
197
  bottom: 0;
198
    /*width: 90%; */
199
    height: 90%; 
200
  z-index: 7;
201
}
202

  
203
#videonav 
204
{ 
205
  position: fixed;
206
  top: 0;
207
  left: 0;
208
  display: none;
209
  z-index: 10;
210
}
211

  
212
#overlay 
213
{
214
position: fixed;
215
display: none;
216
opacity: 0.5;
217
  top: 0;
218
  left: 0;
219
background-color: black;
220
width: 100%; 
221
height: 100%; 
222
  z-index: 5;
223
 }
224

  
225

  
226
.set {
227
  margin-left: 160px;
228
  margin-right: 100px;
229
 }
230

  
231
h1,h2,h3,h4 {
232
  margin-left: -40px;
233
}
234

  
235
div.note h3 {
236
  margin-left: inherit;
237
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/css/style.css
1
/*
2
 * Copyright (c) 2001, 2003, 2010 The FreeBSD Documentation Project
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 *
14
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
 * SUCH DAMAGE.
25
 *
26
 * $FreeBSD: doc/share/misc/docbook.css,v 1.21 2012/01/25 22:16:36 wblock Exp $
27
 */
28

  
29
BODY ADDRESS {
30
	line-height: 1.3;
31
	margin: .6em 0;
32
}
33

  
34
BODY BLOCKQUOTE {
35
	margin-top: .75em;
36
	line-height: 1.3;
37
	margin-bottom: .75em;
38
}
39

  
40
HTML BODY {
41
	margin: 1em 8% 1em 10%;
42
	line-height: 1.2;
43
}
44

  
45
.LEGALNOTICE {
46
	font-size: small;
47
	font-variant: small-caps;
48
}
49

  
50
BODY DIV {
51
	margin: 0;
52
}
53

  
54
DL {
55
	margin: .8em 0;
56
	line-height: 1.2;
57
}
58

  
59
DIV.CALLOUTLIST DT {
60
	float: left;
61
	width: 1em;
62
}
63

  
64
DIV.CALLOUTLIST DD {
65
	clear: right;
66
	margin-bottom: 1ex;
67
}
68

  
69
BODY FORM {
70
	margin: .6em 0;
71
}
72

  
73
H1, H2, H3, H4, H5, H6,
74
DIV.EXAMPLE P B,
75
.QUESTION,
76
DIV.TABLE P B,
77
DIV.PROCEDURE P B {
78
	color: #990000;
79
}
80

  
81
BODY H1, BODY H2, BODY H3, BODY H4, BODY H5, BODY H6 {
82
	line-height: 1.3;
83
	margin-left: 0;
84
}
85

  
86
BODY H1, BODY H2 {
87
	margin: .8em 0 0 -4%;
88
}
89

  
90
BODY H3, BODY H4 {
91
	margin: .8em 0 0 -3%;
92
}
93

  
94
BODY H5 {
95
	margin: .8em 0 0 -2%;
96
}
97

  
98
BODY H6 {
99
	margin: .8em 0 0 -1%;
100
}
101

  
102
BODY HR {
103
	margin: .6em;
104
	border-width: 0 0 1px 0;
105
	border-style: solid;
106
	border-color: #cecece;
107
}
108

  
109
BODY IMG.NAVHEADER {
110
	margin: 0 0 0 -4%;
111
}
112

  
113
OL {
114
	margin: 0 0 0 5%;
115
	line-height: 1.2;
116
}
117

  
118
BODY PRE {
119
	margin: .75em 0;
120
	line-height: 1.0;
121
	font-family: monospace;
122
}
123

  
124
BODY TD, BODY TH {
125
	line-height: 1.2;
126
}
127

  
128
UL, BODY DIR, BODY MENU {
129
	margin: 0 0 0 5%;
130
	line-height: 1.2;
131
}
132

  
133
HTML {
134
	margin: 0;
135
	padding: 0;
136
}
137

  
138
BODY P B.APPLICATION {
139
	color: #000000;
140
}
141

  
142
.FILENAME {
143
	color: #007a00;
144
}
145

  
146
SVNREF {
147
	color: #007a00;
148
}
149

  
150
.GUIMENU, .GUIMENUITEM, .GUISUBMENU,
151
.GUILABEL, .INTERFACE,
152
.SHORTCUT, .SHORTCUT .KEYCAP {
153
	font-weight: bold;
154
}
155

  
156
.GUIBUTTON {
157
	background-color: #CFCFCF;
158
	padding: 2px;
159
}
160

  
161
.ACCEL {
162
	background-color: #F0F0F0;
163
	text-decoration: underline;
164
}
165

  
166
.SCREEN {
167
	padding: 1ex;
168
}
169

  
170
.PROGRAMLISTING {
171
	padding: 1ex;
172
	background-color: #eee;
173
	border: 1px solid #ccc;
174
	line-height: 1.1;
175
}
176

  
177
@media screen {  /* hide from IE3 */
178
	a[href]:hover { background: #ffa }
179
}
180

  
181
.INFORMALTABLE, .TABLE TH {
182
	padding-left: 02.em;
183
	text-align: left;
184
}
185

  
186
BLOCKQUOTE, .EXAMPLE, .PROGRAMLISTING {
187
	-moz-border-radius: 6px;
188
	-webkit-border-radius: 6px;
189
	-khtml-border-radius: 6px;
190
	border-radius: 6px;
191
}
192

  
193
BLOCKQUOTE {
194
	padding: 0 2ex;
195
}
196

  
197
BLOCKQUOTE.NOTE {
198
	color: #222;
199
	background: #eee;
200
	border: 1px solid #ccc;
201
	width: 85%;
202
}
203

  
204
BLOCKQUOTE.TIP {
205
	color: #004F00;
206
	background: #d8ecd6;
207
	border: 1px solid green;
208
	width: 85%;
209
}
210

  
211
BLOCKQUOTE.IMPORTANT {
212
	font-style:italic;
213
	border: 1px solid #a00;
214
	border-left: 12px solid #c00;
215
}
216

  
217
BLOCKQUOTE.WARNING {
218
	color: #9F1313;
219
	background: #f8e8e8;
220
	border: 1px solid #e59595;
221
	width: 85%;
222
}
223

  
224
BLOCKQUOTE.CAUTION {
225
	color: #3E3535;
226
	background: #FFC;
227
	border: 1px solid #e59595;
228
	width: 85%;
229
}
230

  
231
.EXAMPLE {
232
	background: #fefde6;
233
	border: 1px solid #f1bb16;
234
	margin: 1em 0;
235
	padding: 0.2em 2em;
236
	width: 90%;
237
}
238

  
239
.INFORMALTABLE TABLE.CALSTABLE TR TD {
240
        padding-left: 1em;
241
        padding-right: 1em;
242
}
modules/dnet-objectstore-rmi/tags/dnet-objectstore-rmi-2.0.5-TAG/src/docbkx/docbook.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?xml-model href="http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
3
<?xml-model href="http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
4
<book xmlns="http://docbook.org/ns/docbook"
5
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
6
    <info>
7
        <title>DNet Object Store Module</title>
8
        <author>
9
            <orgname>ISTI CNR</orgname>
10
            <email>sandro.labruzzo@isti.cnr.it</email>
11
        </author>
12
    </info>
13
    <part>
14
        <title>ObjectStore API</title>
15
        
16
        <chapter>
17
            <title>Introduction</title>            
18
            <sect1>
19
                <title>What is an Object Store</title>                
20
                <para>Object Store Service is a DNet service that provides functions for perstistent
21
                    storage of files, and provides a REST API for fetching them back. </para>
22
                <para>It is composed by three different sub-modules:</para>
23
                <para>
24
                    <itemizedlist>
25
                        <listitem>
26
                            <para><link
27
                                    xlink:href="https://svn.driver.research-infrastructures.eu/driver/dnet11/modules/dnet-objectstore-rmi/trunk/"
28
                                    >dnet-objectstore -rmi</link>: it contains the interface of the
29
                                Object Store Service and includes some utility classes defining
30
                                metadata information for each file (i.e., ObjectStoreFile). These
31
                                metadata allow the Object Store Service to store and fetch the
32
                                associated files in a consistent way.</para>
33
                        </listitem>
34
                        <listitem>
35
                            <para><link
36
                                    xlink:href="https://svn.driver.research-infrastructures.eu/driver/dnet11/modules/dnet-modular-objectstore-service/trunk/"
37
                                    >dnet-modular-objectstore-service</link>: it contains the high
38
                                level implementation of the service. It manages blackboard messages,
39
                                the creation of profiles in dnet, and defines the REST API.</para>
40
                        </listitem>
41
                        <listitem>
42
                            <para><link
43
                                    xlink:href="https://svn.driver.research-infrastructures.eu/driver/dnet11/modules/dnet-gridfs-objectstore/trunks/"
44
                                    >dnet-gridfs-objectstore</link>: low level implementation for
45
                                storing and retreiving files using mongo GRIDFS. </para>
46
                        </listitem>
47
                    </itemizedlist>
48
                </para>
49
            </sect1>
50
            <sect1>
51
                <title>The ObjectStoreFile Metadata</title>
52
                <para>To enable the object store to store a file, it is necessary give some
53
                    information about it such as:<itemizedlist>
54
                        <listitem>
55
                            <para>ObjectID (Required to identify the file)</para>
56
                        </listitem>
57
                        <listitem>
58
                            <para>Mime type</para>
59
                        </listitem>
60
                        <listitem>
61
                            <para>Access protocol (required). At the moment the only protocols
62
                                available are: http, ftp, file system.</para>
63
                        </listitem>
64
                        <listitem>
65
                            <para>URI (required)</para>
66
                        </listitem>
67
                        <listitem>
68
                            <para>username, password for connection (optional, if needed).</para>
69
                        </listitem>
70
                    </itemizedlist></para>
71
            </sect1>
72
        </chapter>
73
        <chapter>
74
            <title>Feeding Object Store</title>
75
            <sect1>
76
                <title></title>
77
                <para>Feeding Object Store Service can be done in two different ways:</para>
78
                <para><itemizedlist>
79
                        <listitem>
80
                            <para>Feed of a single file: performed by invoking the following web
81
                                service method
82
                                <programlisting>feedObject( String obsId, String objectMetadata)</programlisting>where
83
                                objectMetadata is a JSON serialization of an ObjectStoreFile
84
                                instance defined in the objectStore-RMI.</para>
85
                        </listitem>
86
                        <listitem>
87
                            <para>Feed of multiple files in bulk: performed via blackboard message
88
                                on the profile of the Object Store Service. The blackboard message
89
                                has to specify an EPR of ObjectStoreFile result set and the targeted
90
                                the ObjectstoreID.</para>
91
                        </listitem>
92
                    </itemizedlist> Please find two example of feeding techniques below.</para>
93
            </sect1>
94
            <sect1>
95
                <title>Feeding of single object</title>
96
                <para>The code below shows how to upload a single file into an objectStore</para>
97
                <para>
98
                    <programlisting>
99
 private void feedTest(ServiceLocator &lt;ObjectStoreService> ObjectStoreServicelocator,
100
			String objectStoreID) throws ObjectStoreServiceException {
101
		
102
        //Get a reference of the Service       
103
        ObjectStoreService obsService = ObjectStoreServicelocator.getService();
104
        
105
        //Create the FILE
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff