Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Wed Mar 12 22:44:18 2014 @@ -24,6 +24,7 @@ # programmatic parameters do not have to be last in the formatted text, since each localized message # can reorder the parameters as they want. # +AmbiguousName_3 = Name \u201c{2}\u201d is ambiguous because it can be understood as either \u201c{0}\u201d or \u201c{1}\u201d. CanNotAddToExclusiveSet_2 = No element can be added to this set because properties \u2018{0}\u2019 and \u2018{1}\u2019 are mutually exclusive. CanNotConnectTo_1 = Can not connect to \u201c{0}\u201d. CanNotConvertFromType_2 = Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019. @@ -44,7 +45,9 @@ DeadThread_1 = Thre DuplicatedElement_1 = Element \u201c{0}\u201d is duplicated. DuplicatedIdentifier_1 = Identifier \u201c{0}\u201d is duplicated. DuplicatedOption_1 = Option \u201c{0}\u201d is duplicated. +DuplicatedParameterName_4 = Name or alias for parameter \u201c{0}\u201d at index {1} conflict with name \u201c{2}\u201d at index {3}. ElementAlreadyPresent_1 = Element \u201c{0}\u201d is already present. +ElementNotFound_1 = Element \u201c{0}\u201d has not been found. EmptyArgument_1 = Argument \u2018{0}\u2019 shall not be empty. EmptyDictionary = The dictionary shall contain at least one entry. EmptyEnvelope2D = Envelope must be at least two-dimensional and non-empty. @@ -87,6 +90,7 @@ KeyCollision_1 = A di MandatoryAttribute_2 = Attribute \u201c{0}\u201d is mandatory for an object of type \u2018{1}\u2019. MismatchedArrayLengths = Mismatched array lengths. MismatchedCRS = The coordinate reference system must be the same for all objects. +MismatchedParameterDescriptor_1 = Mismatched descriptor for \u201c{0}\u201d parameter. MismatchedDimension_2 = Mismatched object dimensions: {0}D and {1}D. MismatchedDimension_3 = Argument \u2018{0}\u2019 has {2} dimension{2,choice,1#|2#s}, while {1} was expected. MismatchedMatrixSize_4 = Mismatched matrix sizes: expected {0}\u00d7{1} but got {2}\u00d7{3}. @@ -124,8 +128,6 @@ NotASkewSymmetricMatrix = Matr NotAUnicodeIdentifier_1 = Text \u201c{0}\u201d is not a Unicode identifier. NotComparableClass_1 = Class \u2018{0}\u2019 is not a comparable. NoSuchAuthorityCode_3 = No code \u201c{2}\u201d from authority \u201c{0}\u201d found for object of type \u2018{1}\u2019. -NoSuchElement_1 = Element \u201c{0}\u201d has not been found. -NoSuchProperty_2 = No property named \u201c{0}\u201d has been found in \u201c{1}\u201d. NoUnit = No unit of measurement has been specified. NullArgument_1 = Argument \u2018{0}\u2019 shall not be null. NullCollectionElement_1 = \u2018{0}\u2019 collection does not accept null elements. @@ -133,13 +135,17 @@ NullCollectionElement_1 = \u20 NullMapKey = Null key is not allowed in this dictionary. NullMapValue = Null values are not allowed in this dictionary. OddArrayLength_1 = Array length is {0}, while we expected an even length. +ParameterNotFound_2 = No parameter named \u201c{1}\u201d has been found in \u201c{0}\u201d. +PropertyNotFound_2 = No property named \u201c{1}\u201d has been found in \u201c{0}\u201d. SingularMatrix = Matrix is singular. RecursiveCreateCallForKey_1 = Recursive call while creating an object for the \u201c{0}\u201d key. RequireDecimalSeparator = A decimal separator is required. StalledThread_1 = Thread \u201c{0}\u201d seems stalled. StreamIsForwardOnly_1 = Can not move backward in the \u201c{0}\u201d stream. TooFewArguments_2 = Expected at least {0} argument{0,choice,1#|2#s}, but got {1}. +TooFewOccurrences_2 = Too few occurrences of \u201c{1}\u201d. Expected at least {0} of them. TooManyArguments_2 = Expected at most {0} argument{0,choice,1#|2#s}, but got {1}. +TooManyOccurrences_2 = Too many occurrences of \u201c{1}\u201d. There is already {0} of them. TreeDepthExceedsMaximum = Tree depth exceeds the maximum. UndefinedOrderingForElements_2 = Ordering between \u201c{0}\u201d and \u201c{1}\u201d elements is undefined. UnexpectedArrayLength_2 = Expected an array of length {0}, but got {1}. @@ -169,5 +175,5 @@ UnsupportedOperation_1 = The UnsupportedType_1 = The \u2018{0}\u2019 type is unsupported. UnsupportedVersion_1 = Version {0} is not supported. ValueAlreadyDefined_1 = A value is already defined for \u201c{0}\u201d. -ValueNotGreaterThanZero_2 = Value \u2018{0}\u2019={1} is invalid. Expected a number greater than 0. -ValueOutOfRange_4 = Value \u2018{0}\u2019={3} is invalid. Expected a value in the [{1} \u2026 {2}] range. +ValueNotGreaterThanZero_2 = Value \u2018{0}\u2019 = {1} is invalid. Expected a number greater than 0. +ValueOutOfRange_4 = Value \u2018{0}\u2019 = {3} is invalid. Expected a value in the [{1} \u2026 {2}] range.
Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] Wed Mar 12 22:44:18 2014 @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +AmbiguousName_3 = Le nom \u00ab\u202f{2}\u202f\u00bb est ambigu\u00eb car il peut \u00eatre interpr\u00e9t\u00e9 comme \u00ab\u202f{0}\u202f\u00bb ou \u00ab\u202f{1}\u202f\u00bb. CanNotAddToExclusiveSet_2 = Aucun \u00e9l\u00e9ment ne peut \u00eatre ajout\u00e9 \u00e0 cet ensemble car les propri\u00e9t\u00e9s \u2018{0}\u2019 et \u2018{1}\u2019 sont mutuellement exclusives. CanNotConnectTo_1 = Ne peut pas se connecter \u00e0 \u00ab\u202f{0}\u202f\u00bb. CanNotConvertFromType_2 = Ne peut pas convertir du type \u2018{0}\u2019 vers le type \u2018{1}\u2019. @@ -34,7 +35,9 @@ DeadThread_1 = La t DuplicatedElement_1 = L\u2019\u00e9lement \u00ab\u202f{0}\u202f\u00bb est dupliqu\u00e9. DuplicatedIdentifier_1 = L\u2019identifiant \u00ab\u202f{0}\u202f\u00bb est dupliqu\u00e9. DuplicatedOption_1 = L\u2019option \u00ab\u202f{0}\u202f\u00bb est dupliqu\u00e9e. +DuplicatedParameterName_4 = Le nom ou un alias pour le param\u00e8tre \u00ab\u202f{0}\u202f\u00bb \u00e0 l\u2019index {1} duplique le nom \u00ab\u202f{2}\u202f\u00bb \u00e0 l\u2019index {3}. ElementAlreadyPresent_1 = L\u2019\u00e9lement \u00ab\u202f{0}\u202f\u00bb est d\u00e9j\u00e0 pr\u00e9sent. +ElementNotFound_1 = L\u2019\u00e9lement \u00ab\u202f{0}\u202f\u00bb n\u2019a pas \u00e9t\u00e9 trouv\u00e9. EmptyArgument_1 = L\u2019argument \u2018{0}\u2019 ne doit pas \u00eatre vide. EmptyDictionary = Le dictionnaire doit contenir au moins une entr\u00e9e. EmptyEnvelope2D = L\u2019enveloppe doit avoir au moins deux dimensions et ne pas \u00eatre vide. @@ -77,6 +80,7 @@ KeyCollision_1 = Une MandatoryAttribute_2 = L\u2019attribut \u00ab\u202f{0}\u202f\u00bb est obligatoire pour un objet de type \u2018{1}\u2019. MismatchedArrayLengths = Les dimensions des tableaux ne correspondent pas. MismatchedCRS = Le syst\u00e8me de r\u00e9f\u00e9rence des coordonn\u00e9es doit \u00eatre le m\u00eame pour tous les objets. +MismatchedParameterDescriptor_1 = Le descripteur du param\u00e8tre \u00ab\u202f{0}\u202f\u00bb ne correspond pas. MismatchedDimension_2 = Les dimensions des objets ({0}D et {1}D) ne concordent pas. MismatchedDimension_3 = L\u2019argument \u2018{0}\u2019 a {2} dimension{2,choice,1#|2#s}, alors qu\u2019on en attendait {1}. MismatchedMatrixSize_4 = Une matrice de taille de {0}\u00d7{1} \u00e9tait attendue mais la matrice donn\u00e9es est de taille {2}\u00d7{3}. @@ -114,21 +118,23 @@ NotASkewSymmetricMatrix = La m NotAUnicodeIdentifier_1 = Le texte \u00ab\u202f{0}\u202f\u00bb n\u2019est pas un identifiant Unicode. NotComparableClass_1 = La classe \u2018{0}\u2019 n\u2019est pas comparable. NoSuchAuthorityCode_3 = Aucun code \u00ab\u202f{2}\u202f\u00bb de l\u2019autorit\u00e9 \u00ab\u202f{0}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9 pour un objet de type \u2018{1}\u2019. -NoSuchElement_1 = L\u2019\u00e9lement \u00ab\u202f{0}\u202f\u00bb n\u2019a pas \u00e9t\u00e9 trouv\u00e9. -NoSuchProperty_2 = Aucune propri\u00e9t\u00e9 nomm\u00e9e \u00ab\u202f{0}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9e dans \u00ab\u202f{1}\u202f\u00bb. NoUnit = Aucune unit\u00e9 de mesure n\u2019a \u00e9t\u00e9 sp\u00e9cifi\u00e9e. NullArgument_1 = L\u2019argument \u2018{0}\u2019 ne doit pas \u00eatre nul. NullCollectionElement_1 = La collection \u2018{0}\u2019 n\u2019accepte pas les valeurs nulles. NullMapKey = La cl\u00e9 nulle n\u2019est pas autoris\u00e9e dans ce dictionnaire. NullMapValue = Les valeurs nulles ne sont pas autoris\u00e9es dans ce dictionnaire. OddArrayLength_1 = La longueur du tableau est {0}, alors qu\u2019on attendait une longueur paire. +ParameterNotFound_2 = Aucun param\u00e8tre nomm\u00e9 \u00ab\u202f{1}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9 dans \u00ab\u202f{0}\u202f\u00bb. +PropertyNotFound_2 = Aucune propri\u00e9t\u00e9 nomm\u00e9e \u00ab\u202f{1}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9e dans \u00ab\u202f{0}\u202f\u00bb. RecursiveCreateCallForKey_1 = Appel r\u00e9cursif lors de la cr\u00e9ation d\u2019un objet pour la cl\u00e9 \u00ab\u202f{0}\u202f\u00bb. RequireDecimalSeparator = Un s\u00e9parateur d\u00e9cimal est requis. SingularMatrix = La matrice est singuli\u00e8re. StalledThread_1 = La t\u00e2che \u00ab\u202f{0}\u202f\u00bb semble bloqu\u00e9e. StreamIsForwardOnly_1 = Ne peut pas reculer dans le flux de donn\u00e9es \u00ab\u202f{0}\u202f\u00bb. TooFewArguments_2 = Au moins {0} argument{0,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}, mais seulement {1} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9 sp\u00e9cifi\u00e9s}. +TooFewOccurrences_2 = Trop peu d\u2019occurrences de \u00ab\u202f{1}\u202f\u00bb. Il en faut au moins {0}. TooManyArguments_2 = Au plus {0} argument{0,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}, mais {1} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9 sp\u00e9cifi\u00e9s}. +TooManyOccurrences_2 = Trop d\u2019occurrences de \u00ab\u202f{1}\u202f\u00bb. Il en existe d\u00e9j\u00e0 {0}. TreeDepthExceedsMaximum = La profondeur de l\u2019arbre exc\u00e8de le maximum. UndefinedOrderingForElements_2 = L\u2019ordre entre les \u00e9l\u00e9ments \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb n\u2019est pas d\u00e9fini. UnexpectedArrayLength_2 = Un tableau de longueur {0} \u00e9tait attendu, mais le tableau re\u00e7u est de longueur {1}. @@ -158,5 +164,5 @@ UnsupportedOperation_1 = L\u2 UnsupportedType_1 = Le type \u2018{0}\u2019 n\u2019est pas support\u00e9. UnsupportedVersion_1 = La version {0} n\u2019est pas support\u00e9e. ValueAlreadyDefined_1 = Une valeur est d\u00e9j\u00e0 d\u00e9finie pour \u00ab\u202f{0}\u202f\u00bb. -ValueNotGreaterThanZero_2 = La valeur \u2018{0}\u2019={1} n\u2019est pas valide. On attendait un nombre positif non-nul. -ValueOutOfRange_4 = La valeur \u2018{0}\u2019={3} est invalide. Une valeur dans la plage [{1} \u2026 {2}] \u00e9tait attendue. +ValueNotGreaterThanZero_2 = La valeur \u2018{0}\u2019 = {1} n\u2019est pas valide. On attendait un nombre positif non-nul. +ValueOutOfRange_4 = La valeur \u2018{0}\u2019 = {3} est invalide. Une valeur dans la plage [{1} \u2026 {2}] \u00e9tait attendue. Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] Wed Mar 12 22:44:18 2014 @@ -55,6 +55,11 @@ public final class Vocabulary extends In } /** + * Aliases + */ + public static final short Aliases = 74; + + /** * Angle */ public static final short Angle = 0; @@ -130,6 +135,16 @@ public final class Vocabulary extends In public static final short DaylightTime = 13; /** + * Default value + */ + public static final short DefaultValue = 71; + + /** + * Description + */ + public static final short Description = 75; + + /** * Destination */ public static final short Destination = 14; @@ -365,6 +380,11 @@ public final class Vocabulary extends In public static final short UnavailableContent = 57; /** + * Units + */ + public static final short Units = 72; + + /** * Unnamed */ public static final short Unnamed = 65; @@ -385,6 +405,11 @@ public final class Vocabulary extends In public static final short Value = 60; /** + * Value domain + */ + public static final short ValueDomain = 73; + + /** * Variables */ public static final short Variables = 61; Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] Wed Mar 12 22:44:18 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/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] Wed Mar 12 22:44:18 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/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java [UTF-8] Wed Mar 12 22:44:18 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/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/io/TableAppenderTest.java [UTF-8] Wed Mar 12 22:44:18 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/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java [UTF-8] Wed Mar 12 22:44:18 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/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java [UTF-8] Wed Mar 12 22:44:18 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/branches/JDK6/ide-project/NetBeans/nbproject/project.properties URL: http://svn.apache.org/viewvc/sis/branches/JDK6/ide-project/NetBeans/nbproject/project.properties?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original) +++ sis/branches/JDK6/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Wed Mar 12 22:44:18 2014 @@ -92,6 +92,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. @@ -126,6 +127,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/branches/JDK6/src/main/javadoc/stylesheet.css URL: http://svn.apache.org/viewvc/sis/branches/JDK6/src/main/javadoc/stylesheet.css?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/src/main/javadoc/stylesheet.css (original) +++ sis/branches/JDK6/src/main/javadoc/stylesheet.css Wed Mar 12 22:44:18 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/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java [UTF-8] Wed Mar 12 22:44:18 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/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java?rev=1576972&r1=1576971&r2=1576972&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/DripByteChannel.java [UTF-8] Wed Mar 12 22:44:18 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 {
