net.sf.ant4eclipse.lang.xquery
Class XQuery

java.lang.Object
  extended by net.sf.ant4eclipse.lang.xquery.XQuery

public class XQuery
extends java.lang.Object

This object stores a simple query used to access XML content. These queries will be visited by the SAXParser, so they can collect their values. The query will be visited each time the ContentHandler of the SAXParser processes an element. The query ignores these calls in case it is related to a higher level within the XML hierarchie or it has been abandoned within a higher level.


Method Summary
 java.lang.String[] getResult()
          Returns the data collected by this query.
 java.lang.String getSingleResult()
          Returns the data collected by this query.
 boolean gotResult()
          Returns true if at least one result is available.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getResult

public java.lang.String[] getResult()
Returns the data collected by this query.

Returns:
The data collected by this query (Vector{String})

getSingleResult

public java.lang.String getSingleResult()
                                 throws XQueryException
Returns the data collected by this query. If no or one result were found, this method returns null or the result. If more than one result were found, an XQueryException will be thrown.

Returns:
The data collected by this query (String)
Throws:
XQueryException

gotResult

public boolean gotResult()
Returns true if at least one result is available.

Returns:
true <=> At least one result is available.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object