|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.optimizationservices.oscommon.util.XQueryUtil
public class XQueryUtil
The XQueryUtil
class contains methods for performing
common basic XQuery-related operations used by various classes in the
Optimization Services (OS) framework.
Constructor Summary | |
---|---|
XQueryUtil(java.lang.String xqueryString,
java.lang.String xmlData,
boolean isFile)
constructor. |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
main for test purposes. |
static java.lang.String |
printQueryResult(java.util.List queryResult)
Print out the query result to a string for easy reading. |
java.util.List |
query(java.util.HashMap variables)
Use an XQuery string to query xml data. |
java.lang.String |
queryFirst(java.util.HashMap variables)
Use an XQuery string to query xml data and return the first found object in a string. |
static java.lang.String |
queryResultToString(java.util.List queryResult)
Convert a query result to a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XQueryUtil(java.lang.String xqueryString, java.lang.String xmlData, boolean isFile)
xqueryString
- holds the XQuery string that can be used to query xml data.xmlData
- holds the name of the xml data to be queried. If null, the xml data
will be located from within the xquery, i.e. the doc(...) section of xquery. The xmlData
can either be a file name or an actual string that holds the xml data.isFile
- holds whether the xmlData is a a file name or, otherwise (if false) an actual string
that holds the xml data.Method Detail |
---|
public java.util.List query(java.util.HashMap variables)
variables
- holds a hashmap of external variable name-value pairs to be fed into the the xquery.
java.util.List
. If there is an error querying, returns null.public java.lang.String queryFirst(java.util.HashMap variables)
variables
- holds a hashmap of external variable name-value paris to be fed into the the xquery.
java.util.List
. If there is an error querying, returns null.public static java.lang.String printQueryResult(java.util.List queryResult)
queryResult
- holds a list of query result in type java.util.List
.
public static java.lang.String queryResultToString(java.util.List queryResult)
queryResult
- holds a list of query result in type java.util.List
.
public static void main(java.lang.String[] args)
argv
- command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |