Package dk.netarkivet.wayback
Class NetarchiveResourceStore
- java.lang.Object
-
- dk.netarkivet.wayback.NetarchiveResourceStore
-
- All Implemented Interfaces:
org.archive.wayback.ResourceStore
public class NetarchiveResourceStore extends java.lang.Object implements org.archive.wayback.ResourceStore
This is the connector between netarchivesuite and wayback. And is based on PrototypeNetarchiveResourceStore.java which was made as a prototype connector.
-
-
Field Summary
Fields Modifier and Type Field Description protected ViewerArcRepositoryClient
client
JMS ArcRepositoryClient.
-
Constructor Summary
Constructors Constructor Description NetarchiveResourceStore()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.archive.wayback.core.Resource
retrieveResource(org.archive.wayback.core.CaptureSearchResult captureSearchResult)
Transforms search result into a resource, according to the ResourceStore interface.void
shutdown()
Shuts down this resource store, closing the arcrepository client.
-
-
-
Field Detail
-
client
protected ViewerArcRepositoryClient client
JMS ArcRepositoryClient.
-
-
Constructor Detail
-
NetarchiveResourceStore
public NetarchiveResourceStore()
Constructor.
-
-
Method Detail
-
retrieveResource
public org.archive.wayback.core.Resource retrieveResource(org.archive.wayback.core.CaptureSearchResult captureSearchResult) throws org.archive.wayback.exception.ResourceNotAvailableException
Transforms search result into a resource, according to the ResourceStore interface.- Specified by:
retrieveResource
in interfaceorg.archive.wayback.ResourceStore
- Parameters:
captureSearchResult
- the search result.- Returns:
- a valid resource containing metadata and a link to the ARC record.
- Throws:
org.archive.wayback.exception.ResourceNotAvailableException
- if something went wrong fetching record.
-
shutdown
public void shutdown() throws java.io.IOException
Shuts down this resource store, closing the arcrepository client.- Specified by:
shutdown
in interfaceorg.archive.wayback.ResourceStore
- Throws:
java.io.IOException
- if an exception occurred while closing the client.
-
-