If you dont know what a KnowWE type is, first have a look: KnowWEType
Here the example for a TableLineType is given, using the init() method to specify SectionFinder, Renderer and children-types:
public class TableLine extends DefaultAbstractKnowWEObjectType {
@Override
protected void init()
{
childrenTypes.add(new TableCell());
sectionFinder = new TableLineSectionFinder( this );
setCustomRenderer(new TableLineRenderer());
}
}
Explanation:
On system initialization time the init method is called. childrenTypes, sectionFinder and setCustomRendererare inherited from (Default)AbstractKnowWEObjectType. TableCell is a KnowWEType again and adding this to the children list denotes, that every TableLine will be split into TableCells. The sectionFinder sets the parsing-component for the local type. Thus, the TableLineSectionFinder should recognize Table-lines. The text-sections recognized by the SectionFinder are the text-content of the nodes of the corresponding type.
Further, a custom renderer is set, that specifies how a table-line should be renderered.
Being copied from the KnowWE source, this Type is full functional (given correct implementations of TableCell, TableLineSectionFinder and TableLineRenderer).