Author: desruisseaux Date: Sat Feb 10 14:45:49 2018 New Revision: 1823777 URL: http://svn.apache.org/viewvc?rev=1823777&view=rev Log: Restore @XmlType on GO_CharacterSequence subclasses; they are required for proper working of "xsi:type" attribute. Update some related documentation. Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LanguageCode.java sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/PT_FreeText.java sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java?rev=1823777&r1=1823776&r2=1823777&view=diff ============================================================================== --- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java [UTF-8] (original) +++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/CharSequenceAdapter.java [UTF-8] Sat Feb 10 14:45:49 2018 @@ -92,12 +92,12 @@ public class CharSequenceAdapter extends return wrap(Context.current(), value, (String) value); // Slightly more efficient variant of this method. } /* - * + * * ... - * + * * ... see PT_FreeText ... - * - * + * + * */ if (value instanceof InternationalString) { final PT_FreeText ft = PT_FreeText.create((InternationalString) value); @@ -136,9 +136,9 @@ public class CharSequenceAdapter extends * have been replaced by an Anchor. The output will be one of the following: * * ┌──────────────────────────────────────────────────┬────────────────────────────────┐ - * │ │ + * │ │ * │ ...... │ - * │ │ + * │ │ │ * └──────────────────────────────────────────────────┴────────────────────────────────┘ */ return new GO_CharacterString(value); Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java?rev=1823777&r1=1823776&r2=1823777&view=diff ============================================================================== --- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java [UTF-8] (original) +++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java [UTF-8] Sat Feb 10 14:45:49 2018 @@ -17,6 +17,7 @@ package org.apache.sis.internal.jaxb.gmd; import java.util.Locale; +import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; import org.apache.sis.util.CharSequences; import org.apache.sis.internal.jaxb.Context; @@ -50,6 +51,7 @@ import org.apache.sis.xml.Namespaces; * @since 0.3 * @module */ +@XmlType(name = "Country_PropertyType", namespace = Namespaces.LAN) public final class Country extends GO_CharacterString { /** * The country using a {@link org.opengis.util.CodeList}-like format. Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LanguageCode.java URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LanguageCode.java?rev=1823777&r1=1823776&r2=1823777&view=diff ============================================================================== --- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LanguageCode.java [UTF-8] (original) +++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/LanguageCode.java [UTF-8] Sat Feb 10 14:45:49 2018 @@ -18,6 +18,7 @@ package org.apache.sis.internal.jaxb.gmd import java.util.Locale; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; import org.apache.sis.internal.jaxb.Context; import org.apache.sis.internal.jaxb.gco.GO_CharacterString; import org.apache.sis.internal.jaxb.gco.CharSequenceAdapter; @@ -46,6 +47,7 @@ import org.apache.sis.xml.Namespaces; * @since 0.3 * @module */ +@XmlType(name = "LanguageCode_PropertyType", namespace = Namespaces.LAN) public final class LanguageCode extends GO_CharacterString { /** * The language using a {@link org.opengis.util.CodeList}-like format. Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/PT_FreeText.java URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/PT_FreeText.java?rev=1823777&r1=1823776&r2=1823777&view=diff ============================================================================== --- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/PT_FreeText.java [UTF-8] (original) +++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/PT_FreeText.java [UTF-8] Sat Feb 10 14:45:49 2018 @@ -18,6 +18,7 @@ package org.apache.sis.internal.jaxb.gmd import java.util.Set; import java.util.Locale; +import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; @@ -36,18 +37,18 @@ import org.apache.sis.util.ArraysExt; * using the {@link DefaultInternationalString} implementation class. Example: * * {@preformat xml - * + * * Some title in english is present in this node - * - * - * Un titre en français - * - * - * + * + * + * Un titre en français + * + * + * * } * - * If there is more than one locale, the whole {@code } block is repeated for each - * locale, instead than repeating {@code } inside the same group as + * If there is more than one locale, the whole {@code } block is repeated for each + * locale, instead than repeating {@code } inside the same group as * we could expect. However at unmarshalling time, both forms are accepted. See GEOTK-152 for more * information. * @@ -64,9 +65,10 @@ import org.apache.sis.util.ArraysExt; * @since 0.3 * @module */ +@XmlType(name = "PT_FreeText_PropertyType", namespace = Namespaces.LAN) public final class PT_FreeText extends GO_CharacterString { /** - * A set of {@link LocalisedCharacterString}, representing the {@code } element. + * A set of {@link LocalisedCharacterString}, representing the {@code } element. * The array shall contain one element for each locale. * * @see GEOTK-152 @@ -175,7 +177,7 @@ public final class PT_FreeText extends G if (defaultValue != null && contains(defaultValue)) { /* * If the value is repeated in one of the - * elements, keep only the localized + * elements, keep only the localized * version (because it specifies the locale, while the unlocalized * string saids nothing on that matter). */ Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java?rev=1823777&r1=1823776&r2=1823777&view=diff ============================================================================== --- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java [UTF-8] (original) +++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/TextGroup.java [UTF-8] Sat Feb 10 14:45:49 2018 @@ -24,7 +24,7 @@ import org.apache.sis.xml.Namespaces; /** * A set of strings localized in different languages. This adapter represents the - * {@code } element defined in ISO 19139:2007. + * {@code } element defined in ISO 19139:2007. * See {@link PT_FreeText} class javadoc for an example. * *

If a localized string has a {@code null} locale, then this string will not be @@ -41,30 +41,30 @@ import org.apache.sis.xml.Namespaces; * * {@preformat xml * Apache SIS, projet OpenSource - * - * - * Apache SIS, OpenSource Project - * Apache SIS, progetto OpenSource - * Apache SIS, projet OpenSource - * - * + * + * + * Apache SIS, OpenSource Project + * Apache SIS, progetto OpenSource + * Apache SIS, projet OpenSource + * + * * } * * But the actual official format is: * * {@preformat xml * Apache SIS, projet OpenSource - * - * - * Apache SIS, OpenSource Project - * - * - * Apache SIS, progetto OpenSource - * - * - * Apache SIS, projet OpenSource - * - * + * + * + * Apache SIS, OpenSource Project + * + * + * Apache SIS, progetto OpenSource + * + * + * Apache SIS, projet OpenSource + * + * * } * * @author Cédric Briançon (Geomatys)