46 |
import org.opengis.filter.Filter; |
import org.opengis.filter.Filter; |
47 |
|
|
48 |
import schmitzm.geotools.feature.FeatureUtil; |
import schmitzm.geotools.feature.FeatureUtil; |
49 |
import skrueger.AttributeMetaData; |
import skrueger.AttributeMetadata; |
50 |
import skrueger.i8n.Translation; |
import skrueger.i8n.Translation; |
51 |
|
|
52 |
/** |
/** |
317 |
AttributeMetadataMap metaDataMap = new AttributeMetadataMap(); |
AttributeMetadataMap metaDataMap = new AttributeMetadataMap(); |
318 |
SimpleFeatureType ftype = fc.getSchema(); |
SimpleFeatureType ftype = fc.getSchema(); |
319 |
for (int i = 0; i < ftype.getAttributeCount(); i++) { |
for (int i = 0; i < ftype.getAttributeCount(); i++) { |
320 |
AttributeDescriptor aType = ftype.getAttributeDescriptors().get(i); |
AttributeDescriptor aDesc = ftype.getAttributeDescriptors().get(i); |
321 |
if (aType != ftype.getGeometryDescriptor()) |
if (aDesc != ftype.getGeometryDescriptor()) |
322 |
metaDataMap.put(i, new AttributeMetaData(i, // Column no. |
metaDataMap.put(aDesc.getName(), new AttributeMetadata(aDesc.getName(), |
323 |
true, // visible |
true, // visible |
324 |
new Translation(aType.getLocalName()), // Column name |
new Translation(aDesc.getLocalName()), // Column name |
325 |
new Translation(), // description |
new Translation(aDesc.getLocalName()), // description |
326 |
"" // Unit |
"" // Unit |
327 |
)); |
)); |
328 |
} |
} |