Package org.exist.xquery

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


          // For backward compatibility
          context.declareVariable(bindingPrefix + "eventType", EVENT_TYPE_PREPARE);
          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 + "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

          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) {
        TriggerStatePerThread.setTriggerRunningState(TriggerStatePerThread.NO_TRIGGER_RUNNING, this, null);
        TriggerStatePerThread.setTransaction(null);
View Full Code Here

        try {
          //compile the XQuery
          compiledQuery = service.compile(context, query);
         
          //declare external variables
          context.declareVariable(bindingPrefix + "type", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "event", new StringValue(eventToString(event)));
         
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src));}
          else
View Full Code Here

          //compile the XQuery
          compiledQuery = service.compile(context, query);
         
          //declare external variables
          context.declareVariable(bindingPrefix + "type", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "event", new StringValue(eventToString(event)));
         
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src));}
          else
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src.removeLastSegment()));}
View Full Code Here

          //declare external variables
          context.declareVariable(bindingPrefix + "type", EVENT_TYPE_FINISH);
          context.declareVariable(bindingPrefix + "event", new StringValue(eventToString(event)));
         
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src));}
          else
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src.removeLastSegment()));}
       
          context.declareVariable(bindingPrefix + "uri", new AnyURIValue(src));
          if (dst == null)
View Full Code Here

          context.declareVariable(bindingPrefix + "event", new StringValue(eventToString(event)));
         
          if (isCollection)
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src));}
          else
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src.removeLastSegment()));}
       
          context.declareVariable(bindingPrefix + "uri", new AnyURIValue(src));
          if (dst == null)
            {context.declareVariable(bindingPrefix + "new-uri", Sequence.EMPTY_SEQUENCE);}
          else
View Full Code Here

          if (isCollection)
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src));}
          else
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src.removeLastSegment()));}
       
          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));}
         
View Full Code Here

          else
            {context.declareVariable(bindingPrefix + "collection", new AnyURIValue(src.removeLastSegment()));}
       
          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);
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.