Interface XQuery


public interface XQuery
  • Method Details

    • isValid

      boolean isValid() throws RaptorXMLException
      Validates the XQuery file
      Throws:
      RaptorXMLException
    • isValidUpdate

      boolean isValidUpdate() throws RaptorXMLException
      Validates the XQueryUpdate file
      Throws:
      RaptorXMLException
    • execute

      boolean execute(String outputFile) throws RaptorXMLException
      Execute and save the result to file. In case of an error, use function getLastErrorMessage() to get additional information.
      Parameters:
      outputFile - path to result file
      Returns:
      true on success, false on failure
      Throws:
      RaptorXMLException
    • executeUpdate

      boolean executeUpdate(String outputFile) throws RaptorXMLException
      Execute XQueryUpdate and save the result to file. In case of an error, use function getLastErrorMessage() to get additional information.
      Parameters:
      outputFile - path to result file
      Returns:
      true on success, false on failure
      Throws:
      RaptorXMLException
    • executeAndGetResultAsString

      String executeAndGetResultAsString() throws RaptorXMLException
      Execute and return the result as string. In case of an error, use function getLastErrorMessage() to get additional information.
      Returns:
      result as string.
      Throws:
      RaptorXMLException
    • executeUpdateAndGetResultAsString

      String executeUpdateAndGetResultAsString() throws RaptorXMLException
      Execute XQueryUpdate and return the result as string. In case of an error, use function getLastErrorMessage() to get additional information.
      Returns:
      result as string.
      Throws:
      RaptorXMLException
    • setVersion

      void setVersion(XQuery.ENUMXQueryVersion version)
      Set the XQuery version
      Parameters:
      version - The version: 1.0 or 3.0
    • setXqueryUpdateVersion

      void setXqueryUpdateVersion(XQuery.ENUMXQueryVersion version)
      Set the XQuery Update Facility version
      Parameters:
      version - The version: 1.0 or 3.0
    • setXQueryFileName

      void setXQueryFileName(String queryFile)
      Set file name of the XQuery document.
      Parameters:
      queryFile - an absolute URL giving the base location of the XQuery file
    • setInputXMLFileName

      void setInputXMLFileName(String xmlFile)
      Set the file name for the input XML data. Please note that you have to use absolute URLs.
      Parameters:
      xmlFile - an absolute URL giving the base location of the XML data
    • setXQueryFromText

      void setXQueryFromText(String queryText)
      Set the text value for the XQuery statement.
      Parameters:
      queryText - a string containing the XQuery statement
    • setInputXMLFromText

      void setInputXMLFromText(String xmlText)
      Set the text value for the input XML data. Please note that you have to use absolute URLs.
      Parameters:
      xmlText - a string containing XML data
    • setOutputEncoding

      void setOutputEncoding(String encoding)
      Set the encoding for the result document.
      Parameters:
      encoding - a string containing an encoding name (for example: UTF-8, UTF-16, ASCII, 8859-1, 1252 )
    • setOutputIndent

      void setOutputIndent(boolean indent)
      Enable/disable the indentation option for the result document.
    • setOutputMethod

      void setOutputMethod(String outputMethod)
      Set the serialization method for the result document.
      Parameters:
      outputMethod - a string containing the serialization method. Valid values: xml, xhtml, html, text.
    • setOutputOmitXMLDeclaration

      void setOutputOmitXMLDeclaration(boolean omit)
      Enable/disable the serialization option omitXMLDeclaration for the result document.
    • addExternalVariable

      void addExternalVariable(String name, String value)
      Add name and value for an external variable.
      Parameters:
      name - a valid QName as the variable name
      value - value for the variable - value which will be evaluated as a string
    • clearExternalVariableList

      void clearExternalVariableList()
      Clear the list of external variables.
    • setDotNetExtensionsEnabled

      void setDotNetExtensionsEnabled(boolean enable)
      Enable or disable the .NET extensions.
      Parameters:
      enable - 'true' to enable, 'false' otherwise
    • setJavaExtensionsEnabled

      void setJavaExtensionsEnabled(boolean enable)
      Enable or disable the Java extensions.
      Parameters:
      enable - 'true' to enable, 'false' otherwise
    • setChartExtensionsEnabled

      void setChartExtensionsEnabled(boolean enable)
      Enable or disable the chart extensions.
      Parameters:
      enable - 'true' to enable, 'false' otherwise
    • getLastErrorMessage

      String getLastErrorMessage()
      Get the last error message from the engine.
      Returns:
      last error message
    • setXSDVersion

      void setXSDVersion(XMLValidator.ENUMXSDVersion version)
      XSD specification version
      Parameters:
      version - Version to be used by the validation engine
    • setXincludeSupport

      void setXincludeSupport(boolean support)
      Enable/disable xinclude support
    • setXMLValidationMode

      void setXMLValidationMode(XMLValidator.ENUMXMLValidationMode mode)
      Processing mode
      Parameters:
      mode - XML Validation mode to be used by the validation engine
    • setIndentCharacters

      void setIndentCharacters(String chars)
      Characters used for indentation.
    • setLoadXMLWithPSVI

      void setLoadXMLWithPSVI(boolean load)
      Enable/disable loading XML with PSVI
    • setXMLValidationErrorAsWarning

      void setXMLValidationErrorAsWarning(boolean treat)
      Enable/disable treating XML validation errors as warnings
    • setUpdatedXMLWriteMode

      void setUpdatedXMLWriteMode(XQuery.ENUMXQueryUpdatedXML mode)
      Set the write mode of the XQueryUpdate functionality (to be used only for XQueryUpdate executions)
    • setKeepFormatting

      void setKeepFormatting(boolean keep)
      Enable or disable the keeping of formatting on the output (to be used only for XQueryUpdate executions)