TrackPointDescriptor extends PointPlacemarkDescriptor { @Override public DecodeQualification getCompatibilityFor(SimpleFeatureType featureType) { final GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); if (geometryDescriptor != null) { if (geometryDescriptor.getType().getBinding().equals(Point.class)) { final Object trackPoints = featureType.getUserData().get("trackPoints"); if (trackPoints != null && Boolean.parseBoolean(trackPoints.toString())) { return DecodeQualification.INTENDED; } else { return DecodeQualification.SUITABLE; } } } return DecodeQualification.UNABLE; } TrackPointDescriptor(); static TrackPointDescriptor getInstance(); @Override DecodeQualification getCompatibilityFor(SimpleFeatureType featureType); @Override void setUserDataOf(SimpleFeatureType compatibleFeatureType); @Override String getRoleName(); @Override String getRoleLabel();  }
@Test public void testGetQualification() throws Exception { SimpleFeatureType ft = instance.getBaseFeatureType(); assertEquals(DecodeQualification.SUITABLE, instance.getCompatibilityFor(ft)); ft.getUserData().put("trackPoints", "true"); assertEquals(DecodeQualification.INTENDED, instance.getCompatibilityFor(ft)); final SimpleFeatureType ft2 = createCompatibleFT("org.esa.beam.TrackPoint"); assertEquals(DecodeQualification.SUITABLE, instance.getCompatibilityFor(ft2)); ft2.getUserData().put("trackPoints", "true"); assertEquals(DecodeQualification.INTENDED, instance.getCompatibilityFor(ft2)); SimpleFeatureTypeBuilder ftb = new SimpleFeatureTypeBuilder(); ftb.setName("org.esa.beam.Pineapple"); assertEquals(DecodeQualification.UNABLE, instance.getCompatibilityFor(ftb.buildFeatureType())); }