org.apache.oodt.xmlquery
Class QueryElement

java.lang.Object
  extended by org.apache.oodt.xmlquery.QueryElement
All Implemented Interfaces:
Serializable, Cloneable, Documentable

public class QueryElement
extends Object
implements Serializable, Cloneable, Documentable

A single query element. An object of this class is an element of a query.

TODO: Consider computing proper mime-type based on class of object being inserted as a value into the result.

Author:
Kelly
See Also:
Serialized Form

Constructor Summary
QueryElement()
          Create a blank query element.
QueryElement(Node node)
           
QueryElement(String role, String value)
          Create a query element.
 
Method Summary
 Object clone()
           
 boolean equals(Object rhs)
           
 String getRole()
          Get my role.
 String getValue()
          Get my value.
 int hashCode()
           
 void setRole(String role)
          Set my role.
 void setValue(String value)
          Set my value.
 String toString()
           
 Node toXML(Document doc)
          Document (aka serialize) this object into an XML DOM node.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryElement

public QueryElement()
Create a blank query element.


QueryElement

public QueryElement(String role,
                    String value)
Create a query element.

Parameters:
role - The role the element plays.
value - The value of the element.

QueryElement

public QueryElement(Node node)
Method Detail

getRole

public String getRole()
Get my role.

Returns:
The role this element plays.

getValue

public String getValue()
Get my value.

Returns:
The value of this element.

setRole

public void setRole(String role)
Set my role.

Parameters:
role - The new role this element plays.

setValue

public void setValue(String value)
Set my value.

Parameters:
value - The new value of this element.

toXML

public Node toXML(Document doc)
           throws DOMException
Description copied from interface: Documentable
Document (aka serialize) this object into an XML DOM node.

Specified by:
toXML in interface Documentable
Parameters:
doc - What document will own the node.
Returns:
This object as an XML DOM node.
Throws:
DOMException - If an error occurs while creating the DOM structure.

equals

public boolean equals(Object rhs)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Object clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2013
Apache OODT. All Rights Reserved.