245 |
* @param visible |
* @param visible |
246 |
* indicated whether the visible or invisible entries are |
* indicated whether the visible or invisible entries are |
247 |
* returned |
* returned |
248 |
|
* |
249 |
|
* TODO replace with {@link AttributeMetadataMap#sortedValuesVisibleOnly()} |
250 |
*/ |
*/ |
251 |
public static AttributeMetadataMap getVisibleAttributeMetaData( |
public static AttributeMetadataMap getVisibleAttributeMetaData( |
252 |
final AttributeMetadataMap amdMap, final boolean visible) { |
final AttributeMetadataMap amdMap, final boolean visible) { |
253 |
|
|
254 |
final AttributeMetadataMap filteredMap = new AttributeMetadataMap(); |
final AttributeMetadataMap filteredMap = new AttributeMetadataMap(amdMap.getLanguages()); |
255 |
for (final AttributeMetadata amd : amdMap.values()) |
for (final AttributeMetadata amd : amdMap.values()) |
256 |
if (amd.isVisible() == visible) |
if (amd.isVisible() == visible) |
257 |
filteredMap.put(amd.getName(), amd); |
filteredMap.put(amd.getName(), amd); |
264 |
* This method works like {@link |
* This method works like {@link |
265 |
* AMLImport#parseDataAttribute(org.w3c.dom.Node}, but for JDOM. |
* AMLImport#parseDataAttribute(org.w3c.dom.Node}, but for JDOM. |
266 |
* |
* |
267 |
|
* TODO 20.11.2009, SK: There are some new attribute weight, functiona, |
268 |
|
* functionX and nodata in AttributeMetaData that should be parsed/exported |
269 |
|
* too. but this method is only used by ISDSS, which is not supporting that |
270 |
|
* stuff anyways. |
271 |
|
* |
272 |
* @param element |
* @param element |
273 |
* {@link Element} to parse |
* {@link Element} to parse |
274 |
*/ |
*/ |
1152 |
public static boolean isStyleable( |
public static boolean isStyleable( |
1153 |
final StyledRasterInterface<?> styledRaster) { |
final StyledRasterInterface<?> styledRaster) { |
1154 |
final ColorModel colorModel = getColorModel(styledRaster); |
final ColorModel colorModel = getColorModel(styledRaster); |
1155 |
|
|
1156 |
LOGGER.info("The colormodel of " + styledRaster.getTitle() + " is " |
// LOGGER.info("The colormodel of " + styledRaster.getTitle() + " is " |
1157 |
+ colorModel.getClass().getSimpleName()); |
// + colorModel != null ? colorModel.getClass().getSimpleName() : "NULL"); |
1158 |
|
|
1159 |
if (colorModel == null) |
if (colorModel == null) |
1160 |
return true; |
return true; |
1196 |
|
|
1197 |
return true; |
return true; |
1198 |
|
|
1199 |
} else return false; |
} else { |
1200 |
|
return false; |
1201 |
|
} |
1202 |
} |
} |
1203 |
|
|
1204 |
} |
} |