com.raritantechnologies.marklogic
Class MarkLogicQueryParser
java.lang.Object
com.raritantechnologies.xml.xQuery.XQueryParser
com.raritantechnologies.marklogic.MarkLogicQueryParser
- All Implemented Interfaces:
- IConfigurable, IQueryParser
- public class MarkLogicQueryParser
- extends XQueryParser
Creates a MarkLogic compatible XQuery String from a query input map.
XML Configuration Template:
<QueryParser class="com.raritantechnologies.xml.xPath.XQueryParser"
xQueryField="[ parameter field that gets the computed XQuery String ]" >
<!-- One or more UseXQueryTemplate tags: -->
<UseXQueryTemplate>
<!-- Defines query or user parameters that will cause a specific XQuery template to be selected -->
<QueryParams isAnd="[ true | false ]" >
<Param name="[ name of query parameter ]" >
<ValidValues>
<Value>[ a valid value ]</Value>
<Value>[ another valid value ]</Value>
<!-- etc... -->
</ValidValues>
</Param>
<!-- Alternatively can use an IComparator -->
<Param name="[ name of query parameter ]" >
<Comparator class="[ class of com.raritantechnologies.utils.comparators.IComparator ]" >
</Comparator>
</Param>
</QueryParams>
<UserParams>
<Param name="[ name of User parameter ]" >
<ValidValues>
<Value>[ a valid value ]</Value>
<Value>[ another valid value ]</Value>
<!-- etc... -->
</ValidValues>
</Param>
<!-- Alternatively can use an IComparator -->
<Param name="[ name of User parameter ]" >
<Comparator class="[ class of com.raritantechnologies.utils.comparators.IComparator ]" >
</Comparator>
</Param>
</UserParams>
<XQueryTemplate >
<![CDATA[
XQuery Template - variables are inserted into {fieldiD} sections of the template.
]]>
</XQueryTemplate>
</UseXQueryTemplate>
<UseXQueryTemplate>
<!-- etc. . . -->
</UseXQueryTemplate>
</QueryParser>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAGING_SECTION
public static final java.lang.String PAGING_SECTION
- See Also:
- Constant Field Values
MarkLogicQueryParser
public MarkLogicQueryParser()
createQuery
public java.lang.String createQuery(OrderedMap params,
java.lang.String language,
ILoginInfo userInfo,
java.lang.String pagingSection)
throws QueryParseException,
UnsupportedLanguageException
- Throws:
QueryParseException
UnsupportedLanguageException
canParse
public boolean canParse(OrderedMap inputParameters,
java.lang.String language,
ILoginInfo userInfo)