sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1626367 - in /sis/branches/JDK7: ./ core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/ co...
Date Fri, 19 Sep 2014 23:33:21 GMT
Author: desruisseaux
Date: Fri Sep 19 23:33:20 2014
New Revision: 1626367

URL: http://svn.apache.org/r1626367
Log:
Merge from the JDK8 branch.

Added:
    sis/branches/JDK7/src/main/javadoc/warning.png
      - copied unchanged from r1626366, sis/branches/JDK8/src/main/javadoc/warning.png
Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
    sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
    sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
    sis/branches/JDK7/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java
    sis/branches/JDK7/pom.xml
    sis/branches/JDK7/src/main/javadoc/stylesheet.css

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1626013-1626366

Modified: sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -104,7 +104,7 @@ public final class Doclet extends HtmlDo
      * Copies the standard CSS file, then copies the custom CSS file.
      *
      * @param  inputFile        The standard CSS file generated by the standard doclet.
-     * @param  outputDirectory  The custom CSS file to copy.
+     * @param  outputDirectory  The directory where to copy the CSS file.
      * @throws IOException      If an error occurred while reading or writing.
      */
     private static void copyStylesheet(final File inputFile, final File outputDirectory)
throws IOException {

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -303,7 +303,14 @@ public class MetadataStandard implements
             if (SpecialCases.isSpecialCase(type)) {
                 accessor = new SpecialCases(citation, type, implementation);
             } else {
-                accessor = new PropertyAccessor(citation, type, implementation);
+                /*
+                 * If "multi-value returns" was allowed in the Java language, the 'onlyUML'
boolean would
+                 * be returned by 'findInterface(Class)' method when it falls in the special
case for the
+                 * UML annotation on implementation class. But since we do not have multi-values,
we have
+                 * to infer it from our knownledge of how 'findInterface(Class)' is implemented.
+                 */
+                final boolean onlyUML = (type == implementation && !type.isInterface());
+                accessor = new PropertyAccessor(citation, type, implementation, onlyUML);
             }
             accessors.put(implementation, accessor);
             return accessor;
@@ -325,9 +332,9 @@ public class MetadataStandard implements
                 if (accessors.containsKey(type)) {
                     return true;
                 }
-                final Class<?> standard = findInterface(type);
-                if (standard != null) {
-                    accessors.put(type, standard);
+                final Class<?> standardType = findInterface(type);
+                if (standardType != null) {
+                    accessors.put(type, standardType);
                     return true;
                 }
             }
@@ -336,6 +343,18 @@ public class MetadataStandard implements
     }
 
     /**
+     * Returns {@code true} if the given implementation class, normally rejected by {@link
#findInterface(Class)},
+     * should be accepted as a pseudo-interface. We use this undocumented feature when Apache
SIS experiments a new
+     * API which is not yet published in GeoAPI. This happen for example when upgrading Apache
SIS public API from
+     * the ISO 19115:2003 standard to the ISO 19115:2014 version, but GeoAPI interfaces are
still the old version.
+     * In such case, API that would normally be present in GeoAPI interfaces are temporarily
available only in
+     * Apache SIS implementation classes.
+     */
+    boolean isPendingAPI(final Class<?> type) {
+        return false;
+    }
+
+    /**
      * Returns the metadata interface implemented by the specified implementation.
      * Only one metadata interface can be implemented. If the given type is already
      * an interface from the standard, then it is returned directly.
@@ -343,7 +362,7 @@ public class MetadataStandard implements
      * @param  type The standard interface or the implementation class.
      * @return The single interface, or {@code null} if none where found.
      */
