use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class WSPort 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_WS_DATA);
return portElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class InputNode method parseConfiguration.
@Override
protected void parseConfiguration(XmlElement configElement) {
super.parseConfiguration(configElement);
XmlElement element = configElement.element(null, VALUE_TAG_NAME);
if (element != null) {
// It might be a String or XmlElement
for (Object child : element.children()) {
if (child instanceof String) {
if (((String) child).trim().length() == 0) {
// Skip white space before xml element.
continue;
}
}
this.defaultValue = child;
break;
}
// this.defaultValue = element.requiredText();
}
element = configElement.element(null, VISIBILITY_TAG_NAME);
if (element != null) {
// It might be a String or XmlElement
for (Object child : element.children()) {
if (child instanceof String) {
if (((String) child).trim().length() == 0) {
// Skip white space before xml element.
continue;
}
}
this.visibility = Boolean.parseBoolean((String) child);
break;
}
// this.defaultValue = element.requiredText();
} else {
this.visibility = true;
}
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class InputNode method toXML.
@Override
public XmlElement toXML() {
XmlElement nodeElement = super.toXML();
nodeElement.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_INPUT);
return nodeElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class MemoNode method toXML.
@Override
protected XmlElement toXML() {
XmlElement nodeElement = super.toXML();
nodeElement.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_MEMO);
XmlElement memoElement = nodeElement.addElement(GraphSchema.NS, GraphSchema.NODE_MEMO_TAG);
memoElement.addChild(this.memo);
return nodeElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class MemoNode method parse.
/**
* @see org.apache.airavata.workflow.model.graph.impl.NodeImpl#parse(org.xmlpull.infoset.XmlElement)
*/
@Override
protected void parse(XmlElement nodeElement) throws GraphException {
super.parse(nodeElement);
XmlElement memoElement = nodeElement.element(GraphSchema.NODE_MEMO_TAG);
this.memo = memoElement.requiredText();
}
Aggregations