sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1599817 - in /sis/branches/JDK7: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-referencing/src/main/java/org/apache/sis/parameter/ core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/
Date Tue, 03 Jun 2014 22:26:03 GMT
Author: desruisseaux
Date: Tue Jun  3 22:26:02 2014
New Revision: 1599817

URL: http://svn.apache.org/r1599817
Log:
Merge the port of AbstractMathTransform.

Added:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
      - copied unchanged from r1599816, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
      - copied unchanged from r1599816, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
      - copied unchanged from r1599816, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
    sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
    sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
    sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1599169-1599816

Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java?rev=1599817&r1=1599816&r2=1599817&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
[UTF-8] Tue Jun  3 22:26:02 2014
@@ -33,7 +33,7 @@ import org.opengis.feature.FeatureAssoci
 
 
 /**
- * Indicates the role played by the association between two features.
+ * An instance of an {@linkplain DefaultAssociationRole feature association role} containing
the associated feature.
  *
  * {@section Limitations}
  * <ul>

Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java?rev=1599817&r1=1599816&r2=1599817&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] Tue Jun  3 22:26:02 2014
@@ -19,6 +19,7 @@ package org.apache.sis.feature;
 import java.util.Map;
 import java.util.Locale;
 import java.io.Serializable;
+import org.opengis.util.NameFactory;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.system.DefaultFactories;
@@ -164,14 +165,16 @@ public class AbstractIdentifiedType impl
      * @param  identification The name and other information to be given to this identified
type.
      * @throws IllegalArgumentException if a property has an invalid value.
      */
-    protected AbstractIdentifiedType(final Map<String,?> identification) throws IllegalArgumentException
{
+    protected AbstractIdentifiedType(final Map<String,?> identification)
+            throws IllegalArgumentException
+    {
         ensureNonNull("identification", identification);
         Object value = identification.get(NAME_KEY);
         if (value == null) {
             throw new IllegalArgumentException(Errors.getResources(identification)
                     .getString(Errors.Keys.MissingValueForProperty_1, NAME_KEY));
         } else if (value instanceof String) {
-            name = DefaultFactories.NAMES.createLocalName(null, (String) value);
+            name = createName(DefaultFactories.NAMES, (String) value);
         } else if (value instanceof GenericName) {
             name = (GenericName) value;
         } else {
@@ -184,6 +187,14 @@ public class AbstractIdentifiedType impl
     }
 
     /**
+     * Creates a name from the given string. This method is invoked at construction time,
+     * so it should not use any field in this {@code AbtractIdentifiedObject} instance.
+     */
+    GenericName createName(final NameFactory factory, final String value) {
+        return factory.createLocalName(null, value);
+    }
+
+    /**
      * Returns the name of this type.
      * The namespace can be either explicit
      * ({@linkplain org.apache.sis.util.iso.DefaultScopedName scoped name}) or implicit

Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java?rev=1599817&r1=1599816&r2=1599817&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
[UTF-8] Tue Jun  3 22:26:02 2014
@@ -77,8 +77,8 @@ public class DefaultAssociationRole exte
     private volatile transient String titleProperty;
 
     /**
-     * Constructs an association role from the given properties. The properties map is given
unchanged
-     * to the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map) super-class
constructor}.
+     * Constructs an association role from the given properties. The properties map is given
unchanged to
+     * the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map) super-class constructor}.
      * The following table is a reminder of main (not all) recognized map entries:
      *
      * <table class="sis">

Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java?rev=1599817&r1=1599816&r2=1599817&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
[UTF-8] Tue Jun  3 22:26:02 2014
@@ -27,6 +27,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.io.IOException;
 import java.io.ObjectInputStream;
+import org.opengis.util.NameFactory;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.ArgumentChecks;
@@ -221,6 +222,15 @@ public class DefaultFeatureType extends 
     }
 
     /**
+     * Creates a name from the given string. This method is invoked at construction time,
+     * so it should not use any field in this {@code AbtractIdentifiedObject} instance.
+     */
+    @Override
+    GenericName createName(final NameFactory factory, final String value) {
+        return factory.createTypeName(null, value);
+    }
+
+    /**
      * Invoked on deserialization for restoring the {@link #byName} and other transient fields.
      *
      * @param  in The input stream from which to deserialize a feature type.



Mime
View raw message