A microservice framework providing object storage metadata from an arbitrary archive to EMiL. The REST-Interface provides data as JSON or XML based on HTTP content negotiation (default: JSON).
To provide data from your archive to EMiL, your implementation has to implement the interface ArchiveService
:
@Service
public class YourArchiveService implements ArchiveService<YourPid> {
@Override
public ArchiveObject getArchiveObject(YourPid pid) throws Exception {
...
}
@Override
public IEPid getPid(String token) {
...
}
}
java -jar <your implementation>.jar
Make sure that application.yml
is the same directory as <your implementation>.jar
.
GET http://hostname/<IDENTIFIER>
{
"objectId": "IE12345",
"files": [
{ "fileId": "FL12312.iso", "type": "ISO", "url": "http://rosetta-hostname/delivery/DeliveryManagerServlet?dps_pid=FL12312&dps_func=stream" },
{ "fileId": "FL12313.iso", "type": "ISO", "url": "http://rosetta-hostname/delivery/DeliveryManagerServlet?dps_pid=FL12313&dps_func=stream" },
{ "fileId": "FL12314.iso", "type": "ISO", "url": "http://rosetta-hostname/delivery/DeliveryManagerServlet?dps_pid=FL12314&dps_func=stream" }
]
}
This service also offers a freely configurable demo object (see application.yml.template). The application.yml file has to be in the same directory as the jar file.
In application.yml one can define one PID with the desired response for testing. In case of this PID, the underlying archive won't be queried.