Revision 31796
Added by Sandro La Bruzzo almost 10 years ago
modules/dnet-objectstore-rmi/tags/2.0.0/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/2.0.0/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/2.0.0/src/main/java/eu/dnetlib/data/objectstore/rmi/ObjectStoreFile.java | ||
---|---|---|
1 |
package eu.dnetlib.data.objectstore.rmi; |
|
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
|
|
5 |
import com.google.gson.Gson; |
|
6 |
|
|
7 |
/** |
|
8 |
* The Class ObjectStoreFile. |
|
9 |
*/ |
|
10 |
public class ObjectStoreFile implements Serializable { |
|
11 |
|
|
12 |
/** The Constant serialVersionUID. */ |
|
13 |
private static final long serialVersionUID = -6501291693572693712L; |
|
14 |
|
|
15 |
/** The metadata related id. */ |
|
16 |
private String metadataRelatedID; |
|
17 |
|
|
18 |
/** The object id. */ |
|
19 |
private String objectID; |
|
20 |
|
|
21 |
/** The mime type. */ |
|
22 |
private String mimeType; |
|
23 |
|
|
24 |
/** The access protocol. */ |
|
25 |
private Protocols accessProtocol; |
|
26 |
|
|
27 |
/** The object uri . */ |
|
28 |
private String URI; |
|
29 |
|
|
30 |
/** The username auth. */ |
|
31 |
private String usernameAuth; |
|
32 |
|
|
33 |
/** The password auth. */ |
|
34 |
private String passwordAuth; |
|
35 |
|
|
36 |
/** The downloaded url. */ |
|
37 |
private String downloadedURL; |
|
38 |
|
|
39 |
/** The md5 sum of the file. */ |
|
40 |
private String md5Sum; |
|
41 |
|
|
42 |
/** The file size. */ |
|
43 |
private long fileSizeKB; |
|
44 |
|
|
45 |
/** |
|
46 |
* Gets the downloaded url. |
|
47 |
* |
|
48 |
* @return the downloaded url |
|
49 |
*/ |
|
50 |
public String getDownloadedURL() { |
|
51 |
return downloadedURL; |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 |
* Sets the downloaded url. |
|
56 |
* |
|
57 |
* @param downloadedURL |
|
58 |
* the new downloaded url |
|
59 |
*/ |
|
60 |
public void setDownloadedURL(final String downloadedURL) { |
|
61 |
this.downloadedURL = downloadedURL.replace("\\u003d", "=").replace("\\u0026", "&");; |
|
62 |
} |
|
63 |
|
|
64 |
/** |
|
65 |
* Instantiates a new object store file. |
|
66 |
*/ |
|
67 |
public ObjectStoreFile() { |
|
68 |
this.accessProtocol = Protocols.None; |
|
69 |
|
|
70 |
} |
|
71 |
|
|
72 |
/** |
|
73 |
* Return a new instance of the object from a json String. |
|
74 |
* |
|
75 |
* @param jsonObject |
|
76 |
* the json object |
|
77 |
* @return the object store file |
|
78 |
*/ |
|
79 |
public static ObjectStoreFile createObject(final String jsonObject) { |
|
80 |
Gson g = new Gson(); |
|
81 |
return g.fromJson(jsonObject, ObjectStoreFile.class); |
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* Gets the object id. |
|
86 |
* |
|
87 |
* @return the object id |
|
88 |
*/ |
|
89 |
public String getObjectID() { |
|
90 |
return objectID; |
|
91 |
} |
|
92 |
|
|
93 |
/** |
|
94 |
* Sets the object id. |
|
95 |
* |
|
96 |
* @param objectID |
|
97 |
* the new object id |
|
98 |
*/ |
|
99 |
public void setObjectID(final String objectID) { |
|
100 |
this.objectID = objectID; |
|
101 |
} |
|
102 |
|
|
103 |
/** |
|
104 |
* Gets the mime type. |
|
105 |
* |
|
106 |
* @return the mime type |
|
107 |
*/ |
|
108 |
public String getMimeType() { |
|
109 |
return mimeType; |
|
110 |
} |
|
111 |
|
|
112 |
/** |
|
113 |
* Sets the mime type. |
|
114 |
* |
|
115 |
* @param mimeType |
|
116 |
* the new mime type |
|
117 |
*/ |
|
118 |
public void setMimeType(final String mimeType) { |
|
119 |
this.mimeType = mimeType; |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* Gets the access protocol. |
|
124 |
* |
|
125 |
* @return the access protocol |
|
126 |
*/ |
|
127 |
public Protocols getAccessProtocol() { |
|
128 |
return accessProtocol; |
|
129 |
} |
|
130 |
|
|
131 |
/** |
|
132 |
* Sets the access protocol. |
|
133 |
* |
|
134 |
* @param accessProtocol |
|
135 |
* the new access protocol |
|
136 |
*/ |
|
137 |
public void setAccessProtocol(final Protocols accessProtocol) { |
|
138 |
this.accessProtocol = accessProtocol; |
|
139 |
} |
|
140 |
|
|
141 |
/** |
|
142 |
* Gets the username auth. |
|
143 |
* |
|
144 |
* @return the username auth |
|
145 |
*/ |
|
146 |
public String getUsernameAuth() { |
|
147 |
return usernameAuth; |
|
148 |
} |
|
149 |
|
|
150 |
/** |
|
151 |
* Sets the username auth. |
|
152 |
* |
|
153 |
* @param usernameAuth |
|
154 |
* the new username auth |
|
155 |
*/ |
|
156 |
public void setUsernameAuth(final String usernameAuth) { |
|
157 |
this.usernameAuth = usernameAuth; |
|
158 |
} |
|
159 |
|
|
160 |
/** |
|
161 |
* Gets the password auth. |
|
162 |
* |
|
163 |
* @return the password auth |
|
164 |
*/ |
|
165 |
public String getPasswordAuth() { |
|
166 |
return passwordAuth; |
|
167 |
} |
|
168 |
|
|
169 |
/** |
|
170 |
* Sets the password auth. |
|
171 |
* |
|
172 |
* @param passwordAuth |
|
173 |
* the new password auth |
|
174 |
*/ |
|
175 |
public void setPasswordAuth(final String passwordAuth) { |
|
176 |
this.passwordAuth = passwordAuth; |
|
177 |
} |
|
178 |
|
|
179 |
/** |
|
180 |
* Gets the uri. |
|
181 |
* |
|
182 |
* @return the uri |
|
183 |
*/ |
|
184 |
public String getURI() { |
|
185 |
return URI.replace("\\u003d", "=").replace("\\u0026", "&"); |
|
186 |
} |
|
187 |
|
|
188 |
/** |
|
189 |
* Sets the uri. |
|
190 |
* |
|
191 |
* @param uRI |
|
192 |
* the new uri |
|
193 |
*/ |
|
194 |
public void setURI(final String uRI) { |
|
195 |
|
|
196 |
URI = uRI.replace("\\u003d", "=").replace("\\u0026", "&"); |
|
197 |
} |
|
198 |
|
|
199 |
/** |
|
200 |
* Convert the object into a json String. |
|
201 |
* |
|
202 |
* @return the string |
|
203 |
*/ |
|
204 |
public String toJSON() { |
|
205 |
Gson g = new Gson(); |
|
206 |
return g.toJson(this).replace("\\u003d", "=").replace("\\u0026", "&"); |
|
207 |
} |
|
208 |
|
|
209 |
/** |
|
210 |
* Gets the related metadata id. |
|
211 |
* |
|
212 |
* @return the related metadata id. |
|
213 |
*/ |
|
214 |
public String getMetadataRelatedID() { |
|
215 |
return metadataRelatedID; |
|
216 |
} |
|
217 |
|
|
218 |
/** |
|
219 |
* Sets the related metadata id. |
|
220 |
* |
|
221 |
* @param metadataRelatedID |
|
222 |
* the related metadata id. |
|
223 |
*/ |
|
224 |
public void setMetadataRelatedID(final String metadataRelatedID) { |
|
225 |
this.metadataRelatedID = metadataRelatedID; |
|
226 |
} |
|
227 |
|
|
228 |
/** |
|
229 |
* @return the md5Sum |
|
230 |
*/ |
|
231 |
public String getMd5Sum() { |
|
232 |
return md5Sum; |
|
233 |
} |
|
234 |
|
|
235 |
/** |
|
236 |
* @param md5Sum |
|
237 |
* the md5Sum to set |
|
238 |
*/ |
|
239 |
public void setMd5Sum(final String md5Sum) { |
|
240 |
this.md5Sum = md5Sum; |
|
241 |
} |
|
242 |
|
|
243 |
/** |
|
244 |
* @return the fileSizeKB |
|
245 |
*/ |
|
246 |
public long getFileSizeKB() { |
|
247 |
return fileSizeKB; |
|
248 |
} |
|
249 |
|
|
250 |
/** |
|
251 |
* @param fileSizeKB the fileSizeKB to set |
|
252 |
*/ |
|
253 |
public void setFileSizeKB(long fileSizeKB) { |
|
254 |
this.fileSizeKB = fileSizeKB; |
|
255 |
} |
|
256 |
|
|
257 |
} |
modules/dnet-objectstore-rmi/tags/2.0.0/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 |
/** |
|
13 |
* Main ObjectStore Service interface. |
|
14 |
* |
|
15 |
* @author <a href="mailto:sandro.labruzzo at isti.cnr.it">Sandro La Bruzzo</a> |
|
16 |
* @version 0.0.1 |
|
17 |
*/ |
|
18 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
19 |
public interface ObjectStoreService extends BaseService { |
|
20 |
|
|
21 |
/** |
|
22 |
* Returns ResultSet EPR for delivered ObjectStore records in a particular range date. |
|
23 |
* <p> |
|
24 |
* Please check service implementations for details on the expected format of the records in the result set epr. |
|
25 |
* </p> |
|
26 |
* <p> |
|
27 |
* This method could be used for a bulk deliver of all objects in the store |
|
28 |
* </p> |
|
29 |
* |
|
30 |
* @param obsId |
|
31 |
* identifier of the ObjectStore |
|
32 |
* @param from |
|
33 |
* the minimum date of the object |
|
34 |
* @param until |
|
35 |
* the maximum date of the object |
|
36 |
* @return a ResultSet EPR. Each element of the result set contains the objIdentifier of a record and its URL for retrieve the |
|
37 |
* inputstream of the file. |
|
38 |
* @throws ObjectStoreServiceException |
|
39 |
* the object store service exception |
|
40 |
*/ |
|
41 |
@WebMethod(operationName = "deliverObjects", action = "deliverObjects") |
|
42 |
public W3CEndpointReference deliverObjects(@WebParam(name = "obsId") String obsId, |
|
43 |
@WebParam(name = "from") Double from, |
|
44 |
@WebParam(name = "until") Double until) 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 |
* Returns an URL to retrieve the ObjectStore record. |
|
68 |
* |
|
69 |
* @param obsId |
|
70 |
* identifier of the ObjectStore |
|
71 |
* @param objectId |
|
72 |
* the id of the object |
|
73 |
* @return the URL for retrieve the record |
|
74 |
* @throws ObjectStoreServiceException |
|
75 |
* the object store service exception |
|
76 |
*/ |
|
77 |
@WebMethod(operationName = "deliverObject", action = "deliverObject") |
|
78 |
public String deliverRecord(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectId") String objectId) throws ObjectStoreServiceException; |
|
79 |
|
|
80 |
/** |
|
81 |
* Feed the object in the objectStore |
|
82 |
* |
|
83 |
* @param obsId |
|
84 |
* identifier of the ObjectStore |
|
85 |
* @param objectMetadata |
|
86 |
* the String serialized of the JSON object ObjectStoreFile |
|
87 |
* @return |
|
88 |
* @throws ObjectStoreServiceException |
|
89 |
*/ |
|
90 |
|
|
91 |
@WebMethod(operationName = "feedObject", action = "feedObject") |
|
92 |
public void feedObject(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectMetadata") String objectMetadata) throws ObjectStoreServiceException; |
|
93 |
|
|
94 |
/** |
|
95 |
* Returns list of all stored indices. |
|
96 |
* |
|
97 |
* @return list of all stored indices |
|
98 |
*/ |
|
99 |
@WebMethod(operationName = "getListOfObjectStores", action = "getListOfObjectStores") |
|
100 |
public List<String> getListOfObjectStores(); |
|
101 |
} |
modules/dnet-objectstore-rmi/tags/2.0.0/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/2.0.0/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/2.0.0/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/2.0.0/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/2.0.0/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/2.0.0/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/2.0.0/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/2.0.0/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 <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 |
|
106 |
ObjectStoreFile metadataFile = new ObjectStoreFile(); |
|
107 |
metadataFile.setObjectID("MyID"); |
|
108 |
metadataFile.setMimeType("pdf"); |
|
109 |
metadataFile.setURI("ftp://myURL/FTP"); |
|
110 |
metadataFile.setAccessProtocol(Protocols.FTP); |
|
111 |
//Could be unnecessary |
|
112 |
metadataFile.setUsernameAuth("usr"); |
|
113 |
metadataFile.setPasswordAuth("pwd"); |
|
114 |
|
|
115 |
//Feed |
|
116 |
obsService.feedObject(objectStoreID, metadataFile.toJSON()); |
|
117 |
} </programlisting> |
|
118 |
|
|
119 |
</para> |
|
120 |
</sect1> |
|
121 |
<sect1> |
|
122 |
<title>Feeding of multiple objects</title> |
|
123 |
<para>The feeding of multiple objects can be performed by the mechanism of |
|
124 |
bloackboard messaging within the profile service of the objectStore. The code |
|
125 |
Below shows an example of feeding inside an example BlackBoardJobNode belonging |
|
126 |
to a workflow. |
|
127 |
<programlisting> |
|
128 |
protected void prepareJob(final BlackboardJob job, final NodeToken token) { |
|
129 |
|
|
130 |
final String epr = token.getEnv().getAttribute("epr"); |
|
131 |
final String objectStoreID = token.getEnv().getAttribute("objectStoreID"); |
|
132 |
super.prepareJob(job, token); |
|
133 |
|
|
134 |
job.setAction("FEED"); |
|
135 |
|
|
136 |
try { |
|
137 |
job.getParameters().put("epr",new String(Base64.encodeBase64(epr.getBytes("US-ASCII")), |
|
138 |
"US-ASCII")); |
|
139 |
} |
|
140 |
catch (UnsupportedEncodingException e) { |
|
141 |
throw new RuntimeException("ERROR " + e.getMessage()); |
|
142 |
} |
|
143 |
job.getParameters().put("obsID",objectStoreID); |
|
144 |
} |
|
145 |
</programlisting> |
|
146 |
</para> |
|
147 |
</sect1> |
|
148 |
</chapter> |
|
149 |
<chapter> |
|
150 |
<title>Delivery from Object Store</title> |
|
151 |
<sect1> |
|
152 |
<title/> |
|
153 |
<para> |
|
154 |
<programlisting> /** |
|
155 |
* Returns ResultSet EPR for delivered ObjectStore records in a particular |
|
156 |
* range date. |
|
157 |
* <p> |
|
158 |
* Please check service implementations for details on the expected format |
|
159 |
* of the records in the result set epr. |
|
160 |
* </p> |
|
161 |
* <p> |
|
162 |
* This method could be used for a bulk deliver of all objects in the store |
|
163 |
* </p> |
|
164 |
* |
|
165 |
* @param obsId |
|
166 |
* identifier of the ObjectStore |
|
167 |
* @param from |
|
168 |
* the minimum date of the object |
|
169 |
* @param until |
|
170 |
* the maximum date of the object |
|
171 |
* @return a ResultSet EPR. Each element of the result set contains the |
|
172 |
* objIdentifier of a record and its URL for retrieve the |
|
173 |
* inputstream of the file. |
|
174 |
* @throws ObjectStoreServiceException |
|
175 |
* the object store service exception |
|
176 |
*/ |
|
177 |
@WebMethod(operationName = "deliverObjects", action = "deliverObjects") |
|
178 |
public W3CEndpointReference deliverObjects( |
|
179 |
@WebParam(name = "obsId") String obsId, |
|
180 |
@WebParam(name = "from") Double from, |
|
181 |
@WebParam(name = "until") Double until) |
|
182 |
throws ObjectStoreServiceException; |
|
183 |
|
|
184 |
/** |
|
185 |
* Returns ResultSet EPR for delivered ObjectStore records. |
|
186 |
* <p> |
|
187 |
* Please check service implementations for details on the expected format |
|
188 |
* of the records in the result set epr. |
|
189 |
* </p> |
|
190 |
* |
|
191 |
* @param obsId |
|
192 |
* identifier of the ObjectStore |
|
193 |
* @param eprId |
|
194 |
* id of a ResultSet EPR with the identifiers of the interesting |
|
195 |
* objects. Each element of the result set contains the |
|
196 |
* objIdentifier of a record |
|
197 |
* @return a ResultSet EPR. Each element of the result set contains the |
|
198 |
* objIdentifier of a record and its URL for retrieve the |
|
199 |
* inputstream of the file. |
|
200 |
* @throws ObjectStoreServiceException |
|
201 |
* the object store service exception |
|
202 |
*/ |
|
203 |
@WebMethod(operationName = "deliverObjectsByIds", action = "deliverObjectsByIds") |
|
204 |
public W3CEndpointReference deliverObjectsByIds( |
|
205 |
@WebParam(name = "obsId") String obsId, |
|
206 |
@WebParam(name = "eprId") W3CEndpointReference eprId) |
|
207 |
throws ObjectStoreServiceException; |
|
208 |
|
|
209 |
/** |
|
210 |
* Returns an URL to retrieve the ObjectStore record. |
|
211 |
* |
|
212 |
* @param obsId |
|
213 |
* identifier of the ObjectStore |
|
214 |
* @param objectId |
|
215 |
* the id of the object |
|
216 |
* @return the URL for retrieve the record |
|
217 |
* @throws ObjectStoreServiceException |
|
218 |
* the object store service exception |
|
219 |
*/ |
|
220 |
@WebMethod(operationName = "deliverObject", action = "deliverObject") |
|
221 |
public String deliverRecord(@WebParam(name = "obsId") String obsId, |
|
222 |
@WebParam(name = "objectId") String objectId) |
|
223 |
throws ObjectStoreServiceException;</programlisting> |
|
224 |
</para> |
|
225 |
<para>The delivery of file can be done by a call of the ObjectStore Service method, |
|
226 |
that allow the delivery in three different ways:<itemizedlist> |
|
227 |
<listitem> |
|
228 |
<para>DeliverObjects stored in an interval of time (from-to) </para> |
|
229 |
</listitem> |
|
230 |
<listitem> |
|
231 |
<para>DeliveryObjects by a List of IDs of Objects</para> |
|
232 |
</listitem> |
Also available in: Unified diff
[maven-release-plugin] copy for tag 2.0.0