|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.archive.DocumentProperty tribble.archive.WritableProperty
public class WritableProperty
Generic modifiable document property.
This class provides the fundamental attributes and methods for a document property associated with a modifiable archive document.
An archive document is composed of content data (such as an image, text, or other kind of user data) and one or more properties. Typically, the properties comprise the indices used to store the document in a document storage system. All of the documents within an archive system typically share the same set of document properties, although this is not required of any implementation.
Each document property has the following attributes:
A given property that is associated with a particular archive document also
has a value, which is an object of some sort.
For documents being written to an archive by an ArchiveWriter
,
a property can be associated with the document using the
WritableDocument.addProperty()
method (or by some other means provided by the implementation).
Once the property is associated with the document, its value can be set to
some object using the
WritableDocument.setProperty()
method.
The value of a property is the minimum amount of information that is useful to an implementation. The other attributes may be used or ignored by the implementation as it deems necessary.
Note: This requires Java 1.5 or later.
WritableDocument
,
ArchiveWriter
Field Summary |
---|
Fields inherited from class tribble.archive.DocumentProperty |
---|
m_dflVal, m_inFmt, m_len, m_name, m_outFmt, m_type, TYPE_BINARY, TYPE_DATE, TYPE_FILE, TYPE_NUM, TYPE_TEXT |
Constructor Summary | |
---|---|
WritableProperty(java.lang.String name)
Constructor. |
Method Summary | |
---|---|
void |
setDefaultValue(java.lang.Object val)
Establish the default value for this document property. |
void |
setInputFormat(java.lang.String fmt)
Establish the input (source) format specification for this document property. |
void |
setLength(int len)
Establish the length of this document property. |
void |
setName(java.lang.String name)
Establish the name of this document property. |
void |
setOutputFormat(java.lang.String fmt)
Establish the output format specification for this document property. |
void |
setType(java.lang.String type)
Establish the type of this document property. |
Methods inherited from class tribble.archive.DocumentProperty |
---|
equals, getDefaultValue, getInputFormat, getLength, getName, getOutputFormat, getType, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WritableProperty(java.lang.String name)
name
- The name of this document property.Method Detail |
---|
public void setName(java.lang.String name)
name
- The name of this property.public void setType(java.lang.String type)
type
- The type of this property, which is one of the
TYPE_XXX
constants or some other
application-defined value, or null if it is not defined.public void setLength(int len)
len
- The length of this document property, or zero if it is not defined.public void setOutputFormat(java.lang.String fmt)
fmt
- The formatting specification of this property, which specifies how the
property value should be formatted when it is stored in an archive
document; or null if it is not defined.public void setInputFormat(java.lang.String fmt)
fmt
- The source formatting specification of this property, which specifies the
format of the property value before it is stored in an archive document
(i.e., it specifies how the source value for this property should be
unformatted when its value is set, prior to being
reformatted when it is written to the archive);
or null if it is not defined.public void setDefaultValue(java.lang.Object val)
val
- The default value to be used by this document property if it is not
explicitly set to another value. This can be null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |