package org.gcube.informationsystem.utils.documentation.model.entities; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.types.TypeMapper; import org.gcube.informationsystem.utils.documentation.model.DocumentationGenerator; import org.gcube.informationsystem.utils.documentation.rst.table.Cell; import org.gcube.informationsystem.utils.documentation.rst.table.Row; import org.gcube.informationsystem.utils.documentation.rst.table.RowType; import org.gcube.informationsystem.utils.documentation.rst.table.Table; /** * @author Luca Frosini (ISTI - CNR) */ public class EntityDocumentationGenerator extends DocumentationGenerator { public EntityDocumentationGenerator(Class clz) { super(clz, TypeMapper.getType(EntityElement.class)); } protected Row getHeadingRow() { Row row = new Row(RowType.HEADING); Cell name = new Cell(); name.setText("Name"); row.appendCell(name); Cell type = new Cell(); type.setText("Type"); row.appendCell(type); Cell attributes = new Cell(); attributes.setText("Attributes"); row.appendCell(attributes); Cell description = new Cell(); description.setText("Description"); row.appendCell(description); return row; } @Override protected Table getTable() { Table table = new Table(); table.appendRow(getHeadingRow()); return table; } }