public class Result extends Object implements Serializable, Cloneable, Documentable
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Document (aka serialize) this object into an XML DOM node.
|
protected String id
protected String mimeType
protected Object value
protected static Map codecs
protected transient Retriever retriever
public static final long INFINITE
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.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
DocumentabletoXML in interface Documentabledoc - What document will own the node.DOMException - If an error occurs while creating the DOM structure.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 void setRetriever(Retriever retriever)
Copyright © 1999–2017 Apache OODT. All rights reserved.