Search in sources :

Example 61 with XmlElement

use of org.xmlpull.infoset.XmlElement in project airavata by apache.

the class ParameterNode method addConfigurationElement.

@Override
protected XmlElement addConfigurationElement(XmlElement nodeElement) {
    XmlElement configElement = nodeElement.addElement(GraphSchema.NS, GraphSchema.NODE_CONFIG_TAG);
    if (this.configured) {
        // Don't save the name here if this node has not been configured.
        XmlElement nameElement = configElement.addElement(GraphSchema.NS, NAME_TAG);
        nameElement.addChild(this.configuredName);
    }
    if (this.description != null) {
        XmlElement descriptionElement = configElement.addElement(GraphSchema.NS, DESCRIPTION_TAG);
        descriptionElement.addChild(this.description);
    }
    if (this.parameterType != null) {
        XmlElement qnameElement = configElement.addElement(GraphSchema.NS, DATA_TYPE_QNAME_TAG);
        qnameElement.addChild(this.parameterType.toString());
    }
    if (this.metadata != null) {
        XmlElement metadataElement = configElement.addElement(GraphSchema.NS, METADATA_TAG);
        // called multiple times.
        try {
            metadataElement.addChild(XMLUtil.deepClone(this.metadata));
        } catch (AiravataException e) {
            log.error(e.getMessage(), e);
        }
    }
    return configElement;
}
Also used : XmlElement(org.xmlpull.infoset.XmlElement) AiravataException(org.apache.airavata.common.exception.AiravataException)

Example 62 with XmlElement

use of org.xmlpull.infoset.XmlElement in project airavata by apache.

the class DoWhileNode method parseConfiguration.

@Override
protected void parseConfiguration(XmlElement configElement) {
    super.parseConfiguration(configElement);
    XmlElement element = configElement.element(null, XPATH_TAG_NAME);
    if (element != null) {
        this.xpath = element.requiredText();
    }
}
Also used : XmlElement(org.xmlpull.infoset.XmlElement)

Example 63 with XmlElement

use of org.xmlpull.infoset.XmlElement in project airavata by apache.

the class EndDoWhileNode method toXML.

@Override
protected XmlElement toXML() {
    XmlElement nodeElement = super.toXML();
    nodeElement.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_ENDDOWHILE);
    return nodeElement;
}
Also used : XmlElement(org.xmlpull.infoset.XmlElement)

Example 64 with XmlElement

use of org.xmlpull.infoset.XmlElement in project airavata by apache.

the class IfNode method toXML.

@Override
protected XmlElement toXML() {
    XmlElement nodeElement = super.toXML();
    nodeElement.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_IF);
    return nodeElement;
}
Also used : XmlElement(org.xmlpull.infoset.XmlElement)

Example 65 with XmlElement

use of org.xmlpull.infoset.XmlElement in project airavata by apache.

the class IfNode method addConfigurationElement.

@Override
protected XmlElement addConfigurationElement(XmlElement nodeElement) {
    XmlElement configElement = nodeElement.addElement(GraphSchema.NS, GraphSchema.NODE_CONFIG_TAG);
    if (this.xpath != null) {
        XmlElement element = configElement.addElement(GraphSchema.NS, XPATH_TAG_NAME);
        element.addChild(this.xpath.toString());
    }
    return configElement;
}
Also used : XmlElement(org.xmlpull.infoset.XmlElement)

Aggregations

XmlElement (org.xmlpull.infoset.XmlElement)79 AiravataException (org.apache.airavata.common.exception.AiravataException)5 GraphException (org.apache.airavata.workflow.model.graph.GraphException)5 IOException (java.io.IOException)4 Iterator (java.util.Iterator)4 DataType (org.apache.airavata.model.appcatalog.appinterface.DataType)4 WorkflowRuntimeException (org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException)4 InputNode (org.apache.airavata.workflow.model.graph.system.InputNode)4 LinkedList (java.util.LinkedList)3 ComponentException (org.apache.airavata.workflow.model.component.ComponentException)3 Workflow (org.apache.airavata.workflow.model.wf.Workflow)3 XmlAttribute (org.xmlpull.infoset.XmlAttribute)3 JsonObject (com.google.gson.JsonObject)2 File (java.io.File)2 AiravataClientException (org.apache.airavata.model.error.AiravataClientException)2 AiravataSystemException (org.apache.airavata.model.error.AiravataSystemException)2 InvalidRequestException (org.apache.airavata.model.error.InvalidRequestException)2 WSComponent (org.apache.airavata.workflow.model.component.ws.WSComponent)2 WorkflowException (org.apache.airavata.workflow.model.exceptions.WorkflowException)2 OutputNode (org.apache.airavata.workflow.model.graph.system.OutputNode)2