Interface Deprecable

All Known Implementing Classes:
Abstract­Coordinate­Operation, Abstract­CRS, Abstract­CS, Abstract­Datum, Abstract­Identified­Object, Abstract­Identified­Type, Abstract­Operation, Abstract­Parameter­Descriptor, Abstract­Reference­System, Default­Affine­CS, Default­Association­Role, Default­Attribute­Type, Default­Cartesian­CS, Default­Compound­CRS, Default­Compound­CS, Default­Conversion, Default­Coordinate­System­Axis, Default­Cylindrical­CS, Default­Derived­CRS, Default­Ellipsoid, Default­Ellipsoidal­CS, Default­Engineering­CRS, Default­Engineering­Datum, Default­Feature­Type, Default­Geocentric­CRS, Default­Geodetic­Datum, Default­Geographic­CRS, Default­Image­CRS, Default­Image­Datum, Default­Linear­CS, Default­Operation­Method, Default­Parameter­Descriptor, Default­Parameter­Descriptor­Group, Default­Parametric­CRS, Default­Parametric­CS, Default­Parametric­Datum, Default­Pass­Through­Operation, Default­Polar­CS, Default­Prime­Meridian, Default­Projected­CRS, Default­Spherical­CS, Default­Temporal­CRS, Default­Temporal­Datum, Default­Time­CS, Default­Transformation, Default­User­Defined­CS, Default­Vertical­CRS, Default­Vertical­CS, Default­Vertical­Datum, Geohash­Reference­System, Military­Grid­Reference­System, Referencing­By­Identifiers

public interface Deprecable
Interface of classes for which deprecated instances may exist. Despite the name, the entities deprecated by this interface are unrelated to the entities deprecated by the Java Deprecated annotation. This interface is for identifying deprecated data rather than language constructs.

Examples

When an error is discovered in the definition of a Coordinate Reference System (CRS) in the EPSG database, the EPSG maintainers do not change the data. Instead, they deprecate the erroneous definition and create a new one with a new EPSG code. The is­Deprecated() method in this interface allows users to identify CRS instances created from such deprecated database records, for example in order to log a warning when data are projected to a deprecated CRS.

Some examples of deprecated instances are:

Since:
0.3
  • Method Summary

    Modifier and Type
    Method
    Description
    If this instance is deprecated, the reason or the alternative to use.
    boolean
    Returns true if this instance is deprecated.
  • Method Details

    • isDeprecated

      boolean isDeprecated()
      Returns true if this instance is deprecated. In such case, the remarks may contain information about the new object to use.
      Returns:
      true if this instance is deprecated.
    • getRemarks

      InternationalString getRemarks()
      If this instance is deprecated, the reason or the alternative to use. Otherwise, an optional free text.
      Example: "superseded by code XYZ".
      Returns:
      comments about this instance, or null if none. Shall be the reason for deprecation or the alternative to use if this instance is deprecated.