/[schmitzm]/trunk/src/skrueger/geotools/StyledLayerUtil.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/StyledLayerUtil.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 517 by alfonx, Thu Nov 12 10:12:39 2009 UTC revision 534 by alfonx, Fri Nov 20 10:28:01 2009 UTC
# Line 245  public class StyledLayerUtil { Line 245  public class StyledLayerUtil {
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);
# Line 262  public class StyledLayerUtil { Line 264  public class StyledLayerUtil {
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           */           */
# Line 1145  public class StyledLayerUtil { Line 1152  public class StyledLayerUtil {
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;
# Line 1189  public class StyledLayerUtil { Line 1196  public class StyledLayerUtil {
1196                                                    
1197                          return true;                          return true;
1198                                                    
1199                  } else return false;                  } else {
1200                            return false;
1201                    }
1202          }          }
1203    
1204  }  }

Legend:
Removed from v.517  
changed lines
  Added in v.534

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26