|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.viewerproxy.CommandResolver
dk.netarkivet.viewerproxy.GetDataResolver
public class GetDataResolver
Wrapper for an URIResolver, which retrieves raw data on given specific URLs, and forwards all others to the wrapped handler. This allows you to get metadata, individual files, and individual records.
Field Summary | |
---|---|
(package private) ViewerArcRepositoryClient |
client
The client for the arc repository. |
static java.lang.String |
FILE_NAME_PARAMETER
Parameter defining the file to return the getting files or records. |
static java.lang.String |
FILE_OFFSET_PARAMETER
Parameter defining the offset into an ARC file for getting a record. |
static java.lang.String |
GET_FILE_COMMAND
Command for getting a single file from the bitarchive. |
static java.lang.String |
GET_METADATA_COMMAND
Command for getting all metadata for a single job. |
static java.lang.String |
GET_RECORD_COMMAND
Command for getting a specific record (file+offset) from an ARC file in the bitarchive. |
static java.lang.String |
JOB_ID_PARAMETER
Parameter for ids of jobs to get metadata for. |
Fields inherited from class dk.netarkivet.viewerproxy.CommandResolver |
---|
ur, VIEWERPROXY_COMMAND_NAME |
Fields inherited from interface dk.netarkivet.viewerproxy.URIResolver |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
GetDataResolver(URIResolver ur,
ViewerArcRepositoryClient client)
Make a new GetDataResolver, which calls commands on the arcrepository, and forwards all other requests to the given URIResolver. |
Method Summary | |
---|---|
protected boolean |
executeCommand(Request request,
Response response)
Handles parsing of the URL and delegating to relevant methods for known commands. |
Methods inherited from class dk.netarkivet.viewerproxy.CommandResolver |
---|
isCommandHostRequest, lookup, setURIResolver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
ViewerArcRepositoryClient client
public static final java.lang.String GET_FILE_COMMAND
public static final java.lang.String GET_RECORD_COMMAND
public static final java.lang.String GET_METADATA_COMMAND
public static final java.lang.String FILE_NAME_PARAMETER
public static final java.lang.String FILE_OFFSET_PARAMETER
public static final java.lang.String JOB_ID_PARAMETER
Constructor Detail |
---|
public GetDataResolver(URIResolver ur, ViewerArcRepositoryClient client)
ur
- The URIResolver to handle all other uris.client
- the arcrepository client
ArgumentNotValid
- if either argument is null.Method Detail |
---|
protected boolean executeCommand(Request request, Response response)
executeCommand
in class CommandResolver
request
- The request to checkresponse
- The response to give command results to if it is a
command
IOFailure
- in any trouble.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |