Search in sources :

Example 1 with P

use of org.knime.node2012.PDocument.P in project knime-core by knime.

the class MissingNodeFactory method addNodeDescription.

/**
 * {@inheritDoc}
 */
@Override
protected void addNodeDescription(final KnimeNodeDocument doc) {
    KnimeNode node = doc.addNewKnimeNode();
    node.setIcon("./missing.png");
    node.setType(KnimeNode.Type.UNKNOWN);
    node.setName("MISSING " + m_nodeInfo.getNodeNameNotNull());
    String shortDescription = "Placeholder node for missing \"" + m_nodeInfo.getNodeNameNotNull() + "\".";
    node.setShortDescription(shortDescription);
    FullDescription fullDesc = node.addNewFullDescription();
    Intro intro = fullDesc.addNewIntro();
    P p = intro.addNewP();
    p.newCursor().setTextValue(shortDescription);
    p = intro.addNewP();
    p.newCursor().setTextValue(m_nodeInfo.getErrorMessageWhenNodeIsMissing());
    Ports ports = node.addNewPorts();
    for (int i = 0; i < m_inTypes.length; i++) {
        InPort inPort = ports.addNewInPort();
        inPort.setIndex(i);
        inPort.setName("Port " + i);
        inPort.newCursor().setTextValue("Port guessed from the workflow connection table.");
    }
    for (int i = 0; i < m_outTypes.length; i++) {
        OutPort outPort = ports.addNewOutPort();
        outPort.setIndex(i);
        outPort.setName("Port " + i);
        outPort.newCursor().setTextValue("Port guessed from the workflow connection table.");
    }
}
Also used : KnimeNode(org.knime.node2012.KnimeNodeDocument.KnimeNode) P(org.knime.node2012.PDocument.P) InPort(org.knime.node2012.InPortDocument.InPort) Intro(org.knime.node2012.IntroDocument.Intro) OutPort(org.knime.node2012.OutPortDocument.OutPort) Ports(org.knime.node2012.PortsDocument.Ports) FullDescription(org.knime.node2012.FullDescriptionDocument.FullDescription)

Aggregations

FullDescription (org.knime.node2012.FullDescriptionDocument.FullDescription)1 InPort (org.knime.node2012.InPortDocument.InPort)1 Intro (org.knime.node2012.IntroDocument.Intro)1 KnimeNode (org.knime.node2012.KnimeNodeDocument.KnimeNode)1 OutPort (org.knime.node2012.OutPortDocument.OutPort)1 P (org.knime.node2012.PDocument.P)1 Ports (org.knime.node2012.PortsDocument.Ports)1