Package org.eclipse.bpel.model

Examples of org.eclipse.bpel.model.From


      copyElement.setAttribute("keepSrcElementName", BPELUtils.boolean2XML(copy.getKeepSrcElementName()));
   
    if (copy.isSetIgnoreMissingFromData())
      copyElement.setAttribute("ignoreMissingFromData", BPELUtils.boolean2XML(copy.getIgnoreMissingFromData()));

    From from = copy.getFrom();
    if (from != null) {
      Element fromElement = createBPELElement("from");
      from2XML(from,fromElement);
      copyElement.appendChild(fromElement);
    }
View Full Code Here


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setFrom(From newFrom) {
    From oldFrom = from;
    from = newFrom;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, BPELPackage.TO_PART__FROM, oldFrom, from));
  }
View Full Code Here

        if (result == null) result = caseWSDLElement(to);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case BPELPackage.FROM: {
        From from = (From)theEObject;
        Object result = caseFrom(from);
        if (result == null) result = caseExtensibleElement(from);
        if (result == null) result = caseExtensibleElement_1(from);
        if (result == null) result = caseWSDLElement(from);
        if (result == null) result = defaultCase(theEObject);
View Full Code Here

      QName qname = new QName(element.getTargetNamespace(), element.getName());
      variableElement.setAttribute("element", bpelNamespacePrefixManager.qNameToString(variable, qname));
    }   

    // from-spec
    From from = variable.getFrom();
    if (from != null) {
      Element fromElement = createBPELElement("from");
      from2XML(from, fromElement);
      variableElement.appendChild(fromElement);
    }
View Full Code Here

      XSDElementDeclaration el = constructorArgElementMap.get(argIndex);
      if (el != null){
        scan(arg);
        ASTNodeData argData = nodeDataStack.peek();
       
        From from = BPELFactory.eINSTANCE.createFrom();
        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());
View Full Code Here

          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);
          }
          //from.setLiteral(rhsData.xpathExpr.evaluate());         
         
          Copy copy = BPELFactory.eINSTANCE.createCopy();
          copy.setTo(to);
View Full Code Here

        invocationData.xpathExpr = targetNodeData.xpathExpr;
        if (invocation.getArguments().size() == 1){
          scan(invocation.getArguments().get(0));
          ASTNodeData argData = nodeDataStack.peek();
          if (argData.xpathExpr != null){
            From from = BPELFactory.eINSTANCE.createFrom();
            if (argData.xpathLiteralExpr != null){
              Expression expr = BPELFactory.eINSTANCE.createExpression();         
              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();
View Full Code Here

        variable.setType(typeNodeData.xsdType);
      localVarData.scopeStack.peek().addVariable(variable);
      localVarData.variable = variable;
     
      if (localVariable.getDefaultExpression() != null){
        From from = BPELFactory.eINSTANCE.createFrom();
        To to = BPELFactory.eINSTANCE.createTo();
        Copy copy = BPELFactory.eINSTANCE.createCopy();
        Assign assign = BPELFactory.eINSTANCE.createAssign();
       
        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;
          break action;
View Full Code Here

      if (operandNodeData.variable != null && operandNodeData.xpathExpr != null){
      // create temp variable
        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);
         
          Copy copy = BPELFactory.eINSTANCE.createCopy();
View Full Code Here

    scan(processMethod);
  }
  <T> void setFieldDefaultValue(CtField<T> f, XpathExpression expr){
    Variable variable = fieldVariableMap.get(f);
    if (variable != null && expr != null){
      From from = BPELFactory.eINSTANCE.createFrom();
      String val = expr.evaluate();
      from.setLiteral(val);
      //if (!val.contains("<") && !val.contains(">"))
        from.setUnsafeLiteral(true); // is this really necessary?
      variable.setFrom(from);
    }
  }
View Full Code Here

TOP

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

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.