Package org.exist.xquery

Examples of org.exist.xquery.XQueryContext.declareVariable()


       
          context.declareVariable(bindingPrefix + "uri", new AnyURIValue(src));
          if (dst == null)
            {context.declareVariable(bindingPrefix + "new-uri", Sequence.EMPTY_SEQUENCE);}
          else
            {context.declareVariable(bindingPrefix + "new-uri", new AnyURIValue(dst));}
         
          // For backward compatibility
          context.declareVariable(bindingPrefix + "eventType", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "triggerEvent", new StringValue(eventToString(event)));
          if (isCollection)
View Full Code Here


            {context = compiled.getContext();}
        //context.setBackwardsCompatibility(xpathCompatible);
        context.setStaticallyKnownDocuments(docs);

        if (variableDecls.containsKey(Debuggee.PREFIX+":session")) {
          context.declareVariable(Debuggee.SESSION, variableDecls.get(Debuggee.PREFIX+":session"));
          variableDecls.remove(Debuggee.PREFIX+":session");
        }

        setupContext(source, context);
       
View Full Code Here

            {context.declareVariable(bindingPrefix + "new-uri", Sequence.EMPTY_SEQUENCE);}
          else
            {context.declareVariable(bindingPrefix + "new-uri", new AnyURIValue(dst));}
         
          // For backward compatibility
          context.declareVariable(bindingPrefix + "eventType", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "triggerEvent", new StringValue(eventToString(event)));
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src));}
          else {
            context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src.removeLastSegment()));
View Full Code Here

          else
            {context.declareVariable(bindingPrefix + "new-uri", new AnyURIValue(dst));}
         
          // For backward compatibility
          context.declareVariable(bindingPrefix + "eventType", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "triggerEvent", new StringValue(eventToString(event)));
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src));}
          else {
            context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src.removeLastSegment()));
            context.declareVariable(bindingPrefix + "documentName", new AnyURIValue(src));
View Full Code Here

         
          // For backward compatibility
          context.declareVariable(bindingPrefix + "eventType", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "triggerEvent", new StringValue(eventToString(event)));
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src));}
          else {
            context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src.removeLastSegment()));
            context.declareVariable(bindingPrefix + "documentName", new AnyURIValue(src));
          }
         
View Full Code Here

          context.declareVariable(bindingPrefix + "eventType", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "triggerEvent", new StringValue(eventToString(event)));
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src));}
          else {
            context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src.removeLastSegment()));
            context.declareVariable(bindingPrefix + "documentName", new AnyURIValue(src));
          }
         
          //declare user defined parameters as external variables
          for(final Iterator itUserVarName = userDefinedVariables.keySet().iterator(); itUserVarName.hasNext();)
View Full Code Here

          context.declareVariable(bindingPrefix + "triggerEvent", new StringValue(eventToString(event)));
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src));}
          else {
            context.declareVariable(bindingPrefix + "collectionName", new AnyURIValue(src.removeLastSegment()));
            context.declareVariable(bindingPrefix + "documentName", new AnyURIValue(src));
          }
         
          //declare user defined parameters as external variables
          for(final Iterator itUserVarName = userDefinedVariables.keySet().iterator(); itUserVarName.hasNext();)
          {
View Full Code Here

          for(final Iterator itUserVarName = userDefinedVariables.keySet().iterator(); itUserVarName.hasNext();)
          {
            final String varName = (String)itUserVarName.next();
            final String varValue = userDefinedVariables.getProperty(varName);
         
            context.declareVariable(bindingPrefix + varName, new StringValue(varValue));
          }
         
        } catch(final XPathException e) {
          //Should never be reached
          LOG.error(e);
View Full Code Here

          //declare user defined parameters as external variables
          for(final Iterator itUserVarName = userDefinedVariables.keySet().iterator(); itUserVarName.hasNext();) {
            final String varName = (String)itUserVarName.next();
            final String varValue = userDefinedVariables.getProperty(varName);
         
            context.declareVariable(bindingPrefix + varName, new StringValue(varValue));
          }
         
          //reset & prepareForExecution for execution
          compiledQuery.reset();
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.