39
public class ThirdCopyNodeModel extends ActivityNodeModel {
/**
* Boilerplate constructor.
*/
public ThirdCopyNodeModel() {
}
/**
* Show the properties dialog
*/
public void showPropertiesDialog(boolean modality) {
NodeDialog dialog = ThirdCopyDialog.getInstance();
dialog.setModal(modality);
dialog.show(this);
}
/**
* Make sure that at least one column is specified and
* that all of the columns are actually present in this
* input.
*/
public boolean isPropertiesValid() {
Vector columns = getXTProps().getSubProperties(
ThirdCopyEngineNode.COLUMNS_ATTRIBUTE_TAG);
boolean valid = (columns.size() > 0);
try {
if (isInputValid()) {
XTMetaData md = getInputMetaData(0);
for (int i=columns.size()-1; i>=0; i--) {
// Check that column is present for the input
if (!md.containsColumn((String)columns.get(i)))
return false;
}
}
Komentarze do niniejszej Instrukcji