Examples of ResponseModule


Examples of org.exist.xquery.functions.response.ResponseModule

        catch( final IOException e ) {
            throw( new XPathException( this, "the file does not see to be a valid backup archive" ) );
        }

        // directly stream the backup contents to the HTTP response
        final ResponseModule myModule = (ResponseModule)context.getModule( ResponseModule.NAMESPACE_URI );

        // response object is read from global variable $response
        final Variable       respVar  = myModule.resolveVariable( ResponseModule.RESPONSE_VAR );

        if( respVar == null ) {
            throw( new XPathException( this, "No response object found in the current XQuery context." ) );
        }
View Full Code Here

Examples of org.exist.xquery.functions.response.ResponseModule

        }
        else
        {
          //transform:stream-transform()
         
            final ResponseModule myModule = (ResponseModule)context.getModule(ResponseModule.NAMESPACE_URI);
            // response object is read from global variable $response
            final Variable respVar = myModule.resolveVariable(ResponseModule.RESPONSE_VAR);
            if(respVar == null)
                {throw new XPathException(this, "No response object found in the current XQuery context.");}
            if(respVar.getValue().getItemType() != Type.JAVA_OBJECT)
                {throw new XPathException(this, "Variable $response is not bound to an Java object.");}
            final JavaObjectValue respValue = (JavaObjectValue)
View Full Code Here

Examples of org.exist.xquery.functions.response.ResponseModule

  public Sequence eval(
    Sequence args[],
    Sequence contextSequence)
    throws XPathException {
   
    final ResponseModule myModule = (ResponseModule)context.getModule(ResponseModule.NAMESPACE_URI);
     
    // request object is read from global variable $response
    final Variable var = myModule.resolveVariable(ResponseModule.RESPONSE_VAR);
    if(var == null || var.getValue() == null) {
      throw new XPathException(this, "No request object found in the current XQuery context.");
    }
    if(var.getValue().getItemType() != Type.JAVA_OBJECT) {
      throw new XPathException(this, "Variable $response is not bound to an Java object.");
View Full Code Here

Examples of org.exist.xquery.functions.response.ResponseModule

        }
      }
      LOG.debug("mostRecentDocumentTime: " + mostRecentDocumentTime);

      if (mostRecentDocumentTime > 0) {
        final ResponseModule myModule = (ResponseModule) context
            .getModule(ResponseModule.NAMESPACE_URI);
        if (myModule == null)
          {return;}
        // response servlet object is read from global variable $response
        final Variable var = myModule.resolveVariable(ResponseModule.RESPONSE_VAR);
       
        if (var != null && var.getValue() != null) {
          final JavaObjectValue value = (JavaObjectValue) var.getValue()
              .itemAt(0);
          if (value != null
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.