use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class EdgeImpl method parse.
/**
* @param edgeElement
*/
protected void parse(XmlElement edgeElement) {
XmlElement fromPortElement = edgeElement.element(GraphSchema.EDGE_FROM_PORT_TAG);
this.fromPortID = fromPortElement.requiredText();
XmlElement toPortElement = edgeElement.element(GraphSchema.EDGE_TO_PORT_TAG);
this.toPortID = toPortElement.requiredText();
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class PortImpl method toXML.
/**
* @return the XML representation of this Port
*/
protected XmlElement toXML() {
XmlElement portElement = XMLUtil.BUILDER.newFragment(GraphSchema.NS, GraphSchema.PORT_TAG);
XmlElement idElement = portElement.addElement(GraphSchema.NS, GraphSchema.PORT_ID_TAG);
idElement.addChild(getID());
if (this.name != null) {
// TODO control ports might have name?
XmlElement nameElement = portElement.addElement(GraphSchema.NS, GraphSchema.PORT_NAME_TAG);
nameElement.addChild(this.name);
}
XmlElement nodeElement = portElement.addElement(GraphSchema.NS, GraphSchema.PORT_NODE_TAG);
nodeElement.addChild(this.node.getID());
return portElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class WorkflowWSDL method setupParameterType.
/**
* @param name
* @param appinfo
* @param schema
* @return The sequence element.
*/
private XmlElement setupParameterType(String name, XmlElement appinfo, XmlElement schema) {
XmlElement element = schema.addElement(WSConstants.ELEMENT_TAG);
element.setAttributeValue(WSConstants.NAME_ATTRIBUTE, name);
String type = name + TYPE_SUFFIX;
element.setAttributeValue(WSConstants.TYPE_ATTRIBUTE, WSConstants.TYPE_NS_PREFIX + ":" + type);
// add metadata
if (appinfo != null) {
XmlElement annotation = element.addElement(WSConstants.ANNOTATION_TAG);
try {
annotation.addElement(XMLUtil.deepClone(appinfo));
} catch (AiravataException e) {
log.error(e.getMessage(), e);
}
}
XmlElement complex = schema.addElement(WSConstants.COMPLEX_TYPE_TAG);
complex.setAttributeValue(WSConstants.NAME_ATTRIBUTE, type);
XmlElement sequence = complex.addElement(WSConstants.SEQUENCE_TAG);
return sequence;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ControlEdge method toXML.
/**
* @see org.apache.airavata.workflow.model.graph.impl.EdgeImpl#toXML()
*/
@Override
protected XmlElement toXML() {
XmlElement edgeElement = super.toXML();
edgeElement.setAttributeValue(GraphSchema.NS, GraphSchema.EDGE_TYPE_ATTRIBUTE, GraphSchema.EDGE_TYPE_CONTROL);
return edgeElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ControlPort method toXML.
/**
* @see org.apache.airavata.workflow.model.graph.impl.PortImpl#toXML()
*/
@Override
protected XmlElement toXML() {
XmlElement portElement = super.toXML();
portElement.setAttributeValue(GraphSchema.NS, GraphSchema.PORT_TYPE_ATTRIBUTE, GraphSchema.PORT_TYPE_CONTROL);
return portElement;
}
Aggregations