sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1576977 [5/5] - in /sis/trunk: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/main/java/org/ap...
Date Wed, 12 Mar 2014 22:52:28 GMT
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] Wed Mar 12 22:52:24 2014
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+Aliases                 = Aliases
 Angle                   = Angle
 AngularDegrees          = Degrees
 AngularMinutes          = Minutes
@@ -29,6 +30,8 @@ CurrentDateTime         = Current date a
 CurrentDirectory        = Current directory
 CycleOmitted            = Cycle omitted
 DaylightTime            = Daylight time
+DefaultValue            = Default value
+Description             = Description
 Destination             = Destination
 Dimensions              = Dimensions
 Directory               = Directory
@@ -78,8 +81,10 @@ Type                    = Type
 Unnamed                 = Unnamed
 Untitled                = Untitled
 UnavailableContent      = Unavailable content.
+Units                   = Units
 UserHome                = User home directory
 Value                   = Value
+ValueDomain             = Value domain
 Variables               = Variables
 Version_2               = {0} version {1}
 Versions                = Versions

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] Wed Mar 12 22:52:24 2014
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+Aliases                 = Alias
 Angle                   = Angle
 AngularDegrees          = Degr\u00e9s
 AngularMinutes          = Minutes
@@ -29,6 +30,8 @@ CurrentDateTime         = Date et heure 
 CurrentDirectory        = R\u00e9pertoire courant
 CycleOmitted            = Cycle omit
 DaylightTime            = Heure normale
+DefaultValue            = Valeur par d\u00e9faut
+Description             = Description
 Destination             = Destination
 Dimensions              = Dimensions
 Directory               = R\u00e9pertoire
@@ -78,8 +81,10 @@ Type                    = Type
 Unnamed                 = Sans nom
 Untitled                = Sans titre
 UnavailableContent      = Contenu non-disponible.
+Units                   = Unit\u00e9s
 UserHome                = R\u00e9pertoire de l'utilisateur
 Value                   = Valeur
