use of org.knime.core.node.NodeDescription in project knime-core by knime.
the class MissingValueHandlerNodeFactory method createNodeDescription.
/**
* {@inheritDoc}
*/
@Override
protected NodeDescription createNodeDescription() throws SAXException, IOException, XmlException {
NodeDescription createNodeDescription = super.createNodeDescription();
MissingCellHandlerFactoryManager manager = MissingCellHandlerFactoryManager.getInstance();
return MissingValueNodeDescriptionHelper.createNodeDescription(createNodeDescription, manager);
}
use of org.knime.core.node.NodeDescription in project knime-core by knime.
the class MissingValueNodeDescriptionHelper method createNodeDescription.
/**
* Adds an additional option tag with name "Missing Value Handler Selection"
* to the fullDescription of the given node
* description.
*
* @param parentDescription the parent description to add the tag to
* @param manager handler factory manager
* @return a node description with the <option=''/> added
* @throws IOException some problem on reading the description
* @throws SAXException not going to happen
*/
public static NodeDescription createNodeDescription(final NodeDescription parentDescription, final MissingCellHandlerFactoryManager manager) throws SAXException, IOException {
NodeDescription createNodeDescription = parentDescription;
Element knimeNode = createNodeDescription.getXMLDescription();
List<MissingCellHandlerFactory> factories = manager.getFactories();
factories.sort((a, b) -> a.getDisplayName().compareTo(b.getDisplayName()));
Element fullDescription = findFullDescription(knimeNode);
if (fullDescription != null) {
MissingCellHandlerDescriptionFactory.addShortDescriptionToNodeDescription(fullDescription, factories);
// with the namespaces and the following xslt transformation
return new NodeDescriptionXmlProxy(createNodeDescription, deepCopy(knimeNode));
}
return createNodeDescription;
}
Aggregations