information-system-model-do.../src/main/java/org/gcube/informationsystem/utils/documentation/model/relations/ConsistsOfDocumentationGene...

44 lines
1.2 KiB
Java

package org.gcube.informationsystem.utils.documentation.model.relations;
import org.gcube.informationsystem.types.reference.Type;
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 ConsistsOfDocumentationGenerator extends RelationDocumentationGenerator {
public ConsistsOfDocumentationGenerator(Type type) {
super(type);
}
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;
}
}