columnAttributes.add(attributes);
}
if (metaTableModel.isCellDataAttributesSupported())
{
cellAttributes = new GenericObjectTable(Math.max(1,model.getRowCount()), Math.max(1,model.getColumnCount()));
for (int row = 0; row < model.getRowCount(); row += 1)
{
for (int columns = 0; columns < model.getColumnCount(); columns += 1)
{
final DefaultDataAttributes attributes = new DefaultDataAttributes();
attributes.merge(metaTableModel.getCellDataAttributes(row, columns), dataAttributeContext);
cellAttributes.setObject(row, columns, attributes);
}
}
}
final DefaultDataAttributes attributes = new DefaultDataAttributes();
attributes.merge(metaTableModel.getTableAttributes(), dataAttributeContext);
tableAttributes = attributes;
}
else
{
for (int i = 0; i < model.getColumnCount(); i++)
{
final String columnName = model.getColumnName(i);
final Class columnType = model.getColumnClass(i);
final DefaultDataAttributes attributes = new DefaultDataAttributes();
attributes.setMetaAttribute(MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.NAME,
new DefaultConceptQueryMapper(), columnName);
attributes.setMetaAttribute(MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE,
new DefaultConceptQueryMapper(), columnType);
columnAttributes.add(attributes);
}
tableAttributes = EmptyDataAttributes.INSTANCE;
}
cellValues = new GenericObjectTable(Math.max(1,model.getRowCount()), Math.max(1,model.getColumnCount()));
for (int row = 0; row < model.getRowCount(); row += 1)
{
for (int columns = 0; columns < model.getColumnCount(); columns += 1)
{
cellValues.setObject(row, columns, model.getValueAt(row, columns));