You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2014/02/07 13:47:51 UTC
svn commit: r1565636 [2/3] - in /sis/ip-review: ./ rev/07846/ rev/10796/
rev/20874/ rev/24973/
Added: sis/ip-review/rev/07846/DefaultParameterDescriptor.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/07846/DefaultParameterDescriptor.xhtml?rev=1565636&view=auto
==============================================================================
--- sis/ip-review/rev/07846/DefaultParameterDescriptor.xhtml (added)
+++ sis/ip-review/rev/07846/DefaultParameterDescriptor.xhtml Fri Feb 7 12:47:50 2014
@@ -0,0 +1,902 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>DefaultParameterDescriptor changes for revisions 7702:7846</title>
+ <style type="text/css" media="all">
+ @import url("../../reports.css");
+ </style>
+ </head>
+ <body>
+ <div>
+ <h1>DefaultParameterDescriptor changes for revisions 7702:7846</h1>
+<p>This class was written by Martin Desruisseaux, but appears as a someone else commit because he didn't used the
+<code>svn move</code> command. The original file before the manipulation error is shown on the left side.</p>
+<p>This commit also contains a class javadoc reformatting and a new constructor identified by the
+"<cite>Similar to DataStore PARAM constuctor</cite>" comment. Those two additions are omitted in SIS.
+The constructor is flagged by the <code>// LGPL</code> comment in Geotk.</p>
+
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r7702:7846 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/parameter/DefaultParameterDescriptor.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 7701</th><th>Revision 7846</th></tr>
+<tr><td><pre>
+/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+ * (C) 2004, Institut de Recherche pour le D?veloppement
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * This package contains documentation from OpenGIS specifications.
+ * OpenGIS consortium's work is fully acknowledged here.
+ */
+package org.geotools.parameter;
+
+// J2SE direct dependencies
+import java.util.Set;
+import java.util.Map;
+import java.util.HashSet;
+import java.util.Collections;
+import javax.units.Unit;
+
+// OpenGIS dependencies
+import org.opengis.util.CodeList;
+
+// Geotools dependencies
+import org.geotools.referencing.IdentifiedObject;
+import org.geotools.resources.ClassChanger;
+import org.geotools.resources.rsc.Resources;
+import org.geotools.resources.rsc.ResourceKeys;
+
+
+/**
+ * The definition of a parameter used by an operation method. Most parameter values are
+ * numeric, but other types of parameter values are possible. For numeric values, the
+ * {@linkplain #getValueClass value class} is usually <code>{@linkplain Double}.class</code>,
+ * <code>{@linkplain Integer}.class</code> or some other Java wrapper class.
+ *
+ * @version $Id: OperationParameter.java 6888 2004-07-14 18:45:44Z desruisseaux $
+ * @author Martin Desruisseaux
+ *
+ * @see org.geotools.parameter.ParameterValue
+ * @see org.geotools.parameter.OperationParameterGroup
+ */
+public class OperationParameter extends GeneralOperationParameter implements org.opengis.parameter.OperationParameter {
+ /**
+ * Serial number for interoperability with different versions.
+ */
+ private static final long serialVersionUID = -295668622297737705L;
+
+ /**
+ * The class that describe the type of the parameter.
+ * This class can never be a primitive.
+ */
+ private final Class valueClass;
+
+ /**
+ * The class that describe the type of the parameter, maybe as a primitive. This is the
+ * value class that the user specified at construction time. This is usually identical
+ * to <code>valueClass</code>. However, some optimization may be done for some primitive
+ * types, for example a special implementation of {@link ParameterValue} for the
+ * <code>double</code> type.
+ */
+ private final Class primitiveClass;
+
+ /**
+ * A immutable, finite set of valid values (usually from a {linkplain org.opengis.util.CodeList
+ * code list}) or <code>null</code> if it doesn't apply. This set is immutable.
+ */
+ private final Set validValues;
+
+ /**
+ * The default value for the parameter, or <code>null</code>.
+ */
+ private final Object defaultValue;
+
+ /**
+ * The minimum parameter value, or <code>null</code>.
+ */
+ private final Comparable minimum;
+
+ /**
+ * The maximum parameter value, or <code>null</code>.
+ */
+ private final Comparable maximum;
+
+ /**
+ * The unit for default, minimum and maximum values, or <code>null</code>.
+ */
+ private final Unit unit;
+
+ /**
+ * Construct a parameter for a range of integer values.
+ *
+ * @param name The parameter name.
+ * @param defaultValue The default value for the parameter.
+ * @param minimum The minimum parameter value, or {@link Integer#MIN_VALUE} if none.
+ * @param maximum The maximum parameter value, or {@link Integer#MAX_VALUE} if none.
+ */
+ public OperationParameter(final String name,
+ final int defaultValue,
+ final int minimum,
+ final int maximum)
+ {
+ this(name, Integer.class, ParameterValue.wrap(defaultValue),
+ minimum == Integer.MIN_VALUE ? null : ParameterValue.wrap(minimum),
+ maximum == Integer.MAX_VALUE ? null : ParameterValue.wrap(maximum), null);
+ }
+
+ /**
+ * Construct a parameter for a range of floating point values. The parameter is mandatory
+ * if no default value is specified (i.e. <code>defaultValue</code> is <code>NaN</code>).
+ * Otherwise, the parameter will be optional.
+ *
+ * @param name The parameter name.
+ * @param defaultValue The default value for the parameter, or {@link Double#NaN} if none.
+ * @param minimum The minimum parameter value, or {@link Double#NEGATIVE_INFINITY} if none.
+ * @param maximum The maximum parameter value, or {@link Double#POSITIVE_INFINITY} if none.
+ * @param unit The unit for default, minimum and maximum values.
+ */
+ public OperationParameter(final String name,
+ final double defaultValue,
+ final double minimum,
+ final double maximum,
+ final Unit unit)
+ {
+ this(name, Double.class,
+ Double.isNaN(defaultValue) ? null : ParameterValue.wrap(defaultValue),
+ minimum == Double.NEGATIVE_INFINITY ? null : ParameterValue.wrap(minimum),
+ maximum == Double.POSITIVE_INFINITY ? null : ParameterValue.wrap(maximum), unit);
+ }
+
+ /**
+ * Construct a parameter from a range of comparable objects. The parameter is mandatory
+ * if no default value is specified (i.e. <code>defaultValue</code> is <code>null</code>).
+ * Otherwise, the parameter will be optional.
+ *
+ * @param name The parameter name.
+ * @param valueClass The class that describe the type of the parameter.
+ * @param defaultValue The default value for the parameter, or <code>null</code>.
+ * @param minimum The minimum parameter value, or <code>null</code>.
+ * @param maximum The maximum parameter value, or <code>null</code>.
+ * @param unit The unit for default, minimum and maximum values, or <code>null</code>.
+ */
+ public OperationParameter(final String name,
+ final Class valueClass,
+ final Comparable defaultValue,
+ final Comparable minimum,
+ final Comparable maximum,
+ final Unit unit)
+ {
+ this(Collections.singletonMap("name", name),
+ (defaultValue!=null) ? 0 : 1, 1, valueClass, null, defaultValue, minimum, maximum, unit);
+ }
+
+ /**
+ * Construct a parameter for a {@linkplain CodeList code list} (or enumeration).
+ *
+ * @param name The parameter name.
+ * @param defaultValue The default value.
+ */
+ public OperationParameter(final String name,
+ final CodeList defaultValue)
+ {
+ this(name, defaultValue.getClass(), defaultValue);
+ }
+
+ /**
+ * Construct a parameter for a {@linkplain CodeList code list} (or enumeration).
+ *
+ * @param name The parameter name.
+ * @param valueClass The class that describe the type of the parameter.
+ * Must be a subclass of {@link CodeList}.
+ * @param defaultValue The default value, or <code>null</code>.
+ */
+ private OperationParameter(final String name,
+ final Class valueClass,
+ final CodeList defaultValue)
+ {
+ this(name, valueClass, getCodeLists(valueClass), defaultValue);
+ }
+
+ /**
+ * Returns the enumeration found in the specified <code>CodeList</code> class.
+ * Returns <code>null</code> if no values were found. Note: this code should
+ * be defined in the constructor. Current method is a work around for RFE #4093999
+ * in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").
+ */
+ private static CodeList[] getCodeLists(final Class type) {
+ try {
+ return (CodeList[]) type.getMethod("values", null).invoke(null, null);
+ } catch (Exception exception) {
+ // No code list defined. Not a problem; we will just
+ // not provided any set of code to check against.
+ return null;
+ }
+ }
+
+ /**
+ * Construct a parameter for a set of predefined values.
+ *
+ * @param name The parameter name.
+ * @param valueClass The class that describe the type of the parameter.
+ * @param validValues A finite set of valid values (usually from a
+ * {linkplain org.opengis.util.CodeList code list}) or <code>null</code>
+ * if it doesn't apply.
+ * @param defaultValue The default value for the parameter, or <code>null</code>.
+ */
+ public OperationParameter(final String name,
+ final Class valueClass,
+ final Object[] validValues,
+ final Object defaultValue)
+ {
+ this(Collections.singletonMap("name", name),
+ (defaultValue!=null) ? 0 : 1, 1, valueClass, validValues, defaultValue, null, null, null);
+ }
+
+ /**
+ * Construct a parameter from a set of properties. The properties map is
+ * given unchanged to the {@linkplain IdentifiedObject#IdentifiedObject(Map)
+ * super-class constructor}.
+ *
+ * @param properties Set of properties. Should contains at least <code>"name"</code>.
+ * @param minimumOccurs The {@linkplain #getMinimumOccurs minimum number of times}
+ * that values for this parameter group or parameter are required.
+ * @param maximumOccurs The {@linkplain #getMaximumOccurs maximum number of times}
+ * that values for this parameter group or parameter are required.
+ * @param valueClass The class that describe the type of the parameter.
+ * @param validValues A finite set of valid values (usually from a
+ * {linkplain org.opengis.util.CodeList code list}) or <code>null</code>
+ * if it doesn't apply.
+ * @param defaultValue The default value for the parameter, or <code>null</code>.
+ * @param minimum The minimum parameter value, or <code>null</code>.
+ * @param maximum The maximum parameter value, or <code>null</code>.
+ * @param unit The unit for default, minimum and maximum values.
+ */
+ public OperationParameter(final Map properties,
+ final int minimumOccurs,
+ final int maximumOccurs,
+ Class valueClass,
+ final Object[] validValues,
+ final Object defaultValue,
+ final Comparable minimum,
+ final Comparable maximum,
+ final Unit unit)
+ {
+ super(properties, minimumOccurs, maximumOccurs);
+ this.primitiveClass = valueClass;
+ this.defaultValue = defaultValue;
+ this.minimum = minimum;
+ this.maximum = maximum;
+ this.unit = unit;
+ GeneralParameterValue.ensureNonNull("valueClass", valueClass);
+ if (valueClass.isPrimitive()) {
+ valueClass = ClassChanger.toWrapper(valueClass);
+ }
+ this.valueClass = valueClass;
+ GeneralParameterValue.ensureValidClass(valueClass, defaultValue);
+ GeneralParameterValue.ensureValidClass(valueClass, minimum);
+ GeneralParameterValue.ensureValidClass(valueClass, maximum);
+ if (minimum!=null && maximum!=null) {
+ if (minimum.compareTo(maximum) > 0) {
+ throw new IllegalArgumentException(Resources.format(
+ ResourceKeys.ERROR_BAD_RANGE_$2, minimum, maximum));
+ }
+ }
+ if (validValues != null) {
+ final Set valids = new HashSet(Math.max(validValues.length*4/3 + 1, 8), 0.75f);
+ for (int i=0; i<validValues.length; i++) {
+ final Object value = validValues[i];
+ GeneralParameterValue.ensureValidClass(valueClass, value);
+ valids.add(value);
+ }
+ this.validValues = Collections.unmodifiableSet(valids);
+ } else {
+ this.validValues = null;
+ }
+ }
+
+ /**
+ * Creates a new instance of {@linkplain org.geotools.parameter.ParameterValue parameter value}
+ * initialized with the {@linkplain #getDefaultValue default value}.
+ * The {@linkplain org.geotools.parameter.ParameterValue#getDescriptor parameter value
+ * descriptor} for the created parameter value will be <code>this</code> object.
+ * <br><br>
+ * If the {@linkplain #getValueClass value class} specified at construction time was
+ * a primitive type (e.g. <code>Double.{@linkplain Double#TYPE TYPE}</code> instead
+ * of <code>{@linkplain Double}.class</code>), then this method may returns a specialized
+ * parameter value implementation for this primitive type. Specialized implementations may
+ * use less storage space and be more flexible during conversions, but this flexibility is
+ * not always wanted.
+ */
+ public org.opengis.parameter.GeneralParameterValue createValue() {
+ if (Double.TYPE.equals(primitiveClass)) {
+ return new ParameterRealValue(this);
+ }
+ return new ParameterValue(this);
+ }
+
+ /**
+ * Returns the class that describe the type of the parameter. If the value class specified
+ * at construction time was a primitive type (e.g. <code>double</code>), it is converted to
+ * the corresponding wrapper class (e.g. {@link Double}).
+ *
+ * @return The parameter value class (never a primitive type).
+ */
+ public Class getValueClass() {
+ return valueClass;
+ }
+
+ /**
+ * If this parameter allows only a finite set of values, returns this set.
+ * This set is usually a {linkplain org.opengis.util.CodeList code list} or
+ * enumerations. This method returns <code>null</code> if this parameter
+ * doesn't limits values to a finite set.
+ *
+ * @return A finite set of valid values (usually from a
+ * {linkplain org.opengis.util.CodeList code list}),
+ * or <code>null</code> if it doesn't apply.
+ */
+ public Set getValidValues() {
+ return validValues;
+ }
+
+ /**
+ * Returns the default value for the parameter. The return type can be any type
+ * including a {@link Number} or a {@link String}. If there is no default value,
+ * then this method returns <code>null</code>.
+ *
+ * @return The default value, or <code>null</code> in none.
+ */
+ public Object getDefaultValue() {
+ return defaultValue;
+ }
+
+ /**
+ * Returns the minimum parameter value. If there is no minimum value, or if minimum
+ * value is inappropriate for the {@linkplain #getValueClass parameter type}, then
+ * this method returns <code>null</code>.
+ *
+ * @return The minimum parameter value (often an instance of {@link Double}), or <code>null</code>.
+ */
+ public Comparable getMinimumValue() {
+ return minimum;
+ }
+
+ /**
+ * Returns the maximum parameter value. If there is no maximum value, or if maximum
+ * value is inappropriate for the {@linkplain #getValueClass parameter type}, then
+ * this method returns <code>null</code>.
+ *
+ * @return The minimum parameter value (often an instance of {@link Double}), or <code>null</code>.
+ */
+ public Comparable getMaximumValue() {
+ return maximum;
+ }
+
+ /**
+ * Returns the unit for
+ * {@linkplain #getDefaultValue default},
+ * {@linkplain #getMinimumValue minimum} and
+ * {@linkplain #getMaximumValue maximum} values.
+ * This attribute apply only if the values is of numeric type (usually an instance
+ * of {@link Double}).
+ *
+ * @return The unit for numeric value, or <code>null</code> if it
+ * doesn't apply to the value type.
+ */
+ public Unit getUnit() {
+ return unit;
+ }
+
+ /**
+ * Compares the specified object with this parameter for equality.
+ *
+ * @param object The object to compare to <code>this</code>.
+ * @param compareMetadata <code>true</code> for performing a strict comparaison, or
+ * <code>false</code> for comparing only properties relevant to transformations.
+ * @return <code>true</code> if both objects are equal.
+ */
+ public boolean equals(final IdentifiedObject object, final boolean compareMetadata) {
+ if (super.equals(object, compareMetadata)) {
+ final OperationParameter that = (OperationParameter) object;
+ return equals(this.primitiveClass, that.primitiveClass) &&
+ equals(this.validValues, that.validValues) &&
+ equals(this.defaultValue, that.defaultValue) &&
+ equals(this.minimum, that.minimum) &&
+ equals(this.maximum, that.maximum) &&
+ equals(this.unit, that.unit);
+ }
+ return false;
+ }
+
+ /**
+ * Returns a hash value for this parameter.
+ *
+ * @return The hash code value. This value doesn't need to be the same
+ * in past or future versions of this class.
+ */
+ public int hashCode() {
+ int code = super.hashCode()*37 + valueClass.hashCode();
+ if (defaultValue != null) code += (37) *defaultValue.hashCode();
+ if (minimum != null) code += (37*37) *minimum .hashCode();
+ if (maximum != null) code += (37*37*37)*maximum .hashCode();
+ if (unit != null) code += unit .hashCode();
+ return code;
+ }
+}
+
+ </pre></td>
+<td><pre><span class="add">/*</span>
+<span class="add"> * Geotools 2 - OpenSource mapping toolkit</span>
+<span class="add"> * (C) 2004, Geotools Project Managment Committee (PMC)</span>
+<span class="add"> * (C) 2004, Institut de Recherche pour le Développement</span>
+<span class="add"> *</span>
+<span class="add"> * This library is free software; you can redistribute it and/or</span>
+<span class="add"> * modify it under the terms of the GNU Lesser General Public</span>
+<span class="add"> * License as published by the Free Software Foundation; either</span>
+<span class="add"> * version 2.1 of the License, or (at your option) any later version.</span>
+<span class="add"> *</span>
+<span class="add"> * This library is distributed in the hope that it will be useful,</span>
+<span class="add"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<span class="add"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<span class="add"> * Lesser General Public License for more details.</span>
+<span class="add"> *</span>
+<span class="add"> * You should have received a copy of the GNU Lesser General Public</span>
+<span class="add"> * License along with this library; if not, write to the Free Software</span>
+<span class="add"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<span class="add"> *</span>
+<span class="add"> * This package contains documentation from OpenGIS specifications.</span>
+<span class="add"> * OpenGIS consortium's work is fully acknowledged here.</span>
+<span class="add"> */</span>
+<span class="add">package org.geotools.parameter;</span>
+<span class="add"></span>
+<span class="add">// J2SE direct dependencies</span>
+<span class="add">import java.util.HashMap;</span>
+<span class="add">import java.util.Set;</span>
+<span class="add">import java.util.Map;</span>
+<span class="add">import java.util.HashSet;</span>
+<span class="add">import java.util.Collections;</span>
+<span class="add">import javax.units.Unit;</span>
+<span class="add"></span>
+<span class="add">// OpenGIS dependencies</span>
+<span class="add">import org.opengis.util.CodeList;</span>
+<span class="add"></span>
+<span class="add">// Geotools dependencies</span>
+<span class="add">import org.geotools.referencing.IdentifiedObject;</span>
+<span class="add">import org.geotools.resources.ClassChanger;</span>
+<span class="add">import org.geotools.resources.rsc.Resources;</span>
+<span class="add">import org.geotools.resources.rsc.ResourceKeys;</span>
+<span class="add"></span>
+<span class="add"></span>
+<span class="add">/**</span>
+<span class="add"> * The definition of a parameter used by an operation method.</span>
+<span class="add"> * <p></span>
+<span class="add"> * For Coordindate Reference Systems most parameter values are numeric, but other types</span>
+<span class="add"> * of parameter values are possible.</span>
+<span class="add"> * <ul></span>
+<span class="add"> * <li></span>
+<span class="add"> * For numeric values, the {@linkplain #getValueClass value class} is usually</span>
+<span class="add"> * <code>{@linkplain Double}.class</code>, <code>{@linkplain Integer}.class</code> or</span>
+<span class="add"> * some other Java wrapper class.</span>
+<span class="add"> * </li></span>
+<span class="add"> * <li>For non numeric</span>
+<span class="add"> * </li></span>
+<span class="add"> * </ul></span>
+<span class="add"> * </p></span>
+<span class="add"> *</span>
+<span class="add"> * @version $Id$</span>
+<span class="add"> * @author Martin Desruisseaux</span>
+<span class="add"> *</span>
+<span class="add"> * @see org.geotools.parameter.Parameter</span>
+<span class="add"> * @see org.geotools.parameter.ParameterGroupDescriptor</span>
+<span class="add"> */</span>
+<span class="add">public class ParameterDescriptor extends AbstractParameterDescriptor implements org.opengis.parameter.ParameterDescriptor {</span>
+<span class="add"> /**</span>
+<span class="add"> * Serial number for interoperability with different versions.</span>
+<span class="add"> */</span>
+<span class="add"> private static final long serialVersionUID = -295668622297737705L;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * The class that describe the type of the parameter.</span>
+<span class="add"> * This class can never be a primitive.</span>
+<span class="add"> */</span>
+<span class="add"> private final Class valueClass;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * The class that describe the type of the parameter, maybe as a primitive. This is the</span>
+<span class="add"> * value class that the user specified at construction time. This is usually identical</span>
+<span class="add"> * to <code>valueClass</code>. However, some optimization may be done for some primitive</span>
+<span class="add"> * types, for example a special implementation of {@link Parameter} for the</span>
+<span class="add"> * <code>double</code> type.</span>
+<span class="add"> */</span>
+<span class="add"> private final Class primitiveClass;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * A immutable, finite set of valid values (usually from a {linkplain org.opengis.util.CodeList</span>
+<span class="add"> * code list}) or <code>null</code> if it doesn't apply. This set is immutable.</span>
+<span class="add"> */</span>
+<span class="add"> private final Set validValues;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * The default value for the parameter, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> private final Object defaultValue;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * The minimum parameter value, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> private final Comparable minimum;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * The maximum parameter value, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> private final Comparable maximum;</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * The unit for default, minimum and maximum values, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> private final Unit unit;</span>
+<span class="add"></span>
+<span class="add"> private static final Map properties( String name, String remarks ){</span>
+<span class="add"> if (remarks == null ){</span>
+<span class="add"> return Collections.singletonMap("name", name);</span>
+<span class="add"> }</span>
+<span class="add"> Map properties = new HashMap(2);</span>
+<span class="add"> properties.put("name", name );</span>
+<span class="add"> properties.put("remarks", name );</span>
+<span class="add"> return properties;</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Similar to DataStore PARAM constuctor.</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param true1</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(String name, String description, Object defaultValue, boolean required ) {</span>
+<span class="add"> this( properties( name, description ),</span>
+<span class="add"> required ? 1 : 0,</span>
+<span class="add"> 1,</span>
+<span class="add"> defaultValue.getClass(),</span>
+<span class="add"> null,</span>
+<span class="add"> defaultValue,</span>
+<span class="add"> null,</span>
+<span class="add"> null,</span>
+<span class="add"> null );</span>
+<span class="add"></span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter for a range of integer values.</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param defaultValue The default value for the parameter.</span>
+<span class="add"> * @param minimum The minimum parameter value, or {@link Integer#MIN_VALUE} if none.</span>
+<span class="add"> * @param maximum The maximum parameter value, or {@link Integer#MAX_VALUE} if none.</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(final String name,</span>
+<span class="add"> final int defaultValue,</span>
+<span class="add"> final int minimum,</span>
+<span class="add"> final int maximum)</span>
+<span class="add"> {</span>
+<span class="add"> this(name, Integer.class, Parameter.wrap(defaultValue),</span>
+<span class="add"> minimum == Integer.MIN_VALUE ? null : Parameter.wrap(minimum),</span>
+<span class="add"> maximum == Integer.MAX_VALUE ? null : Parameter.wrap(maximum), null);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter for a range of floating point values. The parameter is mandatory</span>
+<span class="add"> * if no default value is specified (i.e. <code>defaultValue</code> is <code>NaN</code>).</span>
+<span class="add"> * Otherwise, the parameter will be optional.</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param defaultValue The default value for the parameter, or {@link Double#NaN} if none.</span>
+<span class="add"> * @param minimum The minimum parameter value, or {@link Double#NEGATIVE_INFINITY} if none.</span>
+<span class="add"> * @param maximum The maximum parameter value, or {@link Double#POSITIVE_INFINITY} if none.</span>
+<span class="add"> * @param unit The unit for default, minimum and maximum values.</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(final String name,</span>
+<span class="add"> final double defaultValue,</span>
+<span class="add"> final double minimum,</span>
+<span class="add"> final double maximum,</span>
+<span class="add"> final Unit unit)</span>
+<span class="add"> {</span>
+<span class="add"> this(name, Double.class,</span>
+<span class="add"> Double.isNaN(defaultValue) ? null : Parameter.wrap(defaultValue),</span>
+<span class="add"> minimum == Double.NEGATIVE_INFINITY ? null : Parameter.wrap(minimum),</span>
+<span class="add"> maximum == Double.POSITIVE_INFINITY ? null : Parameter.wrap(maximum), unit);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter from a range of comparable objects. The parameter is mandatory</span>
+<span class="add"> * if no default value is specified (i.e. <code>defaultValue</code> is <code>null</code>).</span>
+<span class="add"> * Otherwise, the parameter will be optional.</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param valueClass The class that describe the type of the parameter.</span>
+<span class="add"> * @param defaultValue The default value for the parameter, or <code>null</code>.</span>
+<span class="add"> * @param minimum The minimum parameter value, or <code>null</code>.</span>
+<span class="add"> * @param maximum The maximum parameter value, or <code>null</code>.</span>
+<span class="add"> * @param unit The unit for default, minimum and maximum values, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(final String name,</span>
+<span class="add"> final Class valueClass,</span>
+<span class="add"> final Comparable defaultValue,</span>
+<span class="add"> final Comparable minimum,</span>
+<span class="add"> final Comparable maximum,</span>
+<span class="add"> final Unit unit)</span>
+<span class="add"> {</span>
+<span class="add"> this(Collections.singletonMap("name", name),</span>
+<span class="add"> (defaultValue!=null) ? 0 : 1, 1, valueClass, null, defaultValue, minimum, maximum, unit);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter for a {@linkplain CodeList code list} (or enumeration).</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param defaultValue The default value.</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(final String name,</span>
+<span class="add"> final CodeList defaultValue)</span>
+<span class="add"> {</span>
+<span class="add"> this(name, defaultValue.getClass(), defaultValue);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter for a {@linkplain CodeList code list} (or enumeration).</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param valueClass The class that describe the type of the parameter.</span>
+<span class="add"> * Must be a subclass of {@link CodeList}.</span>
+<span class="add"> * @param defaultValue The default value, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> private ParameterDescriptor(final String name,</span>
+<span class="add"> final Class valueClass,</span>
+<span class="add"> final CodeList defaultValue)</span>
+<span class="add"> {</span>
+<span class="add"> this(name, valueClass, getCodeLists(valueClass), defaultValue);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns the enumeration found in the specified <code>CodeList</code> class.</span>
+<span class="add"> * Returns <code>null</code> if no values were found. Note: this code should</span>
+<span class="add"> * be defined in the constructor. Current method is a work around for RFE #4093999</span>
+<span class="add"> * in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").</span>
+<span class="add"> */</span>
+<span class="add"> private static CodeList[] getCodeLists(final Class type) {</span>
+<span class="add"> try {</span>
+<span class="add"> return (CodeList[]) type.getMethod("values", null).invoke(null, null);</span>
+<span class="add"> } catch (Exception exception) {</span>
+<span class="add"> // No code list defined. Not a problem; we will just</span>
+<span class="add"> // not provided any set of code to check against.</span>
+<span class="add"> return null;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter for a set of predefined values.</span>
+<span class="add"> *</span>
+<span class="add"> * @param name The parameter name.</span>
+<span class="add"> * @param valueClass The class that describe the type of the parameter.</span>
+<span class="add"> * @param validValues A finite set of valid values (usually from a</span>
+<span class="add"> * {linkplain org.opengis.util.CodeList code list}) or <code>null</code></span>
+<span class="add"> * if it doesn't apply.</span>
+<span class="add"> * @param defaultValue The default value for the parameter, or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(final String name,</span>
+<span class="add"> final Class valueClass,</span>
+<span class="add"> final Object[] validValues,</span>
+<span class="add"> final Object defaultValue)</span>
+<span class="add"> {</span>
+<span class="add"> this(Collections.singletonMap("name", name),</span>
+<span class="add"> (defaultValue!=null) ? 0 : 1, 1, valueClass, validValues, defaultValue, null, null, null);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Construct a parameter from a set of properties. The properties map is</span>
+<span class="add"> * given unchanged to the {@linkplain IdentifiedObject#IdentifiedObject(Map)</span>
+<span class="add"> * super-class constructor}.</span>
+<span class="add"> *</span>
+<span class="add"> * @param properties Set of properties. Should contains at least <code>"name"</code>.</span>
+<span class="add"> * @param minimumOccurs The {@linkplain #getMinimumOccurs minimum number of times}</span>
+<span class="add"> * that values for this parameter group or parameter are required.</span>
+<span class="add"> * @param maximumOccurs The {@linkplain #getMaximumOccurs maximum number of times}</span>
+<span class="add"> * that values for this parameter group or parameter are required.</span>
+<span class="add"> * @param valueClass The class that describe the type of the parameter.</span>
+<span class="add"> * @param validValues A finite set of valid values (usually from a</span>
+<span class="add"> * {linkplain org.opengis.util.CodeList code list}) or <code>null</code></span>
+<span class="add"> * if it doesn't apply.</span>
+<span class="add"> * @param defaultValue The default value for the parameter, or <code>null</code>.</span>
+<span class="add"> * @param minimum The minimum parameter value, or <code>null</code>.</span>
+<span class="add"> * @param maximum The maximum parameter value, or <code>null</code>.</span>
+<span class="add"> * @param unit The unit for default, minimum and maximum values.</span>
+<span class="add"> */</span>
+<span class="add"> public ParameterDescriptor(final Map properties,</span>
+<span class="add"> final int minimumOccurs,</span>
+<span class="add"> final int maximumOccurs,</span>
+<span class="add"> Class valueClass,</span>
+<span class="add"> final Object[] validValues,</span>
+<span class="add"> final Object defaultValue,</span>
+<span class="add"> final Comparable minimum,</span>
+<span class="add"> final Comparable maximum,</span>
+<span class="add"> final Unit unit)</span>
+<span class="add"> {</span>
+<span class="add"> super(properties, minimumOccurs, maximumOccurs);</span>
+<span class="add"> this.primitiveClass = valueClass;</span>
+<span class="add"> this.defaultValue = defaultValue;</span>
+<span class="add"> this.minimum = minimum;</span>
+<span class="add"> this.maximum = maximum;</span>
+<span class="add"> this.unit = unit;</span>
+<span class="add"> AbstractParameter.ensureNonNull("valueClass", valueClass);</span>
+<span class="add"> if (valueClass.isPrimitive()) {</span>
+<span class="add"> valueClass = ClassChanger.toWrapper(valueClass);</span>
+<span class="add"> }</span>
+<span class="add"> this.valueClass = valueClass;</span>
+<span class="add"> AbstractParameter.ensureValidClass(valueClass, defaultValue);</span>
+<span class="add"> AbstractParameter.ensureValidClass(valueClass, minimum);</span>
+<span class="add"> AbstractParameter.ensureValidClass(valueClass, maximum);</span>
+<span class="add"> if (minimum!=null && maximum!=null) {</span>
+<span class="add"> if (minimum.compareTo(maximum) > 0) {</span>
+<span class="add"> throw new IllegalArgumentException(Resources.format(</span>
+<span class="add"> ResourceKeys.ERROR_BAD_RANGE_$2, minimum, maximum));</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> if (validValues != null) {</span>
+<span class="add"> final Set valids = new HashSet(Math.max(validValues.length*4/3 + 1, 8), 0.75f);</span>
+<span class="add"> for (int i=0; i<validValues.length; i++) {</span>
+<span class="add"> final Object value = validValues[i];</span>
+<span class="add"> AbstractParameter.ensureValidClass(valueClass, value);</span>
+<span class="add"> valids.add(value);</span>
+<span class="add"> }</span>
+<span class="add"> this.validValues = Collections.unmodifiableSet(valids);</span>
+<span class="add"> } else {</span>
+<span class="add"> this.validValues = null;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Creates a new instance of {@linkplain org.geotools.parameter.Parameter parameter value}</span>
+<span class="add"> * initialized with the {@linkplain #getDefaultValue default value}.</span>
+<span class="add"> * The {@linkplain org.geotools.parameter.Parameter#getDescriptor parameter value</span>
+<span class="add"> * descriptor} for the created parameter value will be <code>this</code> object.</span>
+<span class="add"> * <br><br></span>
+<span class="add"> * If the {@linkplain #getValueClass value class} specified at construction time was</span>
+<span class="add"> * a primitive type (e.g. <code>Double.{@linkplain Double#TYPE TYPE}</code> instead</span>
+<span class="add"> * of <code>{@linkplain Double}.class</code>), then this method may returns a specialized</span>
+<span class="add"> * parameter value implementation for this primitive type. Specialized implementations may</span>
+<span class="add"> * use less storage space and be more flexible during conversions, but this flexibility is</span>
+<span class="add"> * not always wanted.</span>
+<span class="add"> */</span>
+<span class="add"> public org.opengis.parameter.GeneralParameterValue createValue() {</span>
+<span class="add"> if (Double.TYPE.equals(primitiveClass)) {</span>
+<span class="add"> return new ParameterReal(this);</span>
+<span class="add"> }</span>
+<span class="add"> return new Parameter(this);</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns the class that describe the type of the parameter. If the value class specified</span>
+<span class="add"> * at construction time was a primitive type (e.g. <code>double</code>), it is converted to</span>
+<span class="add"> * the corresponding wrapper class (e.g. {@link Double}).</span>
+<span class="add"> *</span>
+<span class="add"> * @return The parameter value class (never a primitive type).</span>
+<span class="add"> */</span>
+<span class="add"> public Class getValueClass() {</span>
+<span class="add"> return valueClass;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * If this parameter allows only a finite set of values, returns this set.</span>
+<span class="add"> * This set is usually a {linkplain org.opengis.util.CodeList code list} or</span>
+<span class="add"> * enumerations. This method returns <code>null</code> if this parameter</span>
+<span class="add"> * doesn't limits values to a finite set.</span>
+<span class="add"> *</span>
+<span class="add"> * @return A finite set of valid values (usually from a</span>
+<span class="add"> * {linkplain org.opengis.util.CodeList code list}),</span>
+<span class="add"> * or <code>null</code> if it doesn't apply.</span>
+<span class="add"> */</span>
+<span class="add"> public Set getValidValues() {</span>
+<span class="add"> return validValues;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns the default value for the parameter. The return type can be any type</span>
+<span class="add"> * including a {@link Number} or a {@link String}. If there is no default value,</span>
+<span class="add"> * then this method returns <code>null</code>.</span>
+<span class="add"> *</span>
+<span class="add"> * @return The default value, or <code>null</code> in none.</span>
+<span class="add"> */</span>
+<span class="add"> public Object getDefaultValue() {</span>
+<span class="add"> return defaultValue;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns the minimum parameter value. If there is no minimum value, or if minimum</span>
+<span class="add"> * value is inappropriate for the {@linkplain #getValueClass parameter type}, then</span>
+<span class="add"> * this method returns <code>null</code>.</span>
+<span class="add"> *</span>
+<span class="add"> * @return The minimum parameter value (often an instance of {@link Double}), or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> public Comparable getMinimumValue() {</span>
+<span class="add"> return minimum;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns the maximum parameter value. If there is no maximum value, or if maximum</span>
+<span class="add"> * value is inappropriate for the {@linkplain #getValueClass parameter type}, then</span>
+<span class="add"> * this method returns <code>null</code>.</span>
+<span class="add"> *</span>
+<span class="add"> * @return The minimum parameter value (often an instance of {@link Double}), or <code>null</code>.</span>
+<span class="add"> */</span>
+<span class="add"> public Comparable getMaximumValue() {</span>
+<span class="add"> return maximum;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns the unit for</span>
+<span class="add"> * {@linkplain #getDefaultValue default},</span>
+<span class="add"> * {@linkplain #getMinimumValue minimum} and</span>
+<span class="add"> * {@linkplain #getMaximumValue maximum} values.</span>
+<span class="add"> * This attribute apply only if the values is of numeric type (usually an instance</span>
+<span class="add"> * of {@link Double}).</span>
+<span class="add"> *</span>
+<span class="add"> * @return The unit for numeric value, or <code>null</code> if it</span>
+<span class="add"> * doesn't apply to the value type.</span>
+<span class="add"> */</span>
+<span class="add"> public Unit getUnit() {</span>
+<span class="add"> return unit;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Compares the specified object with this parameter for equality.</span>
+<span class="add"> *</span>
+<span class="add"> * @param object The object to compare to <code>this</code>.</span>
+<span class="add"> * @param compareMetadata <code>true</code> for performing a strict comparaison, or</span>
+<span class="add"> * <code>false</code> for comparing only properties relevant to transformations.</span>
+<span class="add"> * @return <code>true</code> if both objects are equal.</span>
+<span class="add"> */</span>
+<span class="add"> public boolean equals(final IdentifiedObject object, final boolean compareMetadata) {</span>
+<span class="add"> if (super.equals(object, compareMetadata)) {</span>
+<span class="add"> final ParameterDescriptor that = (ParameterDescriptor) object;</span>
+<span class="add"> return equals(this.primitiveClass, that.primitiveClass) &&</span>
+<span class="add"> equals(this.validValues, that.validValues) &&</span>
+<span class="add"> equals(this.defaultValue, that.defaultValue) &&</span>
+<span class="add"> equals(this.minimum, that.minimum) &&</span>
+<span class="add"> equals(this.maximum, that.maximum) &&</span>
+<span class="add"> equals(this.unit, that.unit);</span>
+<span class="add"> }</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /**</span>
+<span class="add"> * Returns a hash value for this parameter.</span>
+<span class="add"> *</span>
+<span class="add"> * @return The hash code value. This value doesn't need to be the same</span>
+<span class="add"> * in past or future versions of this class.</span>
+<span class="add"> */</span>
+<span class="add"> public int hashCode() {</span>
+<span class="add"> int code = super.hashCode()*37 + valueClass.hashCode();</span>
+<span class="add"> if (defaultValue != null) code += (37) *defaultValue.hashCode();</span>
+<span class="add"> if (minimum != null) code += (37*37) *minimum .hashCode();</span>
+<span class="add"> if (maximum != null) code += (37*37*37)*maximum .hashCode();</span>
+<span class="add"> if (unit != null) code += unit .hashCode();</span>
+<span class="add"> return code;</span>
+<span class="add"> }</span>
+<span class="add">}</span></pre></td></tr>
+</table>
+ </div>
+ </body>
+</html>
Propchange: sis/ip-review/rev/07846/DefaultParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/ip-review/rev/07846/DefaultParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: sis/ip-review/rev/07846/Parameters.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/07846/Parameters.xhtml?rev=1565636&view=auto
==============================================================================
--- sis/ip-review/rev/07846/Parameters.xhtml (added)
+++ sis/ip-review/rev/07846/Parameters.xhtml Fri Feb 7 12:47:50 2014
@@ -0,0 +1,288 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>Parameters changes for revisions 7835:7846</title>
+ <style type="text/css" media="all">
+ @import url("../../reports.css");
+ </style>
+ </head>
+ <body>
+ <div>
+ <h1>Parameters changes for revisions 7835:7846</h1>
+ <p>This class was initially contributed by Jody Garnett.
+ Most methods do not exist anymore in Geotk/SIS.
+ For example:</p>
+ <ul>
+ <li>The <code>id(â¦)</code> method in this commit just returns <code>null</code>.</li>
+ <li>The <code>allowed(â¦)</code> method just performs the work of <code>group.getParameters().contains(type)</code>.</li>
+ <li>The <code>array(â¦)</code> method does a very simple work which is usually not needed.</li>
+ <li>The <code>count(â¦)</code> method is not needed.</li>
+ <li>The <code>indexOf(â¦)</code> method is not needed.</li>
+ </ul>
+ <p>The following methods still present in Geotk will not be ported to SIS.
+ A search in the Geotk code base has shown that they were not used anyway:</p>
+ <ul>
+ <li><code>isValid(â¦)</code></li>
+ <li><code>isValidValue(â¦)</code></li>
+ <li><code>list(â¦)</code> (named <code>search(â¦)</code> in Geotk)</li>
+ </ul>
+ <p>Those methods have been flagged with a <code>// LGPL</code> comment in Geotk code.</p>
+
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r7835:7846 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/parameter/Parameters.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 7846</th></tr>
+<tr>
+<td><pre><span class="add">/*</span>
+<span class="add"> * Geotools 2 - OpenSource mapping toolkit</span>
+<span class="add"> * (C) 2004, Geotools Project Managment Committee (PMC)</span>
+<span class="add"> * (C) 2004, Institut de Recherche pour le Développement</span>
+<span class="add"> *</span>
+<span class="add"> * This library is free software; you can redistribute it and/or</span>
+<span class="add"> * modify it under the terms of the GNU Lesser General Public</span>
+<span class="add"> * License as published by the Free Software Foundation; either</span>
+<span class="add"> * version 2.1 of the License, or (at your option) any later version.</span>
+<span class="add"> *</span>
+<span class="add"> * This library is distributed in the hope that it will be useful,</span>
+<span class="add"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<span class="add"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
+<span class="add"> * Lesser General Public License for more details.</span>
+<span class="add"> *</span>
+<span class="add"> * You should have received a copy of the GNU Lesser General Public</span>
+<span class="add"> * License along with this library; if not, write to the Free Software</span>
+<span class="add"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<span class="add"> *</span>
+<span class="add"> * This package contains documentation from OpenGIS specifications.</span>
+<span class="add"> * OpenGIS consortium's work is fully acknowledged here.</span>
+<span class="add"> */</span>
+<span class="add">package org.geotools.parameter;</span>
+<span class="add"></span>
+<span class="add">// opengis interfaces</span>
+<span class="add">import java.lang.reflect.Array;</span>
+<span class="add">import java.util.ArrayList;</span>
+<span class="add">import java.util.Collection;</span>
+<span class="add">import java.util.Collections;</span>
+<span class="add">import java.util.Iterator;</span>
+<span class="add">import java.util.List;</span>
+<span class="add">import java.util.Set;</span>
+<span class="add"></span>
+<span class="add">import org.opengis.parameter.GeneralParameterDescriptor;</span>
+<span class="add">import org.opengis.parameter.GeneralParameterValue;</span>
+<span class="add">import org.opengis.parameter.ParameterDescriptor;</span>
+<span class="add">import org.opengis.parameter.ParameterValue;</span>
+<span class="add">import org.opengis.parameter.ParameterValueGroup;</span>
+<span class="add">import org.opengis.parameter.ParameterDescriptorGroup;</span>
+<span class="add">import org.opengis.referencing.IdentifiedObject;</span>
+<span class="add"></span>
+<span class="add">/**</span>
+<span class="add"> * Utility class for methods helping implementing, and working with the</span>
+<span class="add"> * Parameter API from org.opengis.parameter.</span>
+<span class="add"> *</span>
+<span class="add"> * @author Jody Garnett, Refractions Research</span>
+<span class="add"> */</span>
+<span class="add">public class Parameters {</span>
+<span class="add"> /** Empty ParameterGroup */</span>
+<span class="add"> public static ParameterDescriptorGroup EMPTY_GROUP = new ParameterGroupDescriptor( "empty", new GeneralParameterDescriptor[0] );</span>
+<span class="add"></span>
+<span class="add"> /** Locate by GeneralParameterDescriptor by ID (rather than name).</span>
+<span class="add"> * <p></span>
+<span class="add"> * Name is localized - and not especially useful as a key to retrive</span>
+<span class="add"> * parameters. This lookup offers a bridge allowing you to lookup a</span>
+<span class="add"> * GeneralParameterDescriptor and use list or seach.</span>
+<span class="add"> * </p></span>
+<span class="add"> * @param type</span>
+<span class="add"> * @return</span>
+<span class="add"> */</span>
+<span class="add"> public static GeneralParameterDescriptor id( ParameterDescriptorGroup type, String id ){</span>
+<span class="add"> GeneralParameterDescriptor types[] = type.getParameters();</span>
+<span class="add"></span>
+<span class="add"> return null;</span>
+<span class="add"> }</span>
+<span class="add"> public static IdentifiedObject id( IdentifiedObject objs[], String id ){</span>
+<span class="add"> for( int i=0; i<objs.length; i++){</span>
+<span class="add"> IdentifiedObject obj = objs[i];</span>
+<span class="add"></span>
+<span class="add"> }</span>
+<span class="add"> return null;</span>
+<span class="add"> }</span>
+<span class="add"> public static boolean allowed( ParameterGroupDescriptor group, GeneralParameterDescriptor type){</span>
+<span class="add"> GeneralParameterDescriptor types[] = group.getParameters();</span>
+<span class="add"> for( int i=0; i < types.length; i++ ){</span>
+<span class="add"> if( types[i] == type ){</span>
+<span class="add"> return true;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"></span>
+<span class="add"> /** Used to handle code that expexted group.getValues() */</span>
+<span class="add"> public static GeneralParameterValue[] array( ParameterValueGroup group ){</span>
+<span class="add"> List params = group.values();</span>
+<span class="add"> return (GeneralParameterValue[]) params.toArray( new GeneralParameterValue[ params.size()] );</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Number of type in group.</span>
+<span class="add"> *</span>
+<span class="add"> * @param group</span>
+<span class="add"> * @param type</span>
+<span class="add"> * @return count of type in group</span>
+<span class="add"> */</span>
+<span class="add"> public static int count( ParameterValueGroup group, GeneralParameterDescriptor type){</span>
+<span class="add"> GeneralParameterValue[] params = array( group );</span>
+<span class="add"> ParameterGroupDescriptor groupType = (ParameterGroupDescriptor) group.getDescriptor();</span>
+<span class="add"> int count = 0;</span>
+<span class="add"> for (int i=0; i<params.length; i++) {</span>
+<span class="add"> final GeneralParameterValue param = params[i];</span>
+<span class="add"> if( param.getDescriptor() == type ){</span>
+<span class="add"> count++;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> return count;</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Check a ParameterValue against its ParameterDescriptor.</span>
+<span class="add"> * <p></span>
+<span class="add"> * Method takes care of handling checking arrays and collections</span>
+<span class="add"> * against ParameterDescriptor.</span>
+<span class="add"> * </p></span>
+<span class="add"> * <p></span>
+<span class="add"> * Assumes that descriptor.getValueClass will be an Array (like double[].class)</span>
+<span class="add"> * or a Collection (like List.class) when working with those types, even</span>
+<span class="add"> * though descriptor getMinimumValue(), getMaxiumValue and getValidValues</span>
+<span class="add"> * will be used to check the elements.</span>
+<span class="add"> * </p></span>
+<span class="add"> * @return true if parameter is valid</span>
+<span class="add"> */</span>
+<span class="add"> public static boolean isValid( ParameterValue parameter ){</span>
+<span class="add"> ParameterDescriptor descriptor = (ParameterDescriptor) parameter.getDescriptor();</span>
+<span class="add"> Object value = parameter.getValue();</span>
+<span class="add"> Class type = value == null ? Void.TYPE : value.getClass();</span>
+<span class="add"> Class kind = descriptor.getValueClass();</span>
+<span class="add"></span>
+<span class="add"> if( kind.isInstance( value )){</span>
+<span class="add"> return false; // value not of the correct type</span>
+<span class="add"> }</span>
+<span class="add"> if( type.isArray() ){</span>
+<span class="add"> // handle checking elements in an aaray</span>
+<span class="add"> final int LENGTH = Array.getLength( value );</span>
+<span class="add"> for( int i=0; i<LENGTH; i++ ){</span>
+<span class="add"> if( !isValidValue( Array.get( value, i ), descriptor ) ){</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> else if( value instanceof Collection ){</span>
+<span class="add"> // handle checking elements in a collection</span>
+<span class="add"> Collection collection = (Collection) value;</span>
+<span class="add"> for( Iterator i=collection.iterator(); i.hasNext(); ){</span>
+<span class="add"> if( !isValidValue( i.next(), descriptor ) ){</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> else {</span>
+<span class="add"> isValidValue( value, descriptor );</span>
+<span class="add"> }</span>
+<span class="add"> return true;</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Called on a single ParameterValue, or on elements of a ParameterValue</span>
+<span class="add"> * <p></span>
+<span class="add"> * Ensures that descriptor.getValueValues(), getMinimumValue() and getMaximumValue()</span>
+<span class="add"> * all think the provided value is okay.</span>
+<span class="add"> * </p></span>
+<span class="add"> * @return true if value is valid</span>
+<span class="add"> */</span>
+<span class="add"> private static boolean isValidValue( Object value, ParameterDescriptor descriptor ){</span>
+<span class="add"> Class type = value == null ? Void.TYPE : value.getClass();</span>
+<span class="add"> Class expected = descriptor.getValueClass();</span>
+<span class="add"></span>
+<span class="add"> Set validValues = descriptor.getValidValues();</span>
+<span class="add"> if( validValues != null && !validValues.contains( value )){</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"> Comparable min = descriptor.getMinimumValue();</span>
+<span class="add"> if( min != null && min.compareTo( value ) > 0 ){</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"> Comparable max = descriptor.getMinimumValue();</span>
+<span class="add"> if( max != null && max.compareTo( value ) < 0 ){</span>
+<span class="add"> return false;</span>
+<span class="add"> }</span>
+<span class="add"> return true;</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Search for an exact match for the provided GeneralParameterDescriptor.</span>
+<span class="add"> * <p></span>
+<span class="add"> * This method does not search in subgroups.</span>
+<span class="add"> * </p></span>
+<span class="add"> * @param type GeneralParameterDescriptor to search for</span>
+<span class="add"> * @return List (possibly empty of GeneralParameter</span>
+<span class="add"> */</span>
+<span class="add"> public static int indexOf( ParameterValueGroup group, GeneralParameterDescriptor type){</span>
+<span class="add"> GeneralParameterValue[] params = array( group );</span>
+<span class="add"> if( params == null ){</span>
+<span class="add"> return -1;</span>
+<span class="add"> }</span>
+<span class="add"> for (int i=0; i<params.length; i++) {</span>
+<span class="add"> final GeneralParameterValue param = params[i];</span>
+<span class="add"> if( param.getDescriptor() == type ){</span>
+<span class="add"> return i;</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> return -1;</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Search for an exact match for the provided GeneralParameterDescriptor.</span>
+<span class="add"> * <p></span>
+<span class="add"> * This method does not search in subgroups.</span>
+<span class="add"> * </p></span>
+<span class="add"> * @param type GeneralParameterDescriptor to search for</span>
+<span class="add"> * @return List (possibly empty of GeneralParameter</span>
+<span class="add"> */</span>
+<span class="add"> public static List list( ParameterValueGroup group, GeneralParameterDescriptor type){</span>
+<span class="add"> GeneralParameterValue[] params = array( group );</span>
+<span class="add"> if( params == null ){</span>
+<span class="add"> return Collections.EMPTY_LIST;</span>
+<span class="add"> }</span>
+<span class="add"> List list = new ArrayList(1);</span>
+<span class="add"> for (int i=0; i<params.length; i++) {</span>
+<span class="add"> final GeneralParameterValue param = params[i];</span>
+<span class="add"> if( param.getDescriptor() == type ){</span>
+<span class="add"> list.add( param );</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> return list;</span>
+<span class="add"> }</span>
+<span class="add"> /**</span>
+<span class="add"> * Search for an exact match for the provided GeneralParameterDescriptor.</span>
+<span class="add"> * <p></span>
+<span class="add"> * This method does search in subgroups.</span>
+<span class="add"> * </p></span>
+<span class="add"> * @param type GeneralParameterDescriptor to search for</span>
+<span class="add"> * @return List (possibly empty of GeneralParameter</span>
+<span class="add"> */</span>
+<span class="add"> public static List search( ParameterValueGroup group, GeneralParameterDescriptor type){</span>
+<span class="add"> GeneralParameterValue[] params = array( group );</span>
+<span class="add"> if( params == null ){</span>
+<span class="add"> return Collections.EMPTY_LIST;</span>
+<span class="add"> }</span>
+<span class="add"> List list = new ArrayList(1);</span>
+<span class="add"> for (int i=0; i<params.length; i++) {</span>
+<span class="add"> final GeneralParameterValue param = params[i];</span>
+<span class="add"> if( param.getDescriptor() == type ){</span>
+<span class="add"> list.add( param );</span>
+<span class="add"> }</span>
+<span class="add"> if( param instanceof ParameterValueGroup ){</span>
+<span class="add"> List found = search( (ParameterValueGroup) param, type );</span>
+<span class="add"> list.addAll( found );</span>
+<span class="add"> }</span>
+<span class="add"> }</span>
+<span class="add"> return list;</span>
+<span class="add"> }</span>
+<span class="add">}</span></pre></td></tr>
+</table>
+ </div>
+ </body>
+</html>
Propchange: sis/ip-review/rev/07846/Parameters.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/ip-review/rev/07846/Parameters.xhtml
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: sis/ip-review/rev/10796/AbstractParameterDescriptor.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/AbstractParameterDescriptor.xhtml?rev=1565636&view=auto
==============================================================================
--- sis/ip-review/rev/10796/AbstractParameterDescriptor.xhtml (added)
+++ sis/ip-review/rev/10796/AbstractParameterDescriptor.xhtml Fri Feb 7 12:47:50 2014
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>AbstractParameterDescriptor changes for revisions 10795:10796</title>
+ <style type="text/css" media="all">
+ @import url("../../reports.css");
+ </style>
+ </head>
+ <body>
+ <div>
+ <h1>AbstractParameterDescriptor changes for revisions 10795:10796</h1>
+<p>Changes in this commit seem to be the result of some "<cite>auto reformat</cite>" tool execution.
+The <cite>Java</cite> - <cite>GeoAPI</cite> - <cite>GeoTools</cite> import ordering is altered,
+imports used only in Javadoc are lost and the encoding of non-ASCII characters is broken.
+This commit has been reverted, except for the removal of really unused imports which are keep removed.</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r10795:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/parameter/AbstractParameterDescriptor.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 10795</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2004, Institut de Recherche pour le Développement</span>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public</pre></td>
+<td><pre>/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2004, Institut de Recherche pour le D�veloppement</span>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public</pre></td></tr>
+<tr><td><pre>package org.geotools.parameter;
+
+// J2SE dependencies
+import java.util.Map;
+<span class="del">import java.io.Serializable;</span>
+
+<span class="del">// OpenGIS dependencies</span>
+<span class="del">import org.opengis.parameter.ParameterValue; // For javadoc</span>
+<span class="del"></span>
+<span class="del">// Geotools dependencies</span>
+import org.geotools.referencing.IdentifiedObject;
+import org.geotools.referencing.wkt.Formatter;
+import org.geotools.resources.rsc.Resources;
+<span class="del">import org.geotools.resources.rsc.ResourceKeys;</span>
+
+
+/**</pre></td>
+<td><pre>package org.geotools.parameter;
+
+// J2SE dependencies
+<span class="add">import java.io.Serializable;</span>
+import java.util.Map;
+
+import org.geotools.referencing.IdentifiedObject;
+import org.geotools.referencing.wkt.Formatter;
+<span class="add">import org.geotools.resources.rsc.ResourceKeys;</span>
+import org.geotools.resources.rsc.Resources;
+<span class="add">import org.opengis.parameter.ParameterValue;</span>
+
+
+/**</pre></td></tr>
+</table>
+ </div>
+ </body>
+</html>
Propchange: sis/ip-review/rev/10796/AbstractParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/ip-review/rev/10796/AbstractParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: sis/ip-review/rev/10796/DefaultParameterDescriptor.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/DefaultParameterDescriptor.xhtml?rev=1565636&view=auto
==============================================================================
--- sis/ip-review/rev/10796/DefaultParameterDescriptor.xhtml (added)
+++ sis/ip-review/rev/10796/DefaultParameterDescriptor.xhtml Fri Feb 7 12:47:50 2014
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>DefaultParameterDescriptor changes for revisions 10795:10796</title>
+ <style type="text/css" media="all">
+ @import url("../../reports.css");
+ </style>
+ </head>
+ <body>
+ <div>
+ <h1>DefaultParameterDescriptor changes for revisions 10795:10796</h1>
+<p>Changes in this commit seem to be the result of some "<cite>auto reformat</cite>" tool execution.
+The <cite>Java</cite> - <cite>GeoAPI</cite> - <cite>GeoTools</cite> import ordering is altered,
+imports used only in Javadoc are lost and the encoding of non-ASCII characters is broken.
+This commit has been reverted, except for the removal of really unused imports which are keep removed.</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r10795:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/parameter/DefaultParameterDescriptor.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 10795</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2004, Institut de Recherche pour le Développement</span>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public</pre></td>
+<td><pre>/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2004, Institut de Recherche pour le D�veloppement</span>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public</pre></td></tr>
+<tr><td><pre>package org.geotools.parameter;
+
+// J2SE direct dependencies
+import java.util.HashMap;
+import java.util.Set;
+<span class="del">import java.util.Map;</span>
+<span class="del">import java.util.HashSet;</span>
+<span class="del">import java.util.Collections;</span>
+import javax.units.Unit;
+
+<span class="del">// OpenGIS dependencies</span>
+<span class="del">import org.opengis.util.CodeList;</span>
+<span class="del">import org.opengis.util.InternationalString;</span>
+<span class="del"></span>
+<span class="del">// Geotools dependencies</span>
+import org.geotools.referencing.IdentifiedObject;
+import org.geotools.resources.Utilities;
+<span class="del">import org.geotools.resources.ClassChanger;</span>
+import org.geotools.resources.rsc.Resources;
+<span class="del">import org.geotools.resources.rsc.ResourceKeys;</span>
+<span class="del">import org.geotools.util.SimpleInternationalString;</span>
+
+
+/**</pre></td>
+<td><pre>package org.geotools.parameter;
+
+// J2SE direct dependencies
+<span class="add">import java.util.Collections;</span>
+import java.util.HashMap;
+<span class="add">import java.util.HashSet;</span>
+<span class="add">import java.util.Map;</span>
+import java.util.Set;
+<span class="add"></span>
+import javax.units.Unit;
+
+import org.geotools.referencing.IdentifiedObject;
+<span class="add">import org.geotools.resources.ClassChanger;</span>
+import org.geotools.resources.Utilities;
+<span class="add">import org.geotools.resources.rsc.ResourceKeys;</span>
+import org.geotools.resources.rsc.Resources;
+<span class="add">import org.opengis.util.CodeList;</span>
+<span class="add">import org.opengis.util.InternationalString;</span>
+
+
+/**</pre></td></tr>
+</table>
+ </div>
+ </body>
+</html>
Propchange: sis/ip-review/rev/10796/DefaultParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/ip-review/rev/10796/DefaultParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: sis/ip-review/rev/10796/Parameters.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/10796/Parameters.xhtml?rev=1565636&view=auto
==============================================================================
--- sis/ip-review/rev/10796/Parameters.xhtml (added)
+++ sis/ip-review/rev/10796/Parameters.xhtml Fri Feb 7 12:47:50 2014
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>Parameters changes for revisions 10795:10796</title>
+ <style type="text/css" media="all">
+ @import url("../../reports.css");
+ </style>
+ </head>
+ <body>
+ <div>
+ <h1>Parameters changes for revisions 10795:10796</h1>
+<p>Changes in this commit seem to be the result of some "<cite>auto reformat</cite>" tool execution.
+The <cite>Java</cite> - <cite>GeoAPI</cite> - <cite>GeoTools</cite> import ordering is altered,
+imports used only in Javadoc are lost and the encoding of non-ASCII characters is broken.
+This commit has been reverted, except for the removal of really unused imports which are keep removed.</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r10795:10796 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/parameter/Parameters.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 10795</th><th>Revision 10796</th></tr>
+<tr><td><pre>/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+<span class="del"> * (C) 2004, Institut de Recherche pour le Développement</span>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public</pre></td>
+<td><pre>/*
+ * Geotools 2 - OpenSource mapping toolkit
+ * (C) 2004, Geotools Project Managment Committee (PMC)
+<span class="add"> * (C) 2004, Institut de Recherche pour le D�veloppement</span>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public</pre></td></tr>
+<tr><td><pre>import org.opengis.parameter.GeneralParameterDescriptor;
+import org.opengis.parameter.GeneralParameterValue;
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterValue;
+import org.opengis.parameter.ParameterValueGroup;
+<span class="del">import org.opengis.parameter.ParameterDescriptorGroup;</span>
+<span class="del">import org.opengis.referencing.IdentifiedObject;</span>
+
+/**
+ * Utility class for methods helping implementing, and working with the</pre></td>
+<td><pre>import org.opengis.parameter.GeneralParameterDescriptor;
+import org.opengis.parameter.GeneralParameterValue;
+import org.opengis.parameter.ParameterDescriptor;
+<span class="add">import org.opengis.parameter.ParameterDescriptorGroup;</span>
+import org.opengis.parameter.ParameterValue;
+import org.opengis.parameter.ParameterValueGroup;
+
+/**
+ * Utility class for methods helping implementing, and working with the</pre></td></tr>
+</table>
+ </div>
+ </body>
+</html>
Propchange: sis/ip-review/rev/10796/Parameters.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/ip-review/rev/10796/Parameters.xhtml
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: sis/ip-review/rev/20874/AbstractParameterDescriptor.xhtml
URL: http://svn.apache.org/viewvc/sis/ip-review/rev/20874/AbstractParameterDescriptor.xhtml?rev=1565636&view=auto
==============================================================================
--- sis/ip-review/rev/20874/AbstractParameterDescriptor.xhtml (added)
+++ sis/ip-review/rev/20874/AbstractParameterDescriptor.xhtml Fri Feb 7 12:47:50 2014
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>AbstractParameterDescriptor changes for revisions 20873:20874</title>
+ <style type="text/css" media="all">
+ @import url("../../reports.css");
+ </style>
+ </head>
+ <body>
+ <div>
+ <h1>AbstractParameterDescriptor changes for revisions 20873:20874</h1>
+<p>Changes in GeoTools header only. The removal of the "<cite>or (at your option) any later version</cite>" clause
+must be keep in Geotk for every classes having contribution from a developer other than those who accepted re-licensing.
+This header does not apply to Apache SIS, since the above-cited contributions are omitted.</p>
+<p><b>Command line:</b></p>
+<blockquote><code>svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r20873:20874 http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/parameter/AbstractParameterDescriptor.java</code></blockquote>
+<table class="changes">
+<tr><th>Revision 20873</th><th>Revision 20874</th></tr>
+<tr><td><pre>/*
+<span class="del"> * Geotools 2 - OpenSource mapping toolkit</span>
+<span class="del"> * (C) 2004, Geotools Project Managment Committee (PMC)</span>
+ * (C) 2004, Institut de Recherche pour le Développement
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+<span class="del"> * License as published by the Free Software Foundation; either</span>
+<span class="del"> * version 2.1 of the License, or (at your option) any later version.</span>
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</pre></td>
+<td><pre>/*
+<span class="add"> * GeoTools - OpenSource mapping toolkit</span>
+<span class="add"> * http://geotools.org</span>
+<span class="add"> * (C) 2004-2006, GeoTools Project Managment Committee (PMC)</span>
+ * (C) 2004, Institut de Recherche pour le Développement
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+<span class="add"> * License as published by the Free Software Foundation;</span>
+<span class="add"> * version 2.1 of the License.</span>
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</pre></td></tr>
+<tr><td><pre>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+<span class="del">* You should have received a copy of the GNU Lesser General Public</span>
+<span class="del">* License along with this library; if not, write to the Free Software</span>
+<span class="del">* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
+<span class="del">*</span>
+* This package contains documentation from OpenGIS specifications.
+* OpenGIS consortium's work is fully acknowledged here.
+*/</pre></td>
+<td><pre>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* This package contains documentation from OpenGIS specifications.
+* OpenGIS consortium's work is fully acknowledged here.
+*/</pre></td></tr>
+</table>
+ </div>
+ </body>
+</html>
Propchange: sis/ip-review/rev/20874/AbstractParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/ip-review/rev/20874/AbstractParameterDescriptor.xhtml
------------------------------------------------------------------------------
svn:mime-type = text/html