sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1829605 - in /sis/branches/JDK8/core/sis-metadata/src: main/java/org/apache/sis/internal/jaxb/lan/ main/java/org/apache/sis/internal/simple/ main/java/org/apache/sis/metadata/iso/ test/java/org/apache/sis/internal/jaxb/lan/
Date Thu, 19 Apr 2018 19:23:48 GMT
Author: desruisseaux
Date: Thu Apr 19 19:23:48 2018
New Revision: 1829605

URL: http://svn.apache.org/viewvc?rev=1829605&view=rev
Log:
Clarification in documentation.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/simple/SimpleMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java?rev=1829605&r1=1829604&r2=1829605&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
[UTF-8] Thu Apr 19 19:23:48 2018
@@ -30,7 +30,7 @@ import org.apache.sis.internal.jaxb.gco.
  * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
  * See package documentation for more information about the handling of {@code CodeList}
in ISO 19115-3.
  *
- * <p>This adapter formats the locale like below:</p>
+ * <p>This adapter formats the locale like below (by {@link LocaleAdapter}):</p>
  *
  * {@preformat xml
  *   <gmd:language>
@@ -38,6 +38,16 @@ import org.apache.sis.internal.jaxb.gco.
  *   </gmd:language>
  * }
  *
+ * or (when using {@link PT_Locale} adapter):
+ *
+ * {@preformat xml
+ *   <lan:PT_Locale>
+ *     <lan:language>
+ *       <lan:LanguageCode codeList="http://(...snip...)" codeListValue="eng">English</lan:LanguageCode>
+ *     </lan:language>
+ *   </lan:PT_Locale>
+ * }
+ *
  * Note that {@code <gco:CharacterString>} can be substituted to the language code.
  *
  * @author  Cédric Briançon (Geomatys)

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java?rev=1829605&r1=1829604&r2=1829605&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
[UTF-8] Thu Apr 19 19:23:48 2018
@@ -26,11 +26,14 @@ import org.apache.sis.internal.jaxb.Cont
  * mapped to {@link Locale}. This adapter formats the locale like below:
  *
  * {@preformat xml
- *   <lan:language>
- *     <lan:LanguageCode codeList="(snip)#LanguageCode" codeListValue="jpn">Japanese</lan:LanguageCode>
- *   </lan:language>
+ *   <gmd:language>
+ *     <gmd:LanguageCode codeList="(snip)#LanguageCode" codeListValue="jpn">Japanese</gmd:LanguageCode>
+ *   </gmd:language>
  * }
  *
+ * This adapter is used for legacy locales in {@code gmd} namespace.
+ * For locales in the newer {@code lan} namespace, see {@link PT_Locale}.
+ *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.4

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java?rev=1829605&r1=1829604&r2=1829605&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
[UTF-8] Thu Apr 19 19:23:48 2018
@@ -53,7 +53,7 @@ import org.apache.sis.internal.jaxb.Cont
  *   </lan:locale>
  * }
  *
- * For an alternative (simpler) format, see {@link LocaleAdapter}.
+ * For an alternative (simpler) format used in the legacy {@code gmd} namespace, see {@link
LocaleAdapter}.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Cullen Rombach (Image Matters)

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/simple/SimpleMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/simple/SimpleMetadata.java?rev=1829605&r1=1829604&r2=1829605&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/simple/SimpleMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/simple/SimpleMetadata.java
[UTF-8] Thu Apr 19 19:23:48 2018
@@ -118,7 +118,7 @@ public class SimpleMetadata implements M
     }
 
     /**
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #getLanguages()}.
+     * @deprecated As of SIS 0.5, replaced by {@link #getLanguages()}.
      */
     @Override
     @Deprecated
@@ -127,7 +127,7 @@ public class SimpleMetadata implements M
     }
 
     /**
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #getLanguages()}.
+     * @deprecated As of SIS 0.5, replaced by {@link #getLanguages()}.
      */
     @Override
     @Deprecated
@@ -145,7 +145,7 @@ public class SimpleMetadata implements M
     }
 
     /**
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #getCharacterSets()}.
+     * @deprecated As of SIS 0.5, replaced by {@link #getCharacterSets()}.
      */
     @Override
     @Deprecated

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1829605&r1=1829604&r2=1829605&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] Thu Apr 19 19:23:48 2018
@@ -521,7 +521,7 @@ public class DefaultMetadata extends ISO
      *
      * @return language used for documenting metadata, or {@code null}.
      *
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #getLanguages()}.
+     * @deprecated As of SIS 0.5, replaced by {@link #getLanguages()}.
      */
     @Override
     @Deprecated
@@ -547,7 +547,7 @@ public class DefaultMetadata extends ISO
      *
      * @param  newValue  the new language.
      *
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #setLanguages(Collection)}.
+     * @deprecated As of SIS 0.5, replaced by {@link #setLanguages(Collection)}.
      */
     @Deprecated
     public void setLanguage(final Locale newValue) {
@@ -560,7 +560,7 @@ public class DefaultMetadata extends ISO
      *
      * @return alternatively used localized character string for a linguistic extension.
      *
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #getLanguages()}.
+     * @deprecated As of SIS 0.5, replaced by {@link #getLanguages()}.
      */
     @Override
     @Deprecated
@@ -575,7 +575,7 @@ public class DefaultMetadata extends ISO
      *
      * @param  newValues  the new locales.
      *
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #setLanguages(Collection)}.
+     * @deprecated As of SIS 0.5, replaced by {@link #setLanguages(Collection)}.
      */
     @Deprecated
     public void setLocales(final Collection<? extends Locale> newValues) {
@@ -621,7 +621,7 @@ public class DefaultMetadata extends ISO
      *
      * @since 0.5
      */
-    public void setCharacterSets(final Collection<Charset> newValues) {
+    public void setCharacterSets(final Collection<? extends Charset> newValues) {
         characterSets = writeCollection(newValues, characterSets, Charset.class);
     }
 
@@ -630,7 +630,7 @@ public class DefaultMetadata extends ISO
      *
      * @return character coding standard used for the metadata, or {@code null}.
      *
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #getCharacterSets()}.
+     * @deprecated As of SIS 0.5, replaced by {@link #getCharacterSets()}.
      */
     @Override
     @Deprecated
@@ -660,7 +660,7 @@ public class DefaultMetadata extends ISO
      *
      * @param  newValue  the new character set.
      *
-     * @deprecated As of GeoAPI 3.1, replaced by {@link #setCharacterSets(Collection)}.
+     * @deprecated As of SIS 0.5, replaced by {@link #setCharacterSets(Collection)}.
      */
     @Deprecated
     public void setCharacterSet(final CharacterSet newValue) {

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java?rev=1829605&r1=1829604&r2=1829605&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java
[UTF-8] Thu Apr 19 19:23:48 2018
@@ -42,8 +42,8 @@ import static org.apache.sis.internal.ut
 
 /**
  * Tests the XML marshaling of {@code Locale} when used for a language.
- * The locale is marshalled as a character string. This format was used by ISO 19139:2007
- * but is not used anymore in ISO 19115-3 (the newer version use {@code PT_Locale} instead).
+ * The locale is marshalled as a character string. This format was used directly by ISO 19139:2007
+ * but only indirectly by ISO 19115-3 (the newer version wraps the language in {@code PT_Locale}).
  *
  * <p>This class also test indirectly the {@link org.apache.sis.xml} capability to
map the legacy
  * {@code "http://www.isotc211.org/2005/gmd"} namespace to {@code "http://standards.iso.org/…"}.</p>



Mime
View raw message