+ValueDomain             = Domaine des valeurs
 Variables               = Variables
 Version_2               = {0} version {1}
 Versions                = Versions

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java
[UTF-8] Wed Mar 12 22:52:24 2014
@@ -21,9 +21,13 @@ import java.util.Arrays;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.Set;
+import java.util.EnumSet;
+import java.util.HashSet;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Locale;
+import org.apache.sis.util.collection.CodeListSet;
 import org.apache.sis.util.ObjectConverters;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -75,6 +79,24 @@ public final strictfp class CollectionsE
     }
 
     /**
+     * Tests {@link CollectionsExt#createSetForType(Class, int)}.
+     */
+    @Test
+    public void testCreateSetForType() {
+        Set<?> set = CollectionsExt.createSetForType(java.lang.annotation.ElementType.class,
0);
+        assertTrue("isEmpty", set.isEmpty());
+        assertInstanceOf("Set<ElementType>", EnumSet.class, set);
+
+        set = CollectionsExt.createSetForType(org.opengis.referencing.cs.AxisDirection.class,
0);
+        assertTrue("isEmpty", set.isEmpty());
+        assertInstanceOf("Set<AxisDirection>", CodeListSet.class, set);
+
+        set = CollectionsExt.createSetForType(String.class, 0);
+        assertTrue("isEmpty", set.isEmpty());
+        assertInstanceOf("Set<String>", HashSet.class, set);
+    }
+
+    /**
      * Tests {@link CollectionsExt#addToMultiValuesMap(Map, Object, Object)}.
      */
     @Test

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java [UTF-8]
(original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java [UTF-8]
Wed Mar 12 22:52:24 2014
@@ -64,7 +64,7 @@ public final strictfp class TableAppende
         // r.e.d. = Equatorial diameter Measured relative to the Earth.
         // Source: "Planet" on wikipedia on July 25, 2008.
         assertSame(out, out.append("English\tFrench\tr.e.d." + lineSeparator));
-        table.writeHorizontalSeparator();
+        table.appendHorizontalSeparator();
         assertSame(out, out.append("Mercury\tMercure\t0.382" + lineSeparator));
         assertSame(out, out.append("Venus\tVénus\t0.949"     + lineSeparator));
         assertSame(out, out.append("Earth\tTerre"));
@@ -138,7 +138,7 @@ public final strictfp class TableAppende
      */
     private static void testToString(final TableAppender table, final String expected) {
         table.nextLine('═');
-        table.append("English\tFrench\tr.e.d.\n").writeHorizontalSeparator();
+        table.append("English\tFrench\tr.e.d.\n").appendHorizontalSeparator();
         table.append("Mercury\tMercure\t0.382\n")
              .append("Venus\tVénus\t0.949\n")
              .append("Earth\tTerre\t1.00\n")

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
[UTF-8] Wed Mar 12 22:52:24 2014
@@ -17,6 +17,7 @@
 package org.apache.sis.measure;
 
 import javax.measure.unit.SI;
+import javax.measure.unit.NonSI;
 import javax.measure.converter.ConversionException;
 import org.junit.Test;
 import org.apache.sis.test.TestCase;
@@ -30,7 +31,7 @@ import static org.apache.sis.test.Assert
  *
  * @author  Martin Desruisseaux (IRD)
  * @since   0.3 (derived from geotk-2.4)
- * @version 0.3
+ * @version 0.4
  * @module
  */
 @DependsOn(NumberRangeTest.class)
@@ -80,8 +81,10 @@ public final strictfp class MeasurementR
      */
     @Test
     public void testToString() {
-        final MeasurementRange<Float> range = MeasurementRange.create(10f, true, 20f,
true, SI.KILOMETRE);
+        MeasurementRange<Float> range = MeasurementRange.create(10f, true, 20f, true,
SI.KILOMETRE);
         assertEquals("[10.0 … 20.0] km", range.toString());
+        range = MeasurementRange.create(10f, true, 20f, true, NonSI.DEGREE_ANGLE);
+        assertEquals("[10.0 … 20.0] deg", range.toString());
     }
 
     /**

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java [UTF-8]
(original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java [UTF-8]
Wed Mar 12 22:52:24 2014
@@ -24,6 +24,7 @@ import java.text.FieldPosition;
 import java.text.ParsePosition;
 import java.text.ParseException;
 import java.text.AttributedCharacterIterator;
+import javax.measure.unit.NonSI;
 import javax.measure.unit.SI;
 import org.junit.Test;
 import org.apache.sis.test.TestCase;
@@ -40,7 +41,7 @@ import static java.lang.Double.NEGATIVE_
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.06)
- * @version 0.3
+ * @version 0.4
  * @module
  */
 @DependsOn(MeasurementRangeTest.class)
@@ -185,6 +186,12 @@ public final strictfp class RangeFormatT
         assertEquals("maxPos.beginIndex", 7, maxPos.getBeginIndex());
         assertEquals("maxPos.endIndex",   9, maxPos.getEndIndex());
 
+        assertEquals("[-10 … 20]°", format(MeasurementRange.create(-10, true, 20, true,
NonSI.DEGREE_ANGLE)));
+        assertEquals("minPos.beginIndex", 1, minPos.getBeginIndex());
+        assertEquals("minPos.endIndex",   4, minPos.getEndIndex());
+        assertEquals("maxPos.beginIndex", 7, maxPos.getBeginIndex());
+        assertEquals("maxPos.endIndex",   9, maxPos.getEndIndex());
+
         maxPos = new FieldPosition(RangeFormat.Field.UNIT);
         assertEquals("[-1 … 2] km", format(MeasurementRange.create(-1, true, 2, true, SI.KILOMETRE)));
         assertEquals("unitPos.beginIndex", 9, maxPos.getBeginIndex());

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.properties?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Wed Mar 12 22:52:24
2014
@@ -86,6 +86,7 @@ joda-time.version    = 2.0
 httpclient.version   = 3.1
 slf4j.version        = 1.6.4
 junit.version        = 4.11
+hamcrest.version     = 1.3
 
 #
 # Classpaths for compilation, execution and tests.
@@ -122,6 +123,7 @@ run.classpath=\
 run.test.classpath=\
     ${javac.test.classpath}:\
     ${build.test.classes.dir}:\
+    ${maven.repository}/org/hamcrest/hamcrest-core/${hamcrest.version}/hamcrest-core-${hamcrest.version}.jar:\
     ${maven.repository}/org/jdom/jdom2/${jdom2.version}/jdom2-${jdom2.version}.jar:\
     ${maven.repository}/edu/ucar/udunits/${netcdf.version}/udunits-${netcdf.version}.jar:\
     ${maven.repository}/joda-time/joda-time/${joda-time.version}/joda-time-${joda-time.version}.jar:\

Modified: sis/trunk/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/trunk/src/main/javadoc/stylesheet.css?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/src/main/javadoc/stylesheet.css (original)
+++ sis/trunk/src/main/javadoc/stylesheet.css Wed Mar 12 22:52:24 2014
@@ -56,7 +56,7 @@ table.sis tr td.sep {
 
 /*
  * Table without vertical space between rows and a little bit of space between columns.
- * This table has no border. Headers are still centered and other cells left-aligned.
+ * This table has no border and text is left-aligned.
  */
 table.compact {
   margin-top:     6pt;
@@ -147,6 +147,17 @@ div.note {
   margin-bottom: 9pt;
 }
 
+/*
+ * Note, examples or warnings.
+ */
+div.warning {
+  color:   firebrick;
+  margin-left:  30pt;
+  margin-right: 30pt;
+  margin-top:    9pt;
+  margin-bottom: 9pt;
+}
+
 
 
 

Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
[UTF-8] (original)
+++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
[UTF-8] Wed Mar 12 22:52:24 2014
@@ -774,6 +774,8 @@ public class ChannelDataInput {
 
     /**
      * Returns a string representation of this object for debugging purpose.
+     *
+     * @return A string representation of this channel.
      */
     @Debug
     @Override

Modified: sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java?rev=1576977&r1=1576976&r2=1576977&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java
[UTF-8] (original)
+++ sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java
[UTF-8] Wed Mar 12 22:52:24 2014
@@ -80,6 +80,7 @@ public final strictfp class DripByteChan
      * Reads a random number of bytes from the data array.
      *
      * @param buffer The buffer where to copy the bytes.
+     * @throws IOException If this channel is closed.
      */
     @Override
     public int read(final ByteBuffer buffer) throws IOException {



Mime
View raw message