|
Oracle Ultra Search Java API Reference 9.0.3 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ultrasearch.query.Document
A document returned from a search.
A document is a set of attributes, and their corresponding attribute values. The type (Java Class) of the value matches the type specified by the attribute. A document can have attributes of the same name, so long as they are of different type. In other words, attribute equality is based on both name and type.
In addition, a document also has some properties that are not part of its attributes, such as URL and score.
Method Summary | |
java.lang.Object |
getAttribute(Attribute att) Returns a value associated with an attribute. |
java.util.Collection |
getAttributeValues(Attribute att) Returns all the values associated with an attribute. |
java.util.Collection |
getAvailableAttributes() Returns a collection of all the attributes available in this document. |
int |
getContentLength() Returns document content length. |
java.util.Collection |
getGroups() Returns the groups this document belongs to. |
int |
getId() Get the document id. |
java.util.Locale |
getLanguage() Returns the document's language. |
java.util.Date |
getLastModified() Returns date of the last modification on this document. |
int |
getScore() Returns the value of the hit score. |
long |
getSignature() Get the signature of the document. |
java.lang.String |
getUrl() Returns the display URL of the document. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getId()
public int getScore()
public java.lang.String getUrl()
public long getSignature()
A document's signature is calculated from its content's checksum. Two documents with the same signature are likely the same content, with high probability, therefore the signature can be used for duplicate document detection.
public int getContentLength()
public java.util.Date getLastModified()
For documents from Web data source, this date is as reported in the HTTP header.
public java.util.Locale getLanguage()
The Locale object returned only has the language field set.
public java.util.Collection getAvailableAttributes()
public java.util.Collection getAttributeValues(Attribute att)
The returned array contains either java.lang.String, java.math.BigDecimal, or java.util.Date objects, depending on the type specified in the attribute argument.
The return value can be null if the document does not have the specified attribute, or the attribute was not fetched as one of the return attributes of the query which matched this document.
att
- Attribute for which the value is requested.public java.lang.Object getAttribute(Attribute att)
If there are more than one, the value selected is arbitrary, but usually the first element of the array returned by getAttributeValues(). This method is useful if the attribute is usually associated with only one value. The return value can be of type java.lang.String, java.math.BigDecimal, or java.util.Date; depending on the type specified in the attribute argument. The return value can be null if the document does not have the specified attribute, or the attribute was not included as one of the return attributes of the query which matched this document.
att
- Attribute for which the value is requested.public java.util.Collection getGroups()
|
Oracle Ultra Search Java API Reference 9.0.3 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |