Package org.xmlpull.infoset

Examples of org.xmlpull.infoset.XmlElement


     */
    public static String getLocation(XmlElement event) {
        if (event == null) {
            throw new IllegalArgumentException("null");
        }
        XmlElement locationEl = event.element(WOR_NS, LOCATION_TAG);
        if (locationEl != null) {
            String location = locationEl.requiredText();
            return location;
        } else {
            return null;
        }
    }
View Full Code Here


        EventType type = getType(event);
        if (type != EventType.RESOURCE_MAPPING) {
            throw new IllegalArgumentException(
                    "Event must have resourceMapping type instead of " + type);
        }
        XmlElement mappedResource = event.element(MAPPED_RESOURCE_TAG);
        String resource = mappedResource.requiredText();
        return resource;
    }
View Full Code Here

        EventType type = getType(event);
        if (type != EventType.RESOURCE_MAPPING) {
            throw new IllegalArgumentException(
                    "Event must have resourceMapping type instead of " + type);
        }
        XmlElement retryCountElement = event.element(RETRY_STATUS_COUNT_TAG);
        String retryCount = retryCountElement.requiredText();
        return retryCount;
    }
View Full Code Here

        if (!(type == EventType.WORKFLOW_INITIALIZED || type == EventType.WORKFLOW_TERMINATED)) {
            throw new IllegalArgumentException(
                    "Event must be an workflowInitialized type or an workflowTerminated type instead of "
                            + type);
        }
        XmlElement notificationSource = event.element(WOR_NS,
                NOTIFICATION_SOURCE_TAG);
        if (notificationSource == null) {
            throw new XBayaRuntimeException("The notification should have "
                    + NOTIFICATION_SOURCE_TAG + " element.");
        }
        String workflowInstanceID = notificationSource.attributeValue(WOR_NS,
                SERVICE_ID_ATTRIBUTE);
        if (workflowInstanceID == null) {
            throw new XBayaRuntimeException("The notification should have "
                    + SERVICE_ID_ATTRIBUTE + " attribute.");
        }
View Full Code Here

        this.workflow = workflow;
        this.templateID = this.workflow.getGPELTemplateID();

        // Add template ID to WSDL
        for (WsdlPortType portType : this.wsdl.portTypes()) {
            XmlElement templateIDElement = portType.xml().addElement(
                    GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            templateIDElement.setText(this.templateID.toString());
        }
    }
View Full Code Here

        super(wsdl, portTypeQName, operationName);
        try {
            // Get template ID from WSDL
            WsdlPortType portType = this.wsdl.getPortType(portTypeQName
                    .getLocalPart());
            XmlElement templateIDElement = portType.xml().element(
                    GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            String templateIDString = templateIDElement.requiredText();
            this.templateID = new URI(templateIDString);
        } catch (URISyntaxException e) {
            throw new ComponentException(e);
        }
    }
View Full Code Here

    }
    System.out.println(workflowTemplateId);
    String workflowString = this.xregistryClient.getOGCEResource(workflowTemplateId, XRegClientConstants.ResourceType.WorkflowTemplate.toString(), null);
    System.out.println(workflowString);

    XmlElement xwf = XMLUtil.stringToXmlElement(workflowString);
    Workflow workflow = new Workflow(xwf);
    return workflow;
  }
View Full Code Here

    try {
      if (this.xregistryClient == null) {
        connectToXRegistry();
      }
      String resource = this.xregistryClient.getResource(qname);
      XmlElement xwf = XMLUtil.stringToXmlElement(resource);
      // System.out.println(XmlConstants.BUILDER.serializeToStringPretty(xwf
      // ));
      Workflow workflow = new Workflow(xwf);
      return workflow;
    } catch (Exception e) {
View Full Code Here

    public static URI getWorkflowTemplateID(WsdlDefinitions definitions)
            throws ComponentException {
        try {
            // Get template ID from WSDL
            WsdlPortType portType = WSDLUtil.getFirstPortType(definitions);
            XmlElement templateIDElement = portType.xml().element(
                    GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            if (templateIDElement == null) {
                // Not a workflow
                return null;
            } else {
                String templateIDString = templateIDElement.requiredText();
                URI templateID = new URI(templateIDString);
                return templateID;
            }
        } catch (URISyntaxException e) {
            throw new ComponentException(e);
View Full Code Here

  public Workflow(String workflowString) throws GraphException,
      ComponentException {
    this();
    try {
      XmlElement workflowElement = XMLUtil
          .stringToXmlElement(workflowString);
      parse(workflowElement);
    } catch (RuntimeException e) {
      throw new GraphException(e);
    }
View Full Code Here

TOP

Related Classes of org.xmlpull.infoset.XmlElement

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.