org.apache.oodt.product.handlers.ofsn
Class OFSNFileHandler
java.lang.Object
org.apache.oodt.product.handlers.ofsn.OFSNFileHandler
- All Implemented Interfaces:
- OFSNMetKeys, OFSNXMLConfigMetKeys, OFSNXMLMetKeys, XMLQueryMetKeys, LargeProductQueryHandler, QueryHandler
public class OFSNFileHandler
- extends Object
- implements LargeProductQueryHandler, XMLQueryMetKeys, OFSNXMLMetKeys, OFSNMetKeys, OFSNXMLConfigMetKeys
An extensible implementation of the PDS-inspired Online File Specification
Name (OFSN) style product server. See the ofsn-ps.xml file for a detailed
specification of the configuration and motivation behind this product
handler.
- Version:
- $Revision$
- Author:
- mattmann
| Fields inherited from interface org.apache.oodt.product.handlers.ofsn.metadata.OFSNXMLConfigMetKeys |
HANDLER_CLASSNAME_ATTR, HANDLER_NAME_ATTR, HANDLER_TAG, HANDLER_TYPE_ATTR, OFSN_CFG_ID_ATTR, OFSN_CFG_NAME_ATTR, OFSN_PRODUCT_ROOT_ATTR, PROPERTY_MIMETYPE_ATTR, PROPERTY_NAME_ATTR, PROPERTY_TAG, PROPERTY_VALUE_ATTR |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OFSNFileHandler
public OFSNFileHandler()
throws InstantiationException
- Throws:
InstantiationException
query
public XMLQuery query(XMLQuery xmlQuery)
throws ProductException
- Description copied from interface:
QueryHandler
- Run a query.
- Specified by:
query in interface QueryHandler
- Parameters:
xmlQuery - The query.
- Returns:
- The response.
- Throws:
ProductException - if an error occurs.
close
public void close(String id)
throws ProductException
- Description copied from interface:
LargeProductQueryHandler
- Close off a product.
This method indicates that the product is no longer required and its resources
can be freed by the query handler. If the ID is unknown, no untoward action is
required. It should throw an exception if there is an error during the
resource release (such as an
IOException when closing a file.
- Specified by:
close in interface LargeProductQueryHandler
- Parameters:
id - Product ID.
- Throws:
ProductException - if an error occurs.
retrieveChunk
public byte[] retrieveChunk(String id,
long offset,
int length)
throws ProductException
- Description copied from interface:
LargeProductQueryHandler
- Retrieve a chunk of a product.
The product is identified by a string ID. The query handler should return a
binary chunk of the product using the given offset and length. If the ID isn't
recognized, it should return null. It should throw an exception if retrieval
fails for some reason.
- Specified by:
retrieveChunk in interface LargeProductQueryHandler
- Parameters:
id - Product ID.offset - Where in the product to get a chunk of it.length - How much of the product to get.
- Returns:
- A chunk, or null if the id is unknown.
- Throws:
ProductException - if an error occurs.
Copyright © 1999-2014 Apache OODT. All Rights Reserved.