use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class SystemDataPort 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_SYSTEM_DATA);
return portElement;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class StreamSourceNode method toXML.
public XmlElement toXML() {
XmlElement xml = super.toXML();
xml.setAttributeValue(GraphSchema.NS, GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_STREAM_SOURCE);
return xml;
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class WorkflowImportWindow method ok.
private void ok() {
List<RegistrySearchResult> selectedValues = this.list.getSelectedValues();
try {
for (RegistrySearchResult result : selectedValues) {
org.apache.airavata.model.Workflow workflow = getClient().getWorkflow(result.getResourceName());
XmlElement workflowElement = XMLUtil.stringToXmlElement(workflow.getGraph());
Workflow w = new Workflow(workflowElement);
GraphCanvas newGraphCanvas = engine.getGUI().newGraphCanvas(true);
newGraphCanvas.setWorkflow(w);
engine.getGUI().getGraphCanvas().setWorkflowFile(null);
}
hide();
} catch (Exception e) {
engine.getGUI().getErrorWindow().error(e);
}
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class ConstantConfigurationDialog method show.
/**
* Shows the dialog.
*/
public void show() {
DataType type = this.node.getType();
XBayaTextComponent textComponent;
textComponent = this.valueTextField;
this.valueLabel.setText("Default value");
this.valueLabel.setLabelFor(textComponent);
final int index = 7;
this.gridPanel.remove(index);
this.gridPanel.add(textComponent, index);
this.gridPanel.layout(4, 2, 3, 1);
String name = this.node.getName();
this.nameTextField.setText(name);
this.idTextField.setText(this.node.getID());
this.typeTextField.setText(type.toString());
Object value = this.node.getValue();
String valueString;
if (value == null) {
valueString = "";
} else if (value instanceof XmlElement) {
valueString = XMLUtil.xmlElementToString((XmlElement) value);
} else {
valueString = value.toString();
}
textComponent.setText(valueString);
this.dialog.show();
}
use of org.xmlpull.infoset.XmlElement in project airavata by apache.
the class DifferedInputConfigurationDialog method show.
/**
* Shows the dialog.
*/
public void show() {
DataType type = this.node.getParameterType();
XBayaTextComponent textComponent;
// boolean knownType = LEADTypes.isKnownType(type);
textComponent = this.valueTextField;
this.valueLabel.setText("Default value");
this.valueLabel.setLabelFor(textComponent);
final int index = 5;
this.gridPanel.remove(index);
this.gridPanel.add(textComponent, index);
this.gridPanel.layout(new double[] { 0, 1.0 / 2, 0, 1.0 / 2 }, new double[] { 0, 1 });
// String name = this.node.getConfiguredName();
// if (name == null) {
// name = this.node.getName();
// }
// Show ID.
String name = this.node.getID();
this.nameTextField.setText(name);
this.descriptionTextArea.setText(this.node.getDescription());
Object value = this.node.getDefaultValue();
String valueString;
if (value == null) {
valueString = "";
} else if (value instanceof XmlElement) {
valueString = XMLUtil.xmlElementToString((XmlElement) value);
} else {
valueString = value.toString();
}
textComponent.setText(valueString);
XmlElement metadata = this.node.getMetadata();
String metadataText;
if (metadata == null) {
metadataText = WSConstants.EMPTY_APPINFO;
} else {
metadataText = XMLUtil.xmlElementToString(metadata);
}
this.metadataTextArea.setText(metadataText);
this.dialog.show();
}
Aggregations