|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.reading.AbstractReader
org.dspace.app.xmlui.cocoon.BitstreamReader
public class BitstreamReader
The BitstreamReader will query DSpace for a particular bitstream and transmit it to the user. There are several method of specifing the bitstream to be develivered. You may refrence a bitstream by either it's id or attempt to resolve the bitstream's name. /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 bistream using it's 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> Alternativly, you can access the bitstream via a name instead of directly through it's 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 & name. /html/id/{itemID}/{name} <map:read type="BitstreamReader"> <map:parameter name="itemID" value="{1}"/> <map:parameter name="name" value="{2}"/> </map:read>
| Field Summary | |
|---|---|
protected java.io.InputStream |
bitstreamInputStream
The bitstream file |
protected java.lang.String |
bitstreamMimeType
The bitstream's mime-type |
protected java.lang.String |
bitstreamName
The bitstream's name |
protected long |
bitstreamSize
The bitstream's reported size |
protected static int |
BUFFER_SIZE
How big of a buffer should we use when reading from the bitstream before writting to the HTTP response? |
protected static int |
expires
When should a bitstream expire in milliseconds. |
protected boolean |
isAnonymouslyReadable
True if bitstream is readable by anonymous users |
protected org.apache.cocoon.environment.Request |
request
The Cocoon request |
protected org.apache.cocoon.environment.Response |
response
The Cocoon response |
| Fields inherited from class org.apache.cocoon.reading.AbstractReader |
|---|
objectModel, out, parameters, resolver, source |
| Fields inherited from interface org.apache.cocoon.reading.Reader |
|---|
ROLE |
| Constructor Summary | |
|---|---|
BitstreamReader()
|
|
| Method Summary | |
|---|---|
void |
generate()
Write the actual data out to the response. |
java.lang.String |
getMimeType()
Returns the mime-type of the bitstream. |
void |
recycle()
Recycle |
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters par)
Set up the bitstream reader. |
| Methods inherited from class org.apache.cocoon.reading.AbstractReader |
|---|
getLastModified, setOutputStream, shouldSetContentLength |
| Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
|---|
getLogger, setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 java.io.InputStream bitstreamInputStream
protected long bitstreamSize
protected java.lang.String bitstreamMimeType
protected java.lang.String bitstreamName
protected boolean isAnonymouslyReadable
| Constructor Detail |
|---|
public BitstreamReader()
| Method Detail |
|---|
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters par)
throws org.apache.cocoon.ProcessingException,
org.xml.sax.SAXException,
java.io.IOException
setup in interface org.apache.cocoon.sitemap.SitemapModelComponentsetup in class org.apache.cocoon.reading.AbstractReaderorg.apache.cocoon.ProcessingException
org.xml.sax.SAXException
java.io.IOException
public void generate()
throws java.io.IOException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
generate in interface org.apache.cocoon.reading.Readerjava.io.IOException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingExceptionpublic java.lang.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.AbstractReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||