public class BitstreamReader
extends org.apache.cocoon.reading.AbstractReader
implements org.apache.avalon.excalibur.pool.Recyclable
/bitstream/{handle}/{sequence}/{name}
<map:read type="BitstreamReader">
<map:parameter name="handle" value="{1}/{2}"/>
<map:parameter name="sequence" value="{3}"/>
<map:parameter name="name" value="{4}"/>
</map:read>
When no handle is assigned yet, you can access a bitstream
using its internal ID.
/bitstream/id/{bitstreamID}/{sequence}/{name}
<map:read type="BitstreamReader">
<map:parameter name="bitstreamID" value="{1}"/>
<map:parameter name="sequence" value="{2}"/>
</map:read>
Alternatively, you can access the bitstream via a name instead
of directly through its sequence.
/html/{handle}/{name}
<map:read type="BitstreamReader">
<map:parameter name="handle" value="{1}/{2}"/>
<map:parameter name="name" value="{3}"/>
</map:read>
Again when no handle is available you can also access it
via an internal itemID and name.
/html/id/{itemID}/{name}
<map:read type="BitstreamReader">
<map:parameter name="itemID" value="{1}"/>
<map:parameter name="name" value="{2}"/>
</map:read>
Added request-item support.
Original Concept, JSPUI version: Universidade do Minho at www.uminho.pt
Sponsorship of XMLUI version: Instituto Oceanográfico de España at www.ieo.es
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected InputStream |
bitstreamInputStream
The bitstream file
|
protected String |
bitstreamMimeType
The bitstream's mime-type
|
protected String |
bitstreamName
The bitstream's name
|
protected BitstreamService |
bitstreamService |
protected long |
bitstreamSize
The bitstream's reported size
|
protected static int |
BUFFER_SIZE
How big a buffer should we use when reading from the bitstream before
writing to the HTTP response?
|
protected CitationDocumentService |
citationDocumentService |
protected static int |
expires
When should a bitstream expire in milliseconds.
|
protected HandleService |
handleService |
protected boolean |
isAnonymouslyReadable
True if bitstream is readable by anonymous users
|
protected ItemService |
itemService |
protected org.apache.cocoon.environment.Request |
request
The Cocoon request
|
protected org.apache.cocoon.environment.Response |
response
The Cocoon response
|
| Constructor and Description |
|---|
BitstreamReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
generate()
Write the actual data out to the response.
|
String |
getMimeType()
Returns the mime-type of the bitstream.
|
void |
recycle()
Recycle
|
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
org.apache.avalon.framework.parameters.Parameters par)
Set up the bitstream 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
protected InputStream bitstreamInputStream
protected long bitstreamSize
protected String bitstreamMimeType
protected String bitstreamName
protected boolean isAnonymouslyReadable
protected AuthorizeService authorizeService
protected BitstreamService bitstreamService
protected HandleService handleService
protected ItemService itemService
protected CitationDocumentService citationDocumentService
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 - passed through.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 String getMimeType()
getMimeType in interface org.apache.cocoon.sitemap.SitemapOutputComponentgetMimeType in class org.apache.cocoon.reading.AbstractReaderpublic void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablerecycle in class org.apache.cocoon.reading.AbstractReaderCopyright © 2016 DuraSpace. All rights reserved.