use of org.knime.core.node.ModelContent in project knime-core by knime.
the class AbstractSimplePortObjectSpec method getViews.
/**
* {@inheritDoc}
*/
@Override
public JComponent[] getViews() {
ModelContent model = new ModelContent("Model Content Spec");
save(model);
return new JComponent[] { new ModelContentOutPortView(model) };
}
use of org.knime.core.node.ModelContent in project knime-core by knime.
the class AbstractSimplePortObject method getViews.
/**
* {@inheritDoc}
*/
@Override
public JComponent[] getViews() {
try {
ModelContent model = new ModelContent("Model Content");
save(model, new ExecutionMonitor());
return new JComponent[] { new ModelContentOutPortView(model) };
} catch (CanceledExecutionException cee) {
// should not be possible
}
return null;
}
use of org.knime.core.node.ModelContent in project knime-core by knime.
the class ColorHandlerPortObject method getViews.
/**
* {@inheritDoc}
*/
@Override
public JComponent[] getViews() {
ModelContent model = new ModelContent("Color");
getSpec().getColumnSpec(0).getColorHandler().save(model);
return new JComponent[] { new ModelContentOutPortView(model) };
}
use of org.knime.core.node.ModelContent in project knime-core by knime.
the class NaiveBayesLearnerNodeModel method saveInternals.
/**
* {@inheritDoc}
*/
@Override
protected void saveInternals(final File nodeInternDir, final ExecutionMonitor exec) throws IOException {
final File modelFile = new File(nodeInternDir, CFG_DATA);
final FileOutputStream modelOut = new FileOutputStream(modelFile);
final ModelContent myModel = new ModelContent(CFG_DATA_MODEL);
m_model.savePredictorParams(myModel);
myModel.saveToXML(modelOut);
}
Aggregations