|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oodt.xmlquery.Result
public class Result
A single result. An object of this class is a result of a query.
| Field Summary | |
|---|---|
protected static Map |
codecs
Mapping of MIME type to codec. |
protected String |
id
The identification of this result. |
static long |
INFINITE
Sentinel value for validity that indicates a product never expires. |
protected String |
mimeType
The MIME type. |
protected Retriever |
retriever
Object to retrieve this product's data. |
protected Object |
value
The result instance. |
| Constructor Summary | |
|---|---|
Result()
Create a new, blank result. |
|
Result(Node node)
Create a result from a DOM node. |
|
Result(String id,
Object value)
Create a result. |
|
Result(String id,
String mimeType,
String profileID,
String resourceID,
List headers,
Object value)
Create a more fully specified result that's not classified and lasts forever. |
|
Result(String id,
String mimeType,
String profileID,
String resourceID,
List headers,
Object value,
boolean classified,
long validity)
Create a fully specified result. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
equals(Object rhs)
|
List |
getHeaders()
Get the headers. |
String |
getID()
Get the result ID. |
InputStream |
getInputStream()
Get an input stream version of the result's value. |
String |
getMimeType()
Get the MIME type of this result. |
String |
getProfileID()
Get the profile ID. |
String |
getResourceID()
Get the resource ID. |
long |
getSize()
Get the size of this product. |
URI |
getURIID()
|
long |
getValidity()
Get how long this product is valid. |
Object |
getValue()
Deprecated. This method requires the caller to know the return type and to downcast to it; further, the result may be too large to contain in memory. Use getInputStream() instead to perform stream processing on product data. |
int |
hashCode()
|
boolean |
isClassified()
Is this result classified? |
void |
setClassified(boolean classified)
Set whether this result is classified. |
void |
setID(String id)
Set the result ID. |
void |
setMimeType(String mimeType)
Set the MIME type of this result. |
void |
setProfileID(String profileID)
Set the profile ID. |
void |
setResourceID(String resourceID)
Set the resource ID. |
void |
setRetriever(Retriever retriever)
|
void |
setValidity(long validity)
Set the time this product is valid. |
void |
setValue(Object value)
Set the result's value. |
String |
toString()
|
Node |
toXML(Document doc)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String id
protected String mimeType
protected Object value
protected static Map codecs
protected transient Retriever retriever
public static final long INFINITE
| Constructor Detail |
|---|
public Result()
public Result(String id,
Object value)
id - Identification of this result.value - The result.
public Result(String id,
String mimeType,
String profileID,
String resourceID,
List headers,
Object value)
id - Identification of this result.mimeType - MIME Type.profileID - ID of the resource profile where this result originated.resourceID - ID of the resource where this result originated.headers - A header elements, describing the result.value - The result.
public Result(String id,
String mimeType,
String profileID,
String resourceID,
List headers,
Object value,
boolean classified,
long validity)
id - Identification of this result.mimeType - MIME Type.profileID - ID of the resource profile where this result originated.resourceID - ID of the resource where this result originated.headers - A header elements, describing the result.value - The result.classified - True if this result is secret, false otherwise.validity - Time for how long this product is valid in milliseconds or INFINITE.public Result(Node node)
node - The DOM node, which must be a <resultElement> element.| Method Detail |
|---|
public String getID()
public URI getURIID()
public String getMimeType()
public String getProfileID()
public String getResourceID()
public List getHeaders()
Headers describing the result.public Object getValue()
getInputStream() instead to perform stream processing on product data.
public void setID(String id)
id - The identification of this result.public void setMimeType(String mimeType)
mimeType - The MIME type.public void setProfileID(String profileID)
profileID - The ID of the resource profile where this result originated.public void setResourceID(String resourceID)
resourceID - The ID of the resource where this result originated.public void setValue(Object value)
value - The result instance.public long getSize()
public Node toXML(Document doc)
throws DOMException
toXML in interface DocumentableDOMException
public InputStream getInputStream()
throws IOException
InputStream value.
IOException - if an error occurs.public boolean isClassified()
public void setClassified(boolean classified)
classified - a boolean value.public long getValidity()
INFINITE.public void setValidity(long validity)
validity - Time in milliseconds or INFINITE.public int hashCode()
hashCode in class Objectpublic boolean equals(Object rhs)
equals in class Objectpublic Object clone()
clone in class Objectpublic void setRetriever(Retriever retriever)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||