use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class IfNode 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();
}
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ConstantNode method parseConfiguration.
@Override
protected void parseConfiguration(XmlElement configElement) {
super.parseConfiguration(configElement);
XmlElement typeElement = configElement.element(null, DATA_TYPE_QNAME_TAG);
if (typeElement != null) {
String qnameText = typeElement.requiredText();
if (qnameText != null && !qnameText.equals("")) {
this.type = DataType.valueOf(qnameText);
// this.type = QName.valueOf(qnameText);
}
}
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.value = child;
break;
}
// this.defaultValue = element.requiredText();
}
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ConstantNode method addConfigurationElement.
@Override
protected XmlElement addConfigurationElement(XmlElement nodeElement) {
XmlElement configElement = nodeElement.addElement(GraphSchema.NS, GraphSchema.NODE_CONFIG_TAG);
if (this.type != null) {
XmlElement qnameElement = configElement.addElement(GraphSchema.NS, DATA_TYPE_QNAME_TAG);
qnameElement.addChild(this.type.toString());
}
if (this.value != null) {
XmlElement element = configElement.addElement(GraphSchema.NS, VALUE_TAG_NAME);
element.addChild(this.value);
}
return configElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class DoWhileNode method toXML.
@Override
protected XmlElement toXML() {
XmlElement nodeElement = super.toXML();
nodeElement.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_DOWHILE);
return nodeElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class S3InputNode 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