use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ParameterNode method parseConfiguration.
@Override
protected void parseConfiguration(XmlElement configElement) {
XmlElement nameElement = configElement.element(null, NAME_TAG);
if (nameElement != null) {
// If the name is set here, this node has been configured.
this.configured = true;
this.configuredName = nameElement.requiredText();
}
XmlElement descElement = configElement.element(null, DESCRIPTION_TAG);
if (descElement != null) {
this.description = descElement.requiredText();
}
XmlElement typeElement = configElement.element(null, DATA_TYPE_QNAME_TAG);
if (typeElement != null) {
String qnameText = typeElement.requiredText();
if (qnameText != null && !qnameText.equals("")) {
this.parameterType = DataType.valueOf(qnameText);
}
}
XmlElement metadataElement = configElement.element(null, METADATA_TAG);
if (metadataElement != null) {
for (XmlElement appinfo : metadataElement.requiredElementContent()) {
// Call setMetadata to clone and reformat.
setMetadata(appinfo);
// It should have only one element.
break;
}
}
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class S3InputNode 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 S3InputNode method addConfigurationElement.
@Override
protected XmlElement addConfigurationElement(XmlElement nodeElement) {
XmlElement configElement = super.addConfigurationElement(nodeElement);
if (this.defaultValue != null) {
XmlElement element = configElement.addElement(GraphSchema.NS, VALUE_TAG_NAME);
element.addChild(this.defaultValue);
}
return configElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ReceiveNode method toXML.
@Override
protected XmlElement toXML() {
XmlElement nodeElement = super.toXML();
nodeElement.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_RECEIVE);
return nodeElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class DifferedInputNode 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();
}
}
Aggregations