In this section we will describe what methods your adapter (yourApiAdapter) must provide in order to work with the XQuery plugin. First of all it has to implement Adapter. This interface can be found in XQuery.jar which you will need if you're going to write an adapter. You can always take a look at the source code of the Saxon or Galax Adapter.
void setProperties(Properties props): The Properties parameter are the properties your adapter needs.
void loadContextFromFile(String path): The String parameter is the path to an XML Context file.
void loadContextFromString(String context): The String parameter is the XML Context.
void setBaseUri(String path): The String parameter is the path for a baseURI.
String evaluateFromString(String query): The String parameter is the complete XQuery expression. The String that is to be returned contains the result of the evaluation.
String evaluateFromFile(String path): The String parameter is the path to the file containing the XQuery expression. The String that is to be returned contains the result of the evaluation.
String getPerformance(): This function returns performance output as a String.
void setPerformanceEnabled(boolean enable): The boolean parameter enable enables or disables performance monitoring.
If one of these functions is not available then the XQueryplugin will throw an exception. If for example you do not wish to implement the ability to set the baseURI you till have to provide this method but it can be empty or give a message stating it is not implemented.