information-system-model-do.../src/main/java/org/gcube/informationsystem/utils/documentation/model/entities/EntityDocumentationGenerato...

36 lines
1.1 KiB
Java

package org.gcube.informationsystem.utils.documentation.model.entities;
import org.gcube.informationsystem.base.reference.entities.EntityElement;
import org.gcube.informationsystem.types.TypeMapper;
import org.gcube.informationsystem.types.reference.Type;
import org.gcube.informationsystem.utils.documentation.model.DocumentationGenerator;
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(Type type) {
super(type, TypeMapper.getType(EntityElement.class));
}
protected Row getEntityHeadingRow() {
Row row = new Row(RowType.HEADING);
row = addCellSpanToRow(row, "Properties", 4);
return row;
}
@Override
protected Table getTable() {
Table table = new Table();
table.appendRow(getEntityHeadingRow());
table.appendRow(getPropertiesBoldRow());
return table;
}
}