|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Document
Generic read-only repository document.
A repository document is composed of content data (such as an image, text, or other kind of data) and zero or more properties.
A repository document has an identifying document ID which provides a means for locating it within the repository system. This is generally some kind of identifier string that uniquely designates a single document within the repository with respect to the context that the repository is being accessed (i.e., with respect to the configuration properties that were use to initialize and open the repository handler).
A repository document may also possess a size, which specifies the length of the document in units defined by the implementation (usually but not necessarily bytes).
In addition, each repository document has a set of zero or more
document properties associated with it. These properties
(DocumentProperty
objects) specify attributes of the document beyond
its content data, the meaning of which are defined by the implementation.
For example, a given implementation might provide properties specifying things
like a document's modification date, number of pages it contains, the names
of its authors, its access permissions, its expiration date, an identification
number shared by other related documents within the same batch, and so forth.
In addition to the document ID, one or more of these properties might be
used as keys to store the document in the repository system.
Note: This requires Java 1.5 or later.
StorableDocument
,
DocumentProperty
,
RepositoryReader
,
AbstractDocument
Field Summary | |
---|---|
static java.lang.String |
REV
|
Method Summary | |
---|---|
void |
close()
Close this repository document. |
java.io.InputStream |
getDataStream()
Open a readable data stream to the contents of this repository document. |
java.lang.String |
getID()
Retrieve the ID of this repository document. |
DocumentProperty[] |
getProperties()
Retrieve the properties associated with this repository document. |
java.lang.Object |
getProperty(java.lang.String prop)
Retrieve the value of a property in this repository document. |
long |
getSize()
Retrieve the size of the data for this repository document. |
Field Detail |
---|
static final java.lang.String REV
Method Detail |
---|
void close()
Note that this method does not throw any exceptions.
Implementations may allow this method to be called more than once.
close
in interface java.io.Closeable
java.lang.String getID() throws java.io.IOException
java.io.IOException
- Thrown if an error occurred while accessing the document.long getSize() throws java.io.IOException
java.io.IOException
- Thrown if an error occurred while accessing the document.java.lang.Object getProperty(java.lang.String prop) throws java.io.IOException
prop
- The name of the document property value to retrieve.
java.io.IOException
- Thrown if an error occurred while accessing the document, or
if the document does not have the specified property.DocumentProperty[] getProperties() throws java.io.IOException
java.io.IOException
- Thrown if an error occurred while accessing the document.java.io.InputStream getDataStream() throws java.io.IOException
java.io.IOException
- Thrown if an error occurred while accessing the document.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |