30 |
package skrueger.geotools; |
package skrueger.geotools; |
31 |
|
|
32 |
import java.io.File; |
import java.io.File; |
|
import java.io.FileNotFoundException; |
|
33 |
import java.io.IOException; |
import java.io.IOException; |
34 |
import java.net.URL; |
import java.net.URL; |
35 |
import java.util.Date; |
import java.util.Date; |
37 |
|
|
38 |
import javax.swing.ImageIcon; |
import javax.swing.ImageIcon; |
39 |
import javax.swing.JPanel; |
import javax.swing.JPanel; |
|
import javax.xml.transform.TransformerException; |
|
40 |
|
|
41 |
import org.apache.log4j.Logger; |
import org.apache.log4j.Logger; |
42 |
import org.geotools.data.FeatureSource; |
import org.geotools.data.FeatureSource; |
43 |
import org.geotools.feature.FeatureCollection; |
import org.geotools.feature.FeatureCollection; |
44 |
import org.geotools.styling.Style; |
import org.geotools.styling.Style; |
|
import org.jfree.util.AttributedStringUtilities; |
|
45 |
import org.opengis.feature.simple.SimpleFeature; |
import org.opengis.feature.simple.SimpleFeature; |
46 |
import org.opengis.feature.simple.SimpleFeatureType; |
import org.opengis.feature.simple.SimpleFeatureType; |
47 |
import org.opengis.feature.type.AttributeDescriptor; |
import org.opengis.feature.type.AttributeDescriptor; |
50 |
|
|
51 |
import schmitzm.geotools.io.GeoImportUtil; |
import schmitzm.geotools.io.GeoImportUtil; |
52 |
import schmitzm.geotools.styling.StylingUtil; |
import schmitzm.geotools.styling.StylingUtil; |
53 |
import skrueger.AttributeMetadata; |
import skrueger.AttributeMetadataImpl; |
54 |
import skrueger.i8n.Translation; |
import skrueger.i8n.Translation; |
55 |
|
|
56 |
import com.vividsolutions.jts.geom.Envelope; |
import com.vividsolutions.jts.geom.Envelope; |
253 |
public AttributeMetadataMap getAttributeMetaDataMap() { |
public AttributeMetadataMap getAttributeMetaDataMap() { |
254 |
if (map == null) { |
if (map == null) { |
255 |
|
|
256 |
map = new AttributeMetadataMap(new String[] { Translation |
map = new AttributeMetadataImplMap(); |
|
.getActiveLang() }); |
|
257 |
|
|
258 |
// Leaving out the first one, it will be the_geom |
// Leaving out the first one, it will be the_geom |
259 |
for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) { |
for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) { |
260 |
AttributeDescriptor attDesc = fs.getSchema().getDescriptor(i); |
AttributeDescriptor attDesc = fs.getSchema().getDescriptor(i); |
261 |
|
|
262 |
AttributeMetadata attMetaData = new AttributeMetadata(attDesc |
AttributeMetadataImpl attMetaData = new AttributeMetadataImpl(attDesc |
263 |
.getName(), map.getLanguages()); |
.getName(), map.getLanguages()); |
264 |
map.put(attDesc.getName(), attMetaData); |
map.put(attDesc.getName(), attMetaData); |
265 |
} |
} |