46 lines
1.4 KiB
Java
46 lines
1.4 KiB
Java
package org.gcube.informationsystem.utils.documentation.model.relations;
|
|
|
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
|
import org.gcube.informationsystem.model.reference.entities.Resource;
|
|
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
|
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<CO extends ConsistsOf<Resource, Facet>> extends RelationDocumentationGenerator<CO> {
|
|
|
|
public ConsistsOfDocumentationGenerator(Class<CO> clz) {
|
|
super(clz);
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
}
|