43 |
import org.geotools.map.MapLayer; |
import org.geotools.map.MapLayer; |
44 |
import org.geotools.styling.Style; |
import org.geotools.styling.Style; |
45 |
import org.geotools.styling.TextSymbolizer; |
import org.geotools.styling.TextSymbolizer; |
|
import org.opengis.feature.Feature; |
|
46 |
import org.opengis.feature.simple.SimpleFeature; |
import org.opengis.feature.simple.SimpleFeature; |
47 |
import org.opengis.feature.simple.SimpleFeatureType; |
import org.opengis.feature.simple.SimpleFeatureType; |
48 |
import org.opengis.feature.type.AttributeDescriptor; |
import org.opengis.feature.type.AttributeDescriptor; |
|
import org.opengis.feature.type.FeatureType; |
|
49 |
import org.opengis.filter.Filter; |
import org.opengis.filter.Filter; |
50 |
import org.opengis.filter.expression.Expression; |
import org.opengis.filter.expression.Expression; |
51 |
import org.opengis.filter.expression.PropertyName; |
import org.opengis.filter.expression.PropertyName; |
118 |
if (!ml.isVisible()) |
if (!ml.isVisible()) |
119 |
continue; |
continue; |
120 |
|
|
121 |
final List<TextSymbolizer> allTS = StylingUtil.getTextSymbolizers(ml |
final List<TextSymbolizer> allTS = StylingUtil.getVisibleTextSymbolizers(ml |
122 |
.getStyle()); |
.getStyle()); |
123 |
if (allTS.size() == 0) { |
if (allTS.size() == 0) { |
124 |
// A layer without any TextSymbolizer doesn't have to be |
// A layer without any TextSymbolizer doesn't have to be |
125 |
// searched any more. |
// searched any more. |
126 |
continue; |
continue; |
127 |
} |
} |
128 |
|
|
|
// 26 CAST! |
|
129 |
final FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) ml.getFeatureSource(); |
final FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) ml.getFeatureSource(); |
130 |
|
|
131 |
final String typeName = featureSource.getSchema() |
final String typeName = featureSource.getSchema() |
157 |
if (ts == null) |
if (ts == null) |
158 |
continue; |
continue; |
159 |
|
|
160 |
|
// TODO Evaluate the Rule that belongs to the TextSymbolizer against the feature... |
161 |
final AttributeDescriptor labelAttribute = getLabelAttribute(ts, featureSource.getSchema()); |
final AttributeDescriptor labelAttribute = getLabelAttribute(ts, featureSource.getSchema()); |
162 |
|
|
163 |
if (labelAttribute == null) { |
if (labelAttribute == null) { |