sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1629558 [2/2] - in /sis/trunk: ./ core/sis-feature/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/test/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ core/s...
Date Mon, 06 Oct 2014 01:00:53 GMT
Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -18,10 +18,10 @@ package org.apache.sis.referencing;
 
 import javax.measure.unit.SI;
 import javax.measure.unit.NonSI;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.extent.GeographicExtent;
 import org.opengis.metadata.extent.GeographicBoundingBox;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.datum.Ellipsoid;
 import org.opengis.referencing.datum.PrimeMeridian;
 import org.opengis.referencing.datum.GeodeticDatum;
@@ -118,7 +118,7 @@ public final strictfp class GeodeticObje
      * <table class="sis">
      * <caption>Verified properties</caption>
      * <tr><th>Property</th> <th>Expected value</th></tr>
-     * <tr><td>{@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
PrimeMeridian#getName() name}</td>
+     * <tr><td>{@linkplain Identifier#getCode() Code} of the {@linkplain PrimeMeridian#getName()
name}</td>
      *     <td>{@code "Greenwich"}</td></tr>
      * <tr><td>{@linkplain PrimeMeridian#getGreenwichLongitude() Greenwich longitude}</td>
      *     <td>0</td></tr>
@@ -141,7 +141,7 @@ public final strictfp class GeodeticObje
      * <table class="sis">
      * <caption>Verified properties</caption>
      * <tr><th>Property</th> <th>Expected value</th></tr>
-     * <tr><td>{@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
PrimeMeridian#getName() name}</td>
+     * <tr><td>{@linkplain Identifier#getCode() Code} of the {@linkplain PrimeMeridian#getName()
name}</td>
      *     <td>{@code "Paris"}</td></tr>
      * <tr><td>{@linkplain PrimeMeridian#getGreenwichLongitude() Greenwich longitude}</td>
      *     <td>2.5969213</td></tr>
@@ -164,7 +164,7 @@ public final strictfp class GeodeticObje
      * <table class="sis">
      * <caption>Verified properties</caption>
      * <tr><th>Property</th> <th>Expected value</th></tr>
-     * <tr><td>{@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
Ellipsoid#getName() name}</td>
+     * <tr><td>{@linkplain Identifier#getCode() Code} of the {@linkplain Ellipsoid#getName()
name}</td>
      *     <td>{@code "WGS 84"}</td></tr>
      * <tr><td>{@linkplain Ellipsoid#getAxisUnit() Axis unit}</td>
      *     <td>{@link SI#METRE}</td></tr>
@@ -196,7 +196,7 @@ public final strictfp class GeodeticObje
      * <table class="sis">
      * <caption>Verified properties</caption>
      * <tr><th>Property</th> <th>Expected value</th></tr>
-     * <tr><td>{@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
GeodeticDatum#getName() name}</td>
+     * <tr><td>{@linkplain Identifier#getCode() Code} of the {@linkplain GeodeticDatum#getName()
name}</td>
      *     <td>{@code "World Geodetic System 1984"}</td></tr>
      * <tr><td>{@linkplain GeodeticDatum#getDomainOfValidity() Domain of validity}</td>
      *     <td>{@linkplain #assertIsWorld(GeographicBoundingBox) Is world} or absent</td></tr>
@@ -224,7 +224,7 @@ public final strictfp class GeodeticObje
      * <table class="sis">
      * <caption>Verified properties</caption>
      * <tr><th>Property</th> <th>Expected value</th></tr>
-     * <tr><td>{@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
GeodeticCRS#getName() name}</td>
+     * <tr><td>{@linkplain Identifier#getCode() Code} of the {@linkplain GeodeticCRS#getName()
name}</td>
      *     <td>{@code "WGS 84"}</td></tr>
      * <tr><td>{@linkplain GeodeticCRS#getDomainOfValidity() Domain of validity}</td>
      *     <td>{@linkplain #assertIsWorld(GeographicBoundingBox) Is world} or absent</td></tr>
@@ -256,7 +256,7 @@ public final strictfp class GeodeticObje
      * <table class="sis">
      * <caption>Verified properties</caption>
      * <tr><th>Property</th> <th>Expected value</th></tr>
-     * <tr><td>{@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
GeodeticDatum#getName() name}</td>
+     * <tr><td>{@linkplain Identifier#getCode() Code} of the {@linkplain GeodeticDatum#getName()
name}</td>
      *     <td>{@code "Mean Sea Level"}</td></tr>
      * <tr><td>{@linkplain GeodeticDatum#getDomainOfValidity() Domain of validity}</td>
      *     <td>{@linkplain #assertIsWorld(GeographicBoundingBox) Is world} or absent</td></tr>
@@ -280,7 +280,7 @@ public final strictfp class GeodeticObje
      * <tr><th>Property</th> <th colspan="2">Expected value</th></tr>
      * <tr><td>{@linkplain CartesianCS#getDimension() Dimension}</td>
      *     <td colspan="2">2</td></tr>
-     * <tr><td>Axes {@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
GeodeticDatum#getName() name}</td>
+     * <tr><td>Axes {@linkplain Identifier#getCode() Code} of the {@linkplain
GeodeticDatum#getName() name}</td>
      *     <td>{@code "Easting"}</td>
      *     <td>{@code "Northing"}</td></tr>
      * <tr><td>Axes {@linkplain CoordinateSystemAxis#getAbbreviation() abbreviation}</td>
@@ -329,7 +329,7 @@ public final strictfp class GeodeticObje
      * <tr><th>Property</th> <th colspan="2">Expected value</th></tr>
      * <tr><td>{@linkplain EllipsoidalCS#getDimension() Dimension}</td>
      *     <td colspan="2">2</td></tr>
-     * <tr><td>Axes {@linkplain ReferenceIdentifier#getCode() Code} of the {@linkplain
GeodeticDatum#getName() name}</td>
+     * <tr><td>Axes {@linkplain Identifier#getCode() Code} of the {@linkplain
GeodeticDatum#getName() name}</td>
      *     <td>{@code "Geodetic latitude"}</td>
      *     <td>{@code "Geodetic longitude"}</td></tr>
      * <tr><td>Axes {@linkplain CoordinateSystemAxis#getDirection() direction}</td>

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -22,6 +22,7 @@ import java.util.Collections;
 import java.io.Serializable;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.referencing.IdentifiedObject;
@@ -168,7 +169,7 @@ public class SimpleIdentifiedObject impl
     @Override
     public final int hashCode() {
         int code = (int) serialVersionUID;
-        final ReferenceIdentifier name = getName();
+        final Identifier name = getName();
         if (name != null) {
             code ^= name.hashCode();
         }

Copied: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
(from r1629496, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java?p2=sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java&p1=sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java&r1=1629496&r2=1629558&rev=1629558&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
+import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.internal.util.Citations;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Classes;
@@ -42,7 +43,7 @@ import org.apache.sis.internal.jdk7.Obje
  * @version 0.5
  * @module
  */
-public class SimpleIdentifier implements Identifier, Serializable {
+public class SimpleIdentifier implements ReferenceIdentifier, Serializable {
     /**
      * For cross-version compatibility.
      */
@@ -138,18 +139,6 @@ public class SimpleIdentifier implements
     }
 
     /**
-     * Returns a natural language description of the meaning of the code value.
-     *
-     * @return Natural language description, or {@code null} if none.
-     *
-     * @since 0.5
-     */
-    @Override
-    public InternationalString getDescription() {
-        return null;
-    }
-
-    /**
      * Returns {@code true} if the given object is of the same class than this
      * {@code SimpleIdentifier} and has the same values.
      *

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java [UTF-8] Mon
Oct  6 01:00:52 2014
@@ -122,7 +122,7 @@ public class OptionKey<T> implements Ser
      *   <tr><td>{@code "READ"}</td>   <td>Open for reading data
from the storage object.</td></tr>
      *   <tr><td>{@code "WRITE"}</td>  <td>Open for modifying existing
data in the storage object.</td></tr>
      *   <tr><td>{@code "APPEND"}</td> <td>Open for appending new
data in the storage object.</td></tr>
-     *   <tr><td>{@link "CREATE"}</td> <td>Creates a new storage
object (file or database) if it does not exist.</td></tr>
+     *   <tr><td>{@code "CREATE"}</td> <td>Creates a new storage
object (file or database) if it does not exist.</td></tr>
      * </table>
      *
      * {@section Differences between the JDK6 and JDK7 branches of SIS}

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java [UTF-8]
(original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java [UTF-8]
Mon Oct  6 01:00:52 2014
@@ -107,7 +107,7 @@ public class DefaultRecord implements Re
 
     /**
      * Returns the dictionary of all (<var>name</var>, <var>value</var>)
pairs in this record.
-     * This method returns a view which will delegate all {@get} and {@code pt} operations
to
+     * This method returns a view which will delegate all {@code get} and {@code pt} operations
to
      * the {@link #locate(MemberName)} and {@link #set(MemberName, Object)} methods respectively.
      *
      * @return The dictionary of all (<var>name</var>, <var>value</var>)
pairs in this record.

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DefinitionURITest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DefinitionURITest.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DefinitionURITest.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DefinitionURITest.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -17,7 +17,7 @@
 package org.apache.sis.internal.util;
 
 import org.opengis.referencing.ReferenceIdentifier;
-import org.apache.sis.internal.simple.SimpleReferenceIdentifier;
+import org.apache.sis.internal.simple.SimpleIdentifier;
 import org.apache.sis.internal.simple.SimpleCitation;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
@@ -147,11 +147,11 @@ public final strictfp class DefinitionUR
     }
 
     /**
-     * Tests {@link DefinitionURI#toURN(String, ReferenceIdentifier)}.
+     * Tests {@link DefinitionURI#format(String, ReferenceIdentifier)}.
      */
     @Test
     public void testToURN() {
-        final ReferenceIdentifier identifier = new SimpleReferenceIdentifier(new SimpleCitation("EPSG"),
"4326");
+        final ReferenceIdentifier identifier = new SimpleIdentifier(new SimpleCitation("EPSG"),
"4326");
         assertEquals("urn:ogc:def:crs:EPSG::4326", DefinitionURI.format("crs", identifier));
     }
 }

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -87,7 +87,7 @@ import org.junit.BeforeClass;
     org.apache.sis.util.iso.DefaultNameFactoryTest.class,
     org.apache.sis.util.iso.NamesTest.class,
     org.apache.sis.util.iso.TypeNamesTest.class,
-    org.apache.sis.internal.simple.SimpleReferenceIdentifierTest.class,
+    org.apache.sis.internal.simple.SimpleIdentifierTest.class,
     org.apache.sis.util.iso.DefaultRecordTypeTest.class,
     org.apache.sis.util.iso.DefaultRecordSchemaTest.class,
     org.apache.sis.util.iso.DefaultRecordTest.class,

Modified: sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/FieldDescriptor.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/FieldDescriptor.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/FieldDescriptor.java
[UTF-8] (original)
+++ sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/FieldDescriptor.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -39,7 +39,11 @@ public class FieldDescriptor {
 
 
     public String getName() {
-        return new String(this.FieldName);
+        int length = FieldName.length;
+        while (length != 0 && FieldName[length - 1] <= ' ') {
+            length--;
+        }
+        return new String(this.FieldName, 0, length);
     }
 
     public int getLength() {

Modified: sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/ShapeFile.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/ShapeFile.java?rev=1629558&r1=1629557&r2=1629558&view=diff
==============================================================================
--- sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/ShapeFile.java
[UTF-8] (original)
+++ sis/trunk/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/ShapeFile.java
[UTF-8] Mon Oct  6 01:00:52 2014
@@ -244,7 +244,11 @@ public class ShapeFile {
             for (FieldDescriptor fd: this.FDArray) {
                 data = new byte[fd.getLength()];
                 df.get(data);
-                String value = new String(data);
+                int length = data.length;
+                while (length != 0 && data[length - 1] <= ' ') {
+                    length--;
+                }
+                String value = new String(data, 0, length);
                 f.setPropertyValue(fd.getName(), value);
             }
 



Mime
View raw message