public class TableSpec
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<ColumnSpec> |
_colSpecs |
private java.lang.Integer |
_fmtIdx |
private java.lang.String[] |
_labels |
private java.lang.String |
_name |
private Nature |
_nature |
private int[] |
_relativeWidths |
static TableSpec |
ABBREVS |
static TableSpec |
ASSOC_ENDS |
static TableSpec |
ATTR_INDEX |
static TableSpec |
ATTRS |
static TableSpec |
CDA_ATTRS |
static TableSpec |
CDC_ATTRS |
static TableSpec |
CTA_ATTRS |
static TableSpec |
CUSTOM_ASSOC_ENDS |
static TableSpec |
CUSTOM_LITERALS |
static TableSpec |
CUSTOM_OPERATIONS |
static TableSpec |
FCS |
static TableSpec |
FUNCTIONS |
static java.lang.String |
KEY_trgOp |
static TableSpec |
LITERALS |
static TableSpec |
LN_ATTRS |
static TableSpec |
ODA_ATTRS |
static TableSpec |
OPERATIONS |
static TableSpec |
PRES_CONDS |
private static java.util.Map<java.lang.String,TableSpec> |
TABLES |
private static java.util.Map<Nature,java.util.List<TableSpec>> |
TABS_PER_NATURE |
static TableSpec |
TRG_OPS |
Constructor and Description |
---|
TableSpec(java.lang.String name,
Nature nature,
java.util.List<ColumnSpec> colSpecs) |
Modifier and Type | Method and Description |
---|---|
int |
colCount()
Returns the number of columns described with this instance.
|
private static TableSpec |
createAbbreviationsTable(Nature nature)
Widths are scaled to 49%, because they are printed in a 2-column section.
|
private static TableSpec |
createAndStoreTableSpec(java.lang.String name,
java.util.List<ColumnSpec> cols,
Nature nature) |
private static TableSpec |
createAssocEndsTable(Nature nature) |
private static TableSpec |
createAttributeIndexTable(Nature nature)
This one is used only for Word doc; XML tags are not from schema, but follow the others.
|
private static TableSpec |
createAttributesTable(Nature nature) |
private static TableSpec |
createCDCAttributesTable(Nature nature) |
private static TableSpec |
createCustomAssociationEndsTable(Nature nature) |
private static TableSpec |
createCustomLiteralsTable(Nature nature) |
private static TableSpec |
createDATable(java.lang.String name,
java.lang.String idPref,
Nature nature) |
private static TableSpec |
createFunctionalConstraintsTable(Nature nature) |
private static TableSpec |
createFunctionsTable(Nature nature) |
private static TableSpec |
createLiteralsTable(Nature nature) |
private static TableSpec |
createLNAttributesTable(Nature nature) |
private static TableSpec |
createOperationsTable(java.lang.String idPref,
Nature nature) |
private static TableSpec |
createPresenceConditionsTable(Nature nature) |
private static TableSpec |
createTriggerOptionsTable(Nature nature) |
java.util.List<ColumnSpec> |
getColSpecs()
Returns (unmodifiable) list of its column specs.
|
java.lang.Integer |
getFmtIdx()
Returns the index of the column that may be formatted, null if no column needs formatting.
|
java.lang.String[] |
getLabels()
Returns (cloned) labels of columns for the table; if the table does not have a name, this may
be used as the first and only heading row, otherwise this will be the second heading row.
|
java.lang.String |
getName()
Returns name of this table type.
|
Nature |
getNature()
Returns name of this table type.
|
static java.util.Map<java.lang.String,TableSpec> |
getPredefinedTableSpecs()
Returns all the predefined table formats.
|
int[] |
getRelativeWidths()
Returns (cloned) widths of columns in percentage of the full table width.
|
static java.util.List<TableSpec> |
getTableSpecs(Nature nature) |
private static void |
putPredefined(TableSpec tab) |
private static final java.util.Map<java.lang.String,TableSpec> TABLES
private static final java.util.Map<Nature,java.util.List<TableSpec>> TABS_PER_NATURE
public static final java.lang.String KEY_trgOp
public static final TableSpec FCS
public static final TableSpec TRG_OPS
public static final TableSpec PRES_CONDS
public static final TableSpec ABBREVS
public static final TableSpec FUNCTIONS
public static final TableSpec CTA_ATTRS
public static final TableSpec CDA_ATTRS
public static final TableSpec CDC_ATTRS
public static final TableSpec LN_ATTRS
public static final TableSpec ATTR_INDEX
public static final TableSpec CUSTOM_LITERALS
public static final TableSpec ODA_ATTRS
public static final TableSpec CUSTOM_OPERATIONS
public static final TableSpec CUSTOM_ASSOC_ENDS
public static final TableSpec LITERALS
public static final TableSpec ATTRS
public static final TableSpec ASSOC_ENDS
public static final TableSpec OPERATIONS
private final java.lang.String _name
private final Nature _nature
private final java.lang.Integer _fmtIdx
private final java.lang.String[] _labels
private final int[] _relativeWidths
private final java.util.List<ColumnSpec> _colSpecs
public TableSpec(java.lang.String name, Nature nature, java.util.List<ColumnSpec> colSpecs)
private static TableSpec createFunctionalConstraintsTable(Nature nature)
private static TableSpec createAbbreviationsTable(Nature nature)
private static TableSpec createDATable(java.lang.String name, java.lang.String idPref, Nature nature)
private static TableSpec createAttributeIndexTable(Nature nature)
private static TableSpec createOperationsTable(java.lang.String idPref, Nature nature)
private static TableSpec createCustomAssociationEndsTable(Nature nature)
private static TableSpec createAndStoreTableSpec(java.lang.String name, java.util.List<ColumnSpec> cols, Nature nature)
private static void putPredefined(TableSpec tab)
public static java.util.Map<java.lang.String,TableSpec> getPredefinedTableSpecs()
public java.lang.String getName()
public Nature getNature()
public java.lang.Integer getFmtIdx()
Note that this is just the specification about the data, but the actual formatting needs to be enabled by the application (according to e.g. configuration), and then processed as desired.
public int colCount()
public java.lang.String[] getLabels()
public int[] getRelativeWidths()
public java.util.List<ColumnSpec> getColSpecs()
Copyright 2009-2015 Tatjana (Tanja) Kostic