DefaultMaintenanceInformation changes for revisions 24924:24973

Replacement of long primitive type by PeriodDuration. This change has been forced by a GeoAPI change. Reverting this change causes a compilation failure, which is resolved by restoring the PeriodDuration values as required by GeoAPI interfaces. So rewriting this contribution produces identical result regarding this type.

This commit contains also skeleton methods for new methods added in GeoAPI interfaces. Those skeletons seem to be automatically generated by the IDE. NetBeans generates basically the same skeletons, and the implementations have been completed by Geotk/SIS authors.

Action: all contributions forced by changes in GeoAPI interfaces (mostly import statements and method signatures) have been rewritten from scratch by creating an empty Java class implementing the interface, clicking on the "Implement all abstract methods" contextual menu in NetBeans, removing the <? extends> part in parameterized type of collections, adding the synchronized keyword (for now) and finally adding the corresponding private fields. This action has been committed in the Apache SIS JDK7 branch at revision 1458238.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r24924:24973 https://svn.osgeo.org/geotools/trunk/modules/library/metadata/src/main/java/org/geotools/metadata/iso/maintenance/MaintenanceInformationImpl.java
Revision 24924Revision 24973
package org.geotools.metadata.iso.maintenance;

// J2SE direct dependencies
import java.util.Date;

// OpenGIS dependencies
package org.geotools.metadata.iso.maintenance;

// J2SE direct dependencies
import java.util.Collection;
import java.util.Collections;
import java.util.Date;

// OpenGIS dependencies
import org.opengis.metadata.maintenance.MaintenanceFrequency;
import org.opengis.metadata.maintenance.ScopeCode;
import org.opengis.metadata.maintenance.ScopeDescription;
import org.opengis.util.InternationalString;

// Geotools dependencies
import org.opengis.metadata.maintenance.MaintenanceFrequency;
import org.opengis.metadata.maintenance.ScopeCode;
import org.opengis.metadata.maintenance.ScopeDescription;
import org.opengis.temporal.PeriodDuration;
import org.opengis.util.InternationalString;

// Geotools dependencies
/**
 * Maintenance period other than those defined, in milliseconds.
 */
private long userDefinedMaintenanceFrequency;

/**
 * Scope of data to which maintenance is applied.
/**
 * Maintenance period other than those defined, in milliseconds.
 */
private PeriodDuration userDefinedMaintenanceFrequency;

/**
 * Scope of data to which maintenance is applied.
 *
 * @return The period, in milliseconds.
 */
public long getUserDefinedMaintenanceFrequency() {
    return userDefinedMaintenanceFrequency;
}

/**
 * Maintenance period other than those defined.
 */
public synchronized void setUserDefinedMaintenanceFrequency(final long newValue) {
    checkWritePermission();
    userDefinedMaintenanceFrequency = newValue;
}
 *
 * @return The period, in milliseconds.
 */
public PeriodDuration getUserDefinedMaintenanceFrequency() {
    return userDefinedMaintenanceFrequency;
}

/**
 * Maintenance period other than those defined.
 */
public synchronized void setUserDefinedMaintenanceFrequency(final PeriodDuration newValue) {
    checkWritePermission();
    userDefinedMaintenanceFrequency = newValue;
}
        }
        return "";
    }
}
        }
        return "";
    }


    public Collection getContacts() {
        // TODO IMPLEMENT!
        return Collections.EMPTY_LIST;
}

    public Collection getUpdateScopeDescriptions() {
        // TODO IMPLEMENT!
        return Collections.EMPTY_LIST;
    }

    public Collection getUpdateScopes() {
        // TODO IMPLEMENT!
        return Collections.EMPTY_LIST;
    }

    public Collection getMaintenanceNotes() {
        // TODO IMPLEMENT!
        return Collections.EMPTY_LIST;
    }
}