Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Motivation:

Avoid deprecated messages using Style interfaces

Contact:

Jesse Eichar

Tracker:

 

Tagline:

Excerpt

Keeping stylish

This page represents the current plan; for discussion please check the tracker link above.

Description

Avoid deprecated messages

  • "Style" interfaces still use org.geotools.filter.Filter ..
  • There is an existing bug report about removing all use of geotools Filter

Status

Section
Column
width60%

This proposal is in response to an email from Jessie. We would like the uDig code to be deprecation free (it serves as a very valuable test of GeoTools API stability if and only if it is possible to do everything without using deprecated code).

Column
Wiki Markup
{dynamictasklist:Impediments}{dynamictasklist}

API Changes

BEFORE

This change effects imports; also a good chance to remove old FactoryFinder code where it is used to create literals etc...

Code Block
titleAnchorPoint.java
import org.opengis.filter.expression.Expression;
interface AnchorPoint {
    ...
    void setAnchorPointX(Expression x);
    Expression getAnchorPointX();
    ...
}

AFTER

Code Block
titleAnchorPoint.java
import org.opengis.filter.expression.Expression;
interface AnchorPoint {
    void setAnchorPointX(Expression x);
    Expression getAnchorPointX();
    ...
}

This is also a good chance to make sure the FilterFactoryFinder calls are removed:

Code Block
interface AnchorPoint {
    private static final java.util.logging.Logger LOGGER = java.util.logging.Logger
        .getLogger("org.geotools.core");
    private FilterFactory filterFactory;
    private Expression anchorPointX = null;
    private Expression anchorPointY = null;

    public AnchorPointImpl() {
        this( CommonFactoryFinder.getFilterFactory( GeoTools.getDefaultHints() ) );
    }
    /**
     * Creates a new instance of DefaultAnchorPoint
     */
    public AnchorPointImpl( FilterFactory filterFactory ) {
        this.filterFactory = filterFactory; 
        try {
            anchorPointX = filterFactory.literal( 0.0 );
            anchorPointY = filterFactory.literal( 0.5 );
        } catch (org.geotools.filter.IllegalFilterException ife) {
            LOGGER.severe("Failed to build defaultAnchorPoint: " + ife);
        }
    }
}

Effected Documentation

The follow documentation pages were revised: