Examples of XmlElement


Examples of org.xmlpull.infoset.XmlElement

     * @see org.apache.airavata.wsmg.client.NotificationHandler#handleNotification(java.lang.String)
     */
    public void handleNotification(String message) {
        try {
            // String soapBody = WorkFlowUtils.getSoapBodyContent(message);
            XmlElement event = XMLUtil.stringToXmlElement(message);
            handleEvent(new EventData(event), true, this.workflow.getGraph());

            // } catch (XMLStreamException e) {
            // // Just log them because they can be unrelated messages sent to
            // // this topic by accident.
View Full Code Here

Examples of org.xmlpull.infoset.XmlElement

        }
      }

      String output = ((String) new ProvenanceReader(node, this.config.getTopic(), this.config.getAiravataAPI()).read());
      if (output != null) {
        XmlElement result = XMLUtil.stringToXmlElement(output);
        SystemComponentInvoker invoker = new SystemComponentInvoker();
        List<DataPort> outPorts = node.getOutputPorts();
        for (DataPort dataPort : outPorts) {

          Iterable itr = result.children();
          for (Object outputElem : itr) {
            if (outputElem instanceof XmlElement) {
              if (((XmlElement) outputElem).getName().equals(dataPort.getName())) {
                invoker.addOutput(dataPort.getName(), ((XmlElement) outputElem).children().iterator().next());
              }
View Full Code Here

Examples of org.xmlpull.infoset.XmlElement

              }
              if (!(node2 instanceof OutputNode)) {
                listOfValues.removeAll(listOfValues);
                String output = (String) systemInvoker.getOutput(node1.getOutputPort(0).getName());
                XmlElement xmlElement = XMLUtil.stringToXmlElement("<result>" + output + "</result>");
                Iterator iterator1 = xmlElement.children().iterator();
                while (iterator1.hasNext()) {
                  Object next1 = iterator1.next();
                  if (next1 instanceof XmlElement) {
                    listOfValues.add((String) ((XmlElement) next1).children().iterator().next());
                  }
View Full Code Here

Examples of org.xmlpull.infoset.XmlElement

          returnValForProvenance = ((GenericInvoker) workflowInvoker)
              .getOutputs();
          String message = returnValForProvenance.toString();

          XmlElement msgElmt = XmlConstants.BUILDER
              .parseFragmentFromString(message);
          Iterator children = msgElmt.children().iterator();
          while (children.hasNext()) {
            Object object = children.next();
            // foreachWSNode.getInputPort(0).getType()
            if (object instanceof XmlElement) {
              listOfValues.add(XmlConstants.BUILDER
                  .serializeToString(object));
              // TODO fix for simple type - Done
            }
          }
        } else if (workflowInvoker instanceof WorkflowInvokerWrapperForGFacInvoker) {
          String outputName = forEachInputNode.getOutputPort(0)
              .getName();
          returnValForProvenance = workflowInvoker
              .getOutput(outputName);
          org.xmlpull.v1.builder.XmlElement msgElmt = (org.xmlpull.v1.builder.XmlElement) returnValForProvenance;
          Iterator children = msgElmt.children();
          while (children.hasNext()) {
            Object object = children.next();
            if (object instanceof org.xmlpull.v1.builder.XmlElement) {
              org.xmlpull.v1.builder.XmlElement child = (org.xmlpull.v1.builder.XmlElement) object;
              Iterator valItr = child.children();
              if (valItr.hasNext()) {
                Object object2 = valItr.next();
                if (object2 instanceof String) {
                  listOfValues.add(object2.toString());
                }
              }
            }
          }
        } else if (workflowInvoker instanceof SystemComponentInvoker) {
          String outputName = forEachInputNode.getOutputPort(0)
              .getName();
          returnValForProvenance = workflowInvoker
              .getOutput(outputName);
          XmlElement msgElmt = XmlConstants.BUILDER
              .parseFragmentFromString("<temp>"
                  + returnValForProvenance + "</temp>");
          Iterator valItr = msgElmt.children().iterator();
          while (valItr.hasNext()) {
            Object object2 = valItr.next();
            if (object2 instanceof XmlElement) {
              listOfValues.add(((XmlElement) object2).children()
                  .iterator().next().toString());
View Full Code Here

Examples of org.xmlpull.infoset.XmlElement

      return ((InstanceNode) fromNode).getOutputInstanceId();
    } else if (fromNode instanceof EndForEachNode) {
      outputVal = "";
      Invoker workflowInvoker = invokerMap.get(fromNode);
      String outputName = fromNode.getOutputPort(0).getName();
      XmlElement msgElmt = XmlConstants.BUILDER
          .parseFragmentFromString("<temp>"
              + workflowInvoker.getOutput(outputName) + "</temp>");
      Iterator valItr = msgElmt.children().iterator();
      while (valItr.hasNext()) {
        Object object2 = valItr.next();
        if (object2 instanceof XmlElement) {
          outputVal = outputVal
              + ","
View Full Code Here

Examples of org.xmlpull.v1.builder.XmlElement

                QName type = ((WSIFMessageElement) this.inputMessage).getPartType(name);
                if (LEADTypes.isArrayType(type)) {
                    // split string into items using " " as separator
                    Pattern pattern = Pattern.compile("[,\\s]+");
                    String[] result = pattern.split((String) value);
                    XmlElement arrayEl = XmlConstants.BUILDER.newFragment(name);
                    for (int i = 0; i < result.length; i++) {
                        logger.debug("split=" + result[i]);
                        arrayEl.addElement("value").addChild(result[i]);
                    }
                    this.inputMessage.setObjectPart(name, arrayEl);
                    value = null; // no need to set string value below
                }
View Full Code Here

Examples of processing.xml.XMLElement

  public GLModel(PApplet parent, String filename) {
    initModelCommon(parent);
    this.parent = parent;

    filename = filename.replace('\\', '/');
    XMLElement xml = new XMLElement(parent, filename);

    loadXML(xml);
  }
View Full Code Here

Examples of se.despotify.util.XMLElement

    String xml = new String(data, Charset.forName("UTF-8"));
    if (log.isDebugEnabled()) {
      log.debug(xml);
    }
    XMLElement root = XML.load(xml);

    if (root.getElement().getNodeName().equals("artist")) {
      Artist.fromXMLElement(root, store);
      return true;
    } else {
      throw new DespotifyException("Root element is not named <artist>: " + root.getElement().getNodeName());
    }



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.