public class SearchMetadataExportReader
extends org.apache.cocoon.reading.AbstractReader
implements org.apache.avalon.excalibur.pool.Recyclable
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BUFFER_SIZE
How big a buffer should we use when reading from the bitstream before
writing to the HTTP response?
|
protected static int |
expires
When should a download expire in milliseconds.
|
protected org.apache.cocoon.environment.Request |
request
The Cocoon request
|
protected org.apache.cocoon.environment.Response |
response
The Cocoon response
|
| Constructor and Description |
|---|
SearchMetadataExportReader() |
| Modifier and Type | Method and Description |
|---|---|
DSpaceCSV |
exportMetadata(Context context,
Map objectModel,
String query,
String scopeString,
String filters)
Save and return the search results as a CSV file.
|
void |
generate()
Write the CSV.
|
void |
recycle()
Recycle
|
static int |
safeLongToInt(long l) |
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters par)
Set up the export reader.
|
protected static final int BUFFER_SIZE
protected static final int expires
protected org.apache.cocoon.environment.Response response
protected org.apache.cocoon.environment.Request request
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters par)
throws org.apache.cocoon.ProcessingException,
SAXException,
IOException
setup in interface org.apache.cocoon.sitemap.SitemapModelComponentsetup in class org.apache.cocoon.reading.AbstractReaderresolver - source resolver.objectModel - Cocoon object model.src - source to read.par - Reader parameters.org.apache.cocoon.ProcessingException - on error.SAXException - passed through.IOException - passed through.public void generate()
throws IOException,
SAXException,
org.apache.cocoon.ProcessingException
generate in interface org.apache.cocoon.reading.ReaderIOException - passed through.SAXException - passed through.org.apache.cocoon.ProcessingException - passed through.public void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class org.apache.cocoon.reading.AbstractReaderpublic DSpaceCSV exportMetadata(Context context, Map objectModel, String query, String scopeString, String filters) throws IOException, UIException, SearchServiceException, SQLException
context - session context.objectModel - Cocoon object model.query - search parameters.scopeString - scope of the search.filters - search filters.IOException - passed through.UIException - passed through.SearchServiceException - passed through.SQLException - passed through.public static int safeLongToInt(long l)
Copyright © 2016 DuraSpace. All rights reserved.