public class URLGetHandler extends AbstractCrawlLister implements OFSNGetHandler
OFSNGetHandler for returning a URL listing pointing to files within an OFSN
NOTE: Configuration parameters for this class include:
1. Server hostname
2. Server port
3. Webapp context-root
4. Path to product-root
5. Return type desired for URLs| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_PROD_SERVER_CONTEXT |
protected static String |
DEFAULT_PROD_SERVER_HOSTNAME |
protected static String |
DEFAULT_PROD_SERVER_PORT |
protected static String |
DEFAULT_PRODUCT_ROOT |
protected static String |
DEFAULT_RETURN_TYPE |
protected static String |
DEFAULT_RETURN_VALUE |
DIR_FILTER, FILE_FILTER| Constructor and Description |
|---|
URLGetHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Properties prop)
Configures this handler with the provided configuration stored in a
Properties object. |
File[] |
getListing(String filePath)
Handlers that implement this method take an
Online
File Specification Name and return
back a listing of files on the remote server. |
byte[] |
retrieveChunk(String filepath,
long offset,
int length)
Retrieves a chunk of data from the remote file.
|
long |
sizeOf(String filepath)
Returns the size of the remote data, which may be the entire file in
question, or some subset/transformation on it.
|
crawlFilesprotected static final String DEFAULT_RETURN_VALUE
protected static final String DEFAULT_PROD_SERVER_HOSTNAME
protected static final String DEFAULT_PROD_SERVER_PORT
protected static final String DEFAULT_PROD_SERVER_CONTEXT
protected static final String DEFAULT_PRODUCT_ROOT
protected static final String DEFAULT_RETURN_TYPE
public void configure(Properties prop)
OFSNListHandlerProperties object.configure in interface OFSNGetHandlerconfigure in interface OFSNListHandlerconfigure in class AbstractCrawlListerprop - The configuration for this list handler.public byte[] retrieveChunk(String filepath, long offset, int length) throws ProductException
OFSNGetHandlerretrieveChunk in interface OFSNGetHandlerfilepath - The path to the remote file.offset - The offset in the remote data to retrieve.length - The length of data to readProductException - If any error occurs.public long sizeOf(String filepath)
OFSNGetHandlersizeOf in interface OFSNGetHandlerfilepath - The remote file in question.public File[] getListing(String filePath) throws ProductException, IllegalArgumentException
OFSNListHandlerOnline
File Specification Name and return
back a listing of files on the remote server.getListing in interface OFSNListHandlergetListing in class AbstractCrawlListerfilePath - The OFSN path to list files from.File objects.ProductException - If any error occurs performing the listing on the server side.IllegalArgumentExceptionCopyright © 1999–2017 Apache OODT. All rights reserved.