27 |
|
|
28 |
|
|
29 |
/** |
/** |
30 |
* This class extends the |
* This class extends the the {@link FeatureCollectionTableModel} with the |
31 |
|
* functionalities of the {@link AttributeMetaData} (AMD) of {@linkplain StyledMapInterface styled objects}. |
32 |
|
* <ul> |
33 |
|
* <li>column names are translated according to (AMD)</li> |
34 |
|
* <li>columns are hidden according to |
35 |
|
* </ul> |
36 |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
* @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany) |
37 |
* |
* |
38 |
*/ |
*/ |
52 |
|
|
53 |
protected void setFeatureSource(FeatureSource fs, Map<Integer,AttributeMetaData> amd) throws Exception { |
protected void setFeatureSource(FeatureSource fs, Map<Integer,AttributeMetaData> amd) throws Exception { |
54 |
FeatureCollection fc = null; |
FeatureCollection fc = null; |
55 |
this.visibleAMD = new TreeMap<Integer, AttributeMetaData>(); |
this.visibleAMD = null; |
56 |
if ( fs != null ) { |
if ( fs != null ) { |
57 |
Query query = new DefaultQuery(); |
Query query = new DefaultQuery(); |
58 |
if ( amd != null ) { |
if ( amd != null ) { |
103 |
public void reorganize() { |
public void reorganize() { |
104 |
super.reorganize(); |
super.reorganize(); |
105 |
// translate the column names |
// translate the column names |
106 |
Iterator<Integer> keys = visibleAMD.keySet().iterator(); |
if ( visibleAMD != null ) { |
107 |
for (int i=0; keys.hasNext(); i++) |
Iterator<Integer> keys = visibleAMD.keySet().iterator(); |
108 |
colNames[i] = visibleAMD.get( keys.next() ).getTitle().toString(); |
for (int i=0; keys.hasNext(); i++) |
109 |
|
colNames[i] = visibleAMD.get( keys.next() ).getTitle().toString(); |
110 |
|
} |
111 |
} |
} |
|
|
|
112 |
} |
} |