|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.archive.DocumentProperty
public class DocumentProperty
Generic document property.
This class provides the fundamental attributes and methods for a document property that is associated with an 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. All of the documents within an archive system typically share the same set of document properties, although this is not required of any implementation.
Document properties specify attributes of the document beyond the content data of the document, 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 the indices to store the document in the archive system.
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.
The values of the properties can be accessed for a given document that was
retrieved by an ArchiveReader
, by calling the
ArchiveDocument.getProperty()
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.
WritableProperty
,
ArchiveDocument
Field Summary | |
---|---|
protected java.lang.Object |
m_dflVal
Default output value. |
protected java.lang.String |
m_inFmt
Input format (for non-String type properties). |
protected int |
m_len
Text property length. |
protected java.lang.String |
m_name
Property name. |
protected java.lang.String |
m_outFmt
Output format (for non-String type properties). |
protected java.lang.String |
m_type
Property type. |
static java.lang.String |
TYPE_BINARY
Property type: Binary data. |
static java.lang.String |
TYPE_DATE
Property type: Date/time. |
static java.lang.String |
TYPE_FILE
Property type: Filename. |
static java.lang.String |
TYPE_NUM
Property type: Numeric. |
static java.lang.String |
TYPE_TEXT
Property type: Alphanumeric text. |
Constructor Summary | |
---|---|
protected |
DocumentProperty(java.lang.String name)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares two objects for equality. |
java.lang.Object |
getDefaultValue()
Retrieve the default value for this document property. |
java.lang.String |
getInputFormat()
Retrieve the input (source) format specification for this document property. |
int |
getLength()
Retrieve the length of this document property. |
java.lang.String |
getName()
Retrieve the name of this document property. |
java.lang.String |
getOutputFormat()
Retrieve the output format specification for this document property. |
java.lang.String |
getType()
Retrieve the type of this document property. |
int |
hashCode()
Generates a hash code for this property. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE_TEXT
public static final java.lang.String TYPE_BINARY
public static final java.lang.String TYPE_NUM
public static final java.lang.String TYPE_DATE
public static final java.lang.String TYPE_FILE
protected java.lang.String m_name
protected java.lang.String m_type
TYPE_XXX
constants
or some other application-defined value.
protected int m_len
protected java.lang.String m_outFmt
protected java.lang.String m_inFmt
protected java.lang.Object m_dflVal
Constructor Detail |
---|
protected DocumentProperty(java.lang.String name)
name
- The name of this document property.Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to compare this object to.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getName()
public java.lang.String getType()
TYPE_XXX
constants or some other
application-defined value, or null if it is not defined.public int getLength()
public java.lang.String getOutputFormat()
public java.lang.String getInputFormat()
public java.lang.Object getDefaultValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |