Package org.eclipse.bpel.model

Examples of org.eclipse.bpel.model.Query


      String qnameStr = bpelNamespacePrefixManager.qNameToString(from, getQName(property));
      fromElement.setAttribute("property", qnameStr);
    }

    if (from.getQuery() != null) {
      Query query = from.getQuery();
      Element queryElement = createBPELElement("query");
      if (query.getQueryLanguage() != null) {
        queryElement.setAttribute("queryLanguage", query.getQueryLanguage());
      }
      if (query.getValue() != null) {
        CDATASection cdata = BPELUtils.createCDATASection(document, query.getValue());
        queryElement.appendChild(cdata);
      }
      fromElement.appendChild(queryElement);
    }
   
View Full Code Here


      String qnameStr = bpelNamespacePrefixManager.qNameToString(to, getQName(property));
      toElement.setAttribute("property", qnameStr);
    }

    if (to.getQuery() != null) {
      Query query = to.getQuery();
      Element queryElement = createBPELElement("query");
      if (query.getQueryLanguage() != null) {
        queryElement.setAttribute("queryLanguage", query.getQueryLanguage());
      }
      if (query.getValue() != null) {
        CDATASection cdata = BPELUtils.createCDATASection(document, query.getValue());
        queryElement.appendChild(cdata);
      }
      toElement.appendChild(queryElement);
    }
    // serialize local namespace prefixes to XML
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetQuery(Query newQuery, NotificationChain msgs) {
    Query oldQuery = query;
    query = newQuery;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BPELPackage.TO__QUERY, oldQuery, newQuery);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetQuery(Query newQuery, NotificationChain msgs) {
    Query oldQuery = query;
    query = newQuery;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BPELPackage.FROM__QUERY, oldQuery, newQuery);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

        if (result == null) result = caseWSDLElement(sources);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case BPELPackage.QUERY: {
        Query query = (Query)theEObject;
        Object result = caseQuery(query);
        if (result == null) result = caseWSDLElement(query);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
View Full Code Here

        if (argData.xpathLiteralExpr != null){
          Expression expr = BPELFactory.eINSTANCE.createExpression();
          expr.setBody(argData.xpathLiteralExpr.evaluate());
          from.setExpression(expr);       
        } else if (argData.variable != null && argData.xpathExpr != null){
          Query query = BPELFactory.eINSTANCE.createQuery();
          query.setQueryLanguage(XPATH_NAMESPACE);
          query.setValue(argData.xpathExpr.evaluate());
          from.setVariable(argData.variable);
        }
       
        Query toQuery = BPELFactory.eINSTANCE.createQuery();
        toQuery.setQueryLanguage(XPATH_NAMESPACE);
        toQuery.setValue("/" + schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getName());
       
        To to = BPELFactory.eINSTANCE.createTo();
        to.setVariable(variable);
        to.setQuery(toQuery);
       
View Full Code Here

        if (rhsData.xpathLiteralExpr != null){
          Assign assign = BPELFactory.eINSTANCE.createAssign();
          assignmentData.activity = assign;         
         
          To to = BPELFactory.eINSTANCE.createTo();   
          Query toQuery = BPELFactory.eINSTANCE.createQuery();
          toQuery.setQueryLanguage(XPATH_NAMESPACE);
          toQuery.setValue(lhsData.xpathExpr.evaluate());
          to.setQuery(toQuery);
          to.setVariable(lhsData.variable);
         
          From from = BPELFactory.eINSTANCE.createFrom();
          Expression expr = BPELFactory.eINSTANCE.createExpression();
          expr.setBody(rhsData.xpathLiteralExpr.evaluate());
          from.setExpression(expr);
          //from.setLiteral(rhsData.xpathLiteralExpr.evaluate());
          from.setVariable(rhsData.variable);
         
          Copy copy = BPELFactory.eINSTANCE.createCopy();
          copy.setTo(to);
          copy.setFrom(from);
          assign.getCopy().add(copy);
          assignmentData.activity = assign;
        } else if (rhsData.variable != null && rhsData.xpathExpr != null){
          Assign assign = BPELFactory.eINSTANCE.createAssign();
          assignmentData.activity = assign;         
         
          To to = BPELFactory.eINSTANCE.createTo();   
          Query toQuery = BPELFactory.eINSTANCE.createQuery();
          toQuery.setQueryLanguage(XPATH_NAMESPACE);
          toQuery.setValue(lhsData.xpathExpr.evaluate());
          to.setQuery(toQuery);
          to.setVariable(lhsData.variable);
         
          From from = BPELFactory.eINSTANCE.createFrom();
          if (rhsData.variable != null){
            from.setVariable(rhsData.variable);
            Query fromQuery = BPELFactory.eINSTANCE.createQuery();
            fromQuery.setQueryLanguage(XPATH_NAMESPACE);
            fromQuery.setValue(rhsData.xpathExpr.evaluate());
            from.setQuery(fromQuery);
          } else {
            Expression expr = BPELFactory.eINSTANCE.createExpression();         
            expr.setBody(rhsData.xpathExpr.evaluate());
            from.setExpression(expr);
View Full Code Here

              expr.setBody(argData.xpathLiteralExpr.evaluate());
              from.setExpression(expr);
              //from.setLiteral(argData.xpathExpr.evaluate());
            } else if (argData.variable != null){
              from.setVariable(argData.variable);
              Query fromQuery = BPELFactory.eINSTANCE.createQuery();
              fromQuery.setValue(argData.xpathExpr.evaluate());
              fromQuery.setQueryLanguage(XPATH_NAMESPACE);
              from.setQuery(fromQuery);
            } else {
              Expression expr = BPELFactory.eINSTANCE.createExpression();         
              expr.setBody(argData.xpathExpr.evaluate());
              from.setExpression(expr);
            }
            //from.setLiteral(argData.xpathExpr.evaluate());
           
            To to = BPELFactory.eINSTANCE.createTo();   
            Query toQuery = BPELFactory.eINSTANCE.createQuery();
            toQuery.setValue(invocationData.xpathExpr.evaluate());
            toQuery.setQueryLanguage(XPATH_NAMESPACE);
            to.setQuery(toQuery);
            to.setVariable(invocationData.variable);             
           
            Copy copy = BPELFactory.eINSTANCE.createCopy();
            copy.setTo(to);
View Full Code Here

        if (defExprData.xpathLiteralExpr != null){
          Expression expr = BPELFactory.eINSTANCE.createExpression();
          expr.setBody(defExprData.xpathLiteralExpr.evaluate());
          from.setExpression(expr);       
        } else if (defExprData.variable != null && defExprData.xpathExpr != null){
          Query query = BPELFactory.eINSTANCE.createQuery();
          query.setQueryLanguage(XPATH_NAMESPACE);
          query.setValue(defExprData.xpathExpr.evaluate());
          from.setVariable(defExprData.variable);
        } else if (defExprData.isExceptionType && defExprData.constructor != null){
          createNewException(assign,variable,defExprData.constructorArgElementMap,defExprData.constructorArgs);
          localVarData.scopeStack.peek().addActivity(assign);
          localVarData.activity = assign;
View Full Code Here

        Variable tmpVar = createTempVariable(unaryOperatorContext.scopeStack,typeNodeData.xsdType);
       
      // assign real variable value to temp variable
        From from = BPELFactory.eINSTANCE.createFrom();
        from.setVariable(operandNodeData.variable);
        Query fromQuery = BPELFactory.eINSTANCE.createQuery();
        fromQuery.setQueryLanguage(XPATH_NAMESPACE);
        fromQuery.setValue(operandNodeData.xpathExpr.evaluate());
        from.setQuery(fromQuery);
       
        To to = BPELFactory.eINSTANCE.createTo();
        to.setVariable(tmpVar);
       
        Copy copy = BPELFactory.eINSTANCE.createCopy();
        copy.setTo(to);
        copy.setFrom(from);
        Assign assign = BPELFactory.eINSTANCE.createAssign();
        assign.getCopy().add(copy);
       
      // add assignment activty to curr scope
        operandNodeData.scopeStack.peek().addActivity(assign);
     
      // increment real variable
        try {
          xpathBinOperation.setLeftSide(operandNodeData.xpathExpr);
          xpathBinOperation.setOperator(xpathBinOpMap.getBinOp(binOp));
          xpathBinOperation.setRightSide(xpathNumberOne);
         
          from = BPELFactory.eINSTANCE.createFrom();
          from.setVariable(operandNodeData.variable);
          fromQuery = BPELFactory.eINSTANCE.createQuery();
          fromQuery.setQueryLanguage(XPATH_NAMESPACE);
          fromQuery.setValue(xpathBinOperation.evaluate());
          from.setQuery(fromQuery);
         
          to = BPELFactory.eINSTANCE.createTo();
          to.setVariable(operandNodeData.variable);
         
          copy = BPELFactory.eINSTANCE.createCopy();
          copy.setTo(to);
          copy.setFrom(from);
          assign = BPELFactory.eINSTANCE.createAssign();
          assign.getCopy().add(copy);
     
      // add increment activity to curr scope
          operandNodeData.scopeStack.peek().addActivity(assign);
     
      // set variable reference = temp variable
          operandNodeData.variable = tmpVar;
          XpathVariableRefExpression xpathVarRef = xpathFactory.createVariableReference();
          xpathVarRef.setVariableName(tmpVar.getName());
          xpathVarRef.setType(typeNodeData.xsdTypeQName);
          operandNodeData.xpathExpr = xpathVarRef;
         
        } catch (Exception e) {}
     
      }
      break;
     
    case PREDEC:
    case PREINC:
      if (operator.getKind().equals(UnaryOperatorKind.PREDEC))
        binOp = BinaryOperatorKind.MINUS;
      else
        binOp = BinaryOperatorKind.PLUS;
      if (operandNodeData.variable != null && operandNodeData.xpathExpr != null){
      // increment variable
        try {
          xpathBinOperation.setLeftSide(operandNodeData.xpathExpr);
          xpathBinOperation.setOperator(xpathBinOpMap.getBinOp(binOp));
          xpathBinOperation.setRightSide(xpathNumberOne);
         
          From from = BPELFactory.eINSTANCE.createFrom();
          from.setVariable(operandNodeData.variable);
          Query fromQuery = BPELFactory.eINSTANCE.createQuery();
          fromQuery.setQueryLanguage(XPATH_NAMESPACE);
          fromQuery.setValue(xpathBinOperation.evaluate());
          from.setQuery(fromQuery);
         
          To to = BPELFactory.eINSTANCE.createTo();
          to.setVariable(operandNodeData.variable);
         
View Full Code Here

TOP

Related Classes of org.eclipse.bpel.model.Query

Copyright © 2018 www.massapicom. 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.