Interface DocumentAttributeContract
- All Known Implementing Classes:
DocumentAttribute,DocumentAttribute.AbstractBuilder,DocumentAttributeDateTime,DocumentAttributeDateTime.Builder,DocumentAttributeDecimal,DocumentAttributeDecimal.Builder,DocumentAttributeInteger,DocumentAttributeInteger.Builder,DocumentAttributeString,DocumentAttributeString.Builder
public interface DocumentAttributeContract
Defines the contract for an attribute of a document. These attributes are generally extracted during an indexing
process and stored as key-value pairs associated with the document. In addition to the key-value pair, the
document attribute also defines the data type of data that is held by the attribute.
This contract simply defines the interface that specific (and strongly typed) implementations of document
attributes will implement. The number of possible implementations of this contract are generally constrainted by
the set of defined DocumentAttributeDataType enumeration values.
Concrete instances of should be created using the DocumentAttributeFactory. It is not generally
of value for a client of the API to create custom implementations of this contract interface.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Method Details
-
getName
String getName()Returns the name of this document attribute which serves as an identifier for this attribute on the document. A document may have more then one attribute with the same name, in which case it is treated as a multi-valued attribute. This method should never return a null or blank value.- Returns:
- the name of the document attribute
-
getValue
Object getValue()Returns the value of this document attribute. It can be of any type as defined by the implementations of this interface. It is possible that this value may be null in cases where the document has a particular attribute but no actual value associated with that attribute.- Returns:
- the value of the document attribute
-
getDataType
DocumentAttributeDataType getDataType()Returns the data type of this document attribute. This will generally inform the type of object returned from the#getValuemethod. This method should never return a null value.- Returns:
- the data type of this document attribute
-