-    private Class<?> findInterface(Class<?> type) {
+    private Class<?> findInterface(final Class<?> type) {
         if (type != null) {
             if (type.isInterface()) {
                 if (type.getName().startsWith(interfacePackage)) {
@@ -355,10 +374,9 @@ public class MetadataStandard implements
                  * including the ones declared in the super-class.
                  */
                 final Set<Class<?>> interfaces = new LinkedHashSet<>();
-                do {
-                    getInterfaces(type, interfaces);
-                    type = type.getSuperclass();
-                } while (type != null);
+                for (Class<?> t=type; t!=null; t=t.getSuperclass()) {
+                    getInterfaces(t, interfaces);
+                }
                 /*
                  * If we found more than one interface, removes the
                  * ones that are sub-interfaces of the other.
@@ -380,6 +398,17 @@ public class MetadataStandard implements
                     }
                     // Found more than one interface; we don't know which one to pick.
                     // Returns 'null' for now; the caller will thrown an exception.
+                } else if (isPendingAPI(type)) {
+                    /*
+                     * Found no interface. According to our method contract we should return
null.
+                     * However we make an exception if the implementation class has a UML
annotation.
+                     * The reason is that when upgrading  API  from ISO 19115:2003 to ISO
19115:2014,
+                     * implementations are provided in Apache SIS before the corresponding
interfaces
+                     * are published on GeoAPI. The reason why GeoAPI is slower to upgrade
is that we
+                     * have to go through a voting process inside the Open Geospatial Consortium
(OGC).
+                     * So we use those implementation classes as a temporary substitute for
the interfaces.
+                     */
+                    return type;
                 }
             }
         }

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -255,13 +255,14 @@ class PropertyAccessor {
      * @param  type The interface implemented by the metadata, which must be
      *         the value returned by {@link #getStandardType(Class, String)}.
      * @param  implementation The class of metadata implementations, or {@code type} if none.
+     * @param  onlyUML {@code true} for taking only the getter methods having a {@link UML}
annotation.
      */
-    PropertyAccessor(final Citation standard, final Class<?> type, final Class<?>
implementation) {
+    PropertyAccessor(final Citation standard, final Class<?> type, final Class<?>
implementation, final boolean onlyUML) {
         assert type.isAssignableFrom(implementation) : implementation;
         this.standard       = standard;
         this.type           = type;
         this.implementation = implementation;
-        this.getters        = getGetters(type, implementation);
+        this.getters        = getGetters(type, implementation, onlyUML);
         int allCount = getters.length;
         int standardCount = allCount;
         if (allCount != 0 && getters[allCount-1] == EXTRA_GETTER) {
@@ -417,9 +418,10 @@ class PropertyAccessor {
      *
      * @param  type The metadata interface.
      * @param  implementation The class of metadata implementations.
+     * @param  onlyUML {@code true} for taking only the getter methods having a {@link UML}
annotation.
      * @return The getters declared in the given interface (never {@code null}).
      */
-    private static Method[] getGetters(final Class<?> type, final Class<?> implementation)
{
+    private static Method[] getGetters(final Class<?> type, final Class<?> implementation,
final boolean onlyUML) {
         synchronized (SHARED_GETTERS) {
             Method[] getters = SHARED_GETTERS.get(type);
             if (getters == null) {
@@ -430,7 +432,7 @@ class PropertyAccessor {
                 boolean hasExtraGetter = false;
                 int count = 0;
                 for (final Method candidate : getters) {
-                    if (Classes.isPossibleGetter(candidate)) {
+                    if (Classes.isPossibleGetter(candidate) && (!onlyUML || candidate.isAnnotationPresent(UML.class)))
{
                         final String name = candidate.getName();
                         if (name.startsWith(SET)) { // Paranoiac check.
                             continue;

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -162,13 +162,31 @@ final class PropertyComparator implement
      * If positive, the index returned by this method correspond to a sorting in descending
order.
      */
     private int indexOf(final Method method) {
+        /*
+         * Check the cached value computed by previous call to 'indexOf(…)'.
+         * Example: "getExtents"
+         */
         Integer index = order.get(method);
         if (index == null) {
+            /*
+             * Check the value computed from @XmlType.propOrder() value.
+             * Inferred from the method name, so name is often plural.
+             * Example: "extents"
+             */
             String name = method.getName();
             name = toPropertyName(name, prefix(name).length());
             index = order.get(name);
             if (index == null) {
-                index = -1;
+                /*
+                 * Do not happen, except when we have private methods or deprecated public
methods
+                 * used as bridge between legacy and more recent standards (e.g. ISO 19115:2003
to
+                 * ISO 19115:2014), especially when cardinality changed between the two standards.
+                 * Example: "extent"
+                 */
+                final UML uml = method.getAnnotation(UML.class);
+                if (uml == null || (index = order.get(uml.identifier())) == null) {
+                    index = -1;
+                }
             }
             order.put(method, index);
         }

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/SpecialCases.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -49,7 +49,7 @@ final class SpecialCases extends Propert
      * @param  implementation The class of metadata implementations, or {@code type} if none.
      */
     SpecialCases(final Citation standard, final Class<?> type, final Class<?>
implementation) {
-        super(standard, type, implementation);
+        super(standard, type, implementation, false);
         assert isSpecialCase(type) : type;
         westBoundLongitude = indexOf("westBoundLongitude", true);
         eastBoundLongitude = indexOf("eastBoundLongitude", true);

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -18,6 +18,7 @@ package org.apache.sis.metadata;
 
 import java.util.Map;
 import java.util.IdentityHashMap;
+import org.opengis.annotation.UML;
 import org.opengis.annotation.Classifier;
 import org.opengis.annotation.Stereotype;
 import org.apache.sis.util.CharSequences;
@@ -95,6 +96,16 @@ final class StandardImplementation exten
     }
 
     /**
+     * Accepts Apache SIS implementation classes as "pseudo-interfaces" if they are annotated
with {@link UML}.
+     * We use this feature for example in the transition from ISO 19115:2003 to ISO 19115:2014,
when new API is
+     * defined in Apache SIS but not yet available in GeoAPI interfaces.
+     */
+    @Override
+    boolean isPendingAPI(final Class<?> type) {
+        return type.getName().startsWith(implementationPackage) && type.isAnnotationPresent(UML.class);
+    }
+
+    /**
      * Returns the implementation class for the given interface, or {@code null} if none.
      * This class uses heuristic rules based on naming conventions.
      *

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -250,6 +250,17 @@ public class DefaultRepresentativeFracti
         return (int) denominator;
     }
 
+    /**
+     * Returns a string representation of this scale, or {@code NaN} if undefined.
+     * If defined, the string representation uses the colon as in "1:20000".
+     *
+     * @return A string representation of this scale.
+     */
+    @Override
+    public String toString() {
+        return (denominator != 0) ? "1:" + denominator : "NaN";
+    }
+
 
 
 

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -185,7 +185,7 @@ public abstract strictfp class MetadataT
                 final Class<?> impl = getImplementation(type);
                 if (impl != null) {
                     assertTrue(type.isAssignableFrom(impl));
-                    testPropertyValues(new PropertyAccessor(standard.getCitation(), type,
impl));
+                    testPropertyValues(new PropertyAccessor(standard.getCitation(), type,
impl, false));
                 }
             }
         }

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -92,7 +92,7 @@ public final strictfp class PropertyAcce
      * Creates a new property accessor for the {@link DefaultCitation} class.
      */
     private static PropertyAccessor createPropertyAccessor() {
-        return new PropertyAccessor(HardCodedCitations.ISO_19115, Citation.class, DefaultCitation.class);
+        return new PropertyAccessor(HardCodedCitations.ISO_19115, Citation.class, DefaultCitation.class,
false);
     }
 
     /**
@@ -125,11 +125,11 @@ public final strictfp class PropertyAcce
             final String   propertyName  = (String)   expected[i++];
             final String   umlIdentifier = (String)   expected[i++];
             final String   sentence      = (String)   expected[i++];
-            assertEquals("declaringType", declaringType, accessor.type(index, TypeValuePolicy.DECLARING_INTERFACE));
             assertEquals("methodName",    methodName,    accessor.name(index, KeyNamePolicy.METHOD_NAME));
             assertEquals("propertyName",  propertyName,  accessor.name(index, KeyNamePolicy.JAVABEANS_PROPERTY));
             assertEquals("umlIdentifier", umlIdentifier, accessor.name(index, KeyNamePolicy.UML_IDENTIFIER));
             assertEquals("sentence",      sentence,      accessor.name(index, KeyNamePolicy.SENTENCE));
+            assertEquals("declaringType", declaringType, accessor.type(index, TypeValuePolicy.DECLARING_INTERFACE));
             assertEquals(methodName,      index,         accessor.indexOf(methodName,   
false));
             assertEquals(propertyName,    index,         accessor.indexOf(propertyName, 
false));
             assertEquals(umlIdentifier,   index,         accessor.indexOf(umlIdentifier,
false));
@@ -200,7 +200,7 @@ public final strictfp class PropertyAcce
     @Test
     @DependsOnMethod("testConstructor")
     public void testConstructorWithInheritance() {
-        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO_19115, DataIdentification.class,
DefaultDataIdentification.class),
+        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO_19115, DataIdentification.class,
DefaultDataIdentification.class, false),
         //……Declaring type………………………Method………………………………………………………………………JavaBeans………………………………………………………UML
identifier………………………………………Sentence……………………………………………………………Type………………………………………………………………
             Identification.class, "getCitation",                   "citation",          
        "citation",                  "Citation",                     Citation.class,
             Identification.class, "getAbstract",                   "abstract",          
        "abstract",                  "Abstract",                     InternationalString.class,
@@ -218,10 +218,10 @@ public final strictfp class PropertyAcce
             Identification.class, "getSpatialResolutions",         "spatialResolutions",
        "spatialResolution",         "Spatial resolutions",          Resolution[].class,
         DataIdentification.class, "getLanguages",                  "languages",         
        "language",                  "Languages",                    Locale[].class,
         DataIdentification.class, "getCharacterSets",              "characterSets",     
        "characterSet",              "Character sets",               Charset[].class,
+            Identification.class, "getTopicCategories",            "topicCategories",   
        "topicCategory",             "Topic categories",             TopicCategory[].class,
         DataIdentification.class, "getEnvironmentDescription",     "environmentDescription",
    "environmentDescription",    "Environment description",      InternationalString.class,
-        DataIdentification.class, "getSupplementalInformation",    "supplementalInformation",
   "supplementalInformation",   "Supplemental information",     InternationalString.class,
             Identification.class, "getExtents",                    "extents",           
        "extent",                    "Extents",                      Extent[].class,
-            Identification.class, "getTopicCategories",            "topicCategories",   
        "topicCategory",             "Topic categories",             TopicCategory[].class,
+        DataIdentification.class, "getSupplementalInformation",    "supplementalInformation",
   "supplementalInformation",   "Supplemental information",     InternationalString.class,
             Identification.class, "getAdditionalDocumentations",   "additionalDocumentations",
  "additionalDocumentation",   "Additional documentations",    Citation[].class,
             Identification.class, "getAssociatedResources",        "associatedResources",
       "associatedResource",        "Associated resources",         AssociatedResource[].class,
             Identification.class, "getProcessingLevel",            "processingLevel",   
        "processingLevel",           "Processing level",             Identifier.class,
@@ -239,7 +239,7 @@ public final strictfp class PropertyAcce
     @DependsOnMethod("testConstructorWithInheritance")
     public void testConstructorWithCovariantReturnType() {
         final Class<?> type = GeographicCRS.class;
-        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO, type, type),
+        assertMappingEquals(new PropertyAccessor(HardCodedCitations.ISO, type, type, false),
         //……Declaring type……………………………Method……………………………………………JavaBeans……………………………UML
identifier………………Sentence…………………………………Type…………………………………………………………
             GeographicCRS.class,    "getCoordinateSystem", "coordinateSystem", "coordinateSystem",
"Coordinate system",  EllipsoidalCS.class,       // Covariant return type
             GeodeticCRS.class,      "getDatum",            "datum",            "datum", 
          "Datum",              GeodeticDatum.class,       // Covariant return type
@@ -369,7 +369,7 @@ public final strictfp class PropertyAcce
     @DependsOnMethod("testSet")
     public void testSetDeprecated() {
         final PropertyAccessor accessor = new PropertyAccessor(HardCodedCitations.ISO_19115,
-                CoverageDescription.class, DefaultCoverageDescription.class);
+                CoverageDescription.class, DefaultCoverageDescription.class, false);
         final int indexOfDeprecated  = accessor.indexOf("contentType", true);
         final int indexOfReplacement = accessor.indexOf("attributeGroup", true);
         assertTrue("Deprecated elements shall be sorted after non-deprecated ones.",

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -708,7 +708,7 @@ public class DefaultParameterValue<T> ex
             } else if (object instanceof ParameterValue<?>) {
                 final ParameterValue<?> that = (ParameterValue<?>) object;
                 return deepEquals(getDescriptor(), that.getDescriptor(), mode) &&
-                       Objects.equals(getValue(),  that.getValue()) &&
+                       deepEquals(getValue(),      that.getValue(), mode) &&
                        Objects.equals(getUnit(),   that.getUnit());
             }
         }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -176,7 +176,7 @@ public strictfp class DefaultMetadataTes
             {
                 final DefaultKeywords keyword = new DefaultKeywords(
                         new Anchor(URI.create("SDN:P021:35:ATTN"), "Transmittance and attenuance
of the water column"));
-                keyword.setType(KeywordType.FEATURE_TYPE);
+                keyword.setType(KeywordType.THEME);
                 final DefaultCitation thesaurus = new DefaultCitation("BODC Parameter Discovery
Vocabulary");
                 thesaurus.setAlternateTitles(singleton(new SimpleInternationalString("P021")));
                 thesaurus.setDates(singleton(new DefaultCitationDate(TestUtilities.date("2008-11-25
23:00:00"), DateType.REVISION)));

Modified: sis/branches/JDK7/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
Fri Sep 19 23:33:20 2014
@@ -318,7 +318,7 @@
             <gmx:Anchor xlink:href="SDN:P021:35:ATTN">Transmittance and attenuance
of the water column</gmx:Anchor>
           </gmd:keyword>
           <gmd:type>
-            <gmd:MD_KeywordTypeCode codeListValue="featureType" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode">Feature
type</gmd:MD_KeywordTypeCode>
+            <gmd:MD_KeywordTypeCode codeListValue="theme" codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode">Theme</gmd:MD_KeywordTypeCode>
           </gmd:type>
           <gmd:thesaurusName>
             <gmd:CI_Citation>

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
[UTF-8] Fri Sep 19 23:33:20 2014
@@ -94,7 +94,7 @@ import static org.apache.sis.util.Number
  * {@link #newRange(Comparable, Comparable)} method. Subclasses can override that method
if they
  * need to customize the range objects to be created.
  *
- * <p>While it is possible to create {@code RangeSet<Date>} instances, is more
efficient to
+ * <p>While it is possible to create {@code RangeSet<Date>} instances, it is
more efficient to
  * use {@code RangeSet<Long>} with millisecond values because {@code RangeSet} will
internally
  * use {@code long[]} arrays in the later case.</p>
  *

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/TestRunner.java [UTF-8]
Fri Sep 19 23:33:20 2014
@@ -56,11 +56,16 @@ import static org.apache.sis.util.collec
  * @author  Stephen Connolly
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from <a href="http://github.com/junit-team/junit.contrib/tree/master/assumes">junit-team</a>)
- * @version 0.4
+ * @version 0.5
  * @module
  */
 public final class TestRunner extends BlockJUnit4ClassRunner {
     /**
+     * {@code true} if ignoring a test should cause its dependencies to be skipped as well.
+     */
+    static final boolean TRANSITIVE_IGNORE = false;
+
+    /**
      * The test methods to be executed, sorted according their dependencies.
      * This array is created by {@link #getFilteredChildren()} when first needed.
      */
@@ -152,7 +157,9 @@ public final class TestRunner extends Bl
          */
         @Override
         public void testAssumptionFailure(final Failure failure) {
-            addDependencyFailure(failure.getDescription().getMethodName());
+            if (TRANSITIVE_IGNORE) {
+                addDependencyFailure(failure.getDescription().getMethodName());
+            }
         }
 
         /**
@@ -160,7 +167,9 @@ public final class TestRunner extends Bl
          */
         @Override
         public void testIgnored(final Description description) {
-            addDependencyFailure(description.getMethodName());
+            if (TRANSITIVE_IGNORE) {
+                addDependencyFailure(description.getMethodName());
+            }
         }
     };
 

Modified: sis/branches/JDK7/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/pom.xml?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/pom.xml (original)
+++ sis/branches/JDK7/pom.xml Fri Sep 19 23:33:20 2014
@@ -517,6 +517,39 @@ Apache SIS is a free software, Java lang
         </configuration>
       </plugin>
 
+      <!-- Copy Javadoc resources in the top-level directory (not from "doc-files" subdirectories).
+           While the Maven documentation said that the "src/main/javadoc" directory is copied
by default,
+           or a directory can be specified with <javadocResourcesDirectory>, I have
been unable to make it
+           work even with absolute paths.
+        -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <configuration>
+          <encoding>${project.build.sourceEncoding}</encoding>
+        </configuration>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>prepare-package</phase> <!-- TODO: find some way to execute
this plugin only before javadoc, not before JAR. -->
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <resources>
+                <resource>
+                  <directory>src/main/javadoc/</directory>
+                  <includes>
+                    <include>*.png</include>
+                  </includes>
+                </resource>
+              </resources>
+              <outputDirectory>${basedir}/target/site/apidocs/</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <!-- JavaDoc configuration. -->
       <plugin>
         <artifactId>maven-javadoc-plugin</artifactId>
@@ -536,28 +569,11 @@ Apache SIS is a free software, Java lang
           <breakiterator>true</breakiterator>                   <!-- Better
boundary detection when determining the end of the first sentence. -->
           <stylesheetfile>src/main/javadoc/stylesheet.css</stylesheetfile>
           <validateLinks>true</validateLinks>
-
-          <!-- TODO
-            Following was used to work prior JDK 8. But as of Java 1.8.0_05 with maven-javadoc-plugin
2.9.1,
-            this does not work anymore.  A trailing slash seems mandatory with JDK 8, while
the Maven plugin
-            unconditionally removes any trailing slash we may insert below. For now we workaround
this issue
-            by using <additionalparam>-link ...</additionalparam> instead of
<links>.
-
-            For verifying if this problem is fixed in future JDK/Maven versions, remove the
-link argument,
-            uncomment the <links> block and execute "mvn javadoc:aggregate". If the
following line appears,
-            then the problem is not yet fixed:
-
-            javadoc: warning - Error fetching URL: http://www.geoapi.org/snapshot/javadoc
-
-
           <links>
-            <link>http://www.geoapi.org/snapshot/javadoc</link>
             <link>http://www.geoapi.org/snapshot/pending</link>
           </links>
-          -->
 
           <additionalparam>
-              -link http://www.geoapi.org/snapshot/pending/
           </additionalparam>
 
           <!-- Separates packages on the overview page into the groups specified. -->

Modified: sis/branches/JDK7/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/src/main/javadoc/stylesheet.css?rev=1626367&r1=1626366&r2=1626367&view=diff
==============================================================================
--- sis/branches/JDK7/src/main/javadoc/stylesheet.css (original)
+++ sis/branches/JDK7/src/main/javadoc/stylesheet.css Fri Sep 19 23:33:20 2014
@@ -126,15 +126,28 @@ div.note {
   margin-bottom: 9px;
 }
 
+
 /*
- * Definition of <div class="warning">
+ * The warning box for upcomming API changes. The warning icon is 64 pixels height.
+ * Since we have 30 pixels in top and bottom padding, There is 34 remaining pixels
+ * to set as the minimal height.
  */
 div.warning {
-  color:   firebrick;
-  margin-left:  40px;
-  margin-right: 40px;
-  margin-top:    9px;
-  margin-bottom: 9px;
+  border-width: 2pt;
+  border-style: solid;
+  border-color: darkred;
+  background:   antiquewhite;
+  margin:       12pt 30pt;
+  padding:      15px;
+  min-height:   34px;
+}
+
+div.warning:before {
+  position: relative;
+  float:    left;
+  top:      -15px;
+  left:     -15px;
+  content:  url("warning.png");
 }
 
 



Mime
View raw message