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.
}
/*
- * <gmd:someElement xsi:type="gmd:PT_FreeText_PropertyType">
+ * <mdb:someElement xsi:type="lan:PT_FreeText_PropertyType">
* <gco:CharacterString>...</gco:CharacterString>
- * <gmd:PT_FreeText>
+ * <lan:PT_FreeText>
* ... see PT_FreeText ...
- * </gmd:PT_FreeText>
- * </gmd:someElement>
+ * </lan:PT_FreeText>
+ * </mdb:someElement>
*/
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:
*
* ┌──────────────────────────────────────────────────┬────────────────────────────────┐
- * │ <gmd:someElement> │ <gmd:someElement>
│
+ * │ <mdb:someElement> │ <mdb:someElement>
│
* │ <gco:CharacterString>...</gco:CharacterString> │ <gmx:Anchor>...</gmx:Anchor>
│
- * │ </gmd:someElement> │ </gmd:someElement>
│
+ * │ </mdb:someElement> │ </mdb:someElement>
│
* └──────────────────────────────────────────────────┴────────────────────────────────┘
*/
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
- * <gmd:title xsi:type="gmd:PT_FreeText_PropertyType">
+ * <cit:title xsi:type="lan:PT_FreeText_PropertyType">
* <gco:CharacterString>Some title in english is present in this node</gco:CharacterString>
- * <gmd:PT_FreeText>
- * <gmd:textGroup>
- * <gmd:LocalisedCharacterString locale="#locale-fra">Un titre en français</gmd:LocalisedCharacterString>
- * </gmd:textGroup>
- * </gmd:PT_FreeText>
- * </gmd:title>
+ * <lan:PT_FreeText>
+ * <lan:textGroup>
+ * <lan:LocalisedCharacterString locale="#locale-fra">Un titre en français</lan:LocalisedCharacterString>
+ * </lan:textGroup>
+ * </lan:PT_FreeText>
+ * </cit:title>
* }
*
- * If there is more than one locale, the whole {@code <gmd:textGroup>} block is repeated
for each
- * locale, instead than repeating {@code <gmd:LocalisedCharacterString>} inside the
same group as
+ * If there is more than one locale, the whole {@code <lan:textGroup>} block is repeated
for each
+ * locale, instead than repeating {@code <lan:LocalisedCharacterString>} 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 <gmd:textGroup>}
element.
+ * A set of {@link LocalisedCharacterString}, representing the {@code <lan:textGroup>}
element.
* The array shall contain one element for each locale.
*
* @see <a href="http://jira.geotoolkit.org/browse/GEOTK-152">GEOTK-152</a>
@@ -175,7 +177,7 @@ public final class PT_FreeText extends G
if (defaultValue != null && contains(defaultValue)) {
/*
* If the <gco:CharacterString> value is repeated in one of the
- * <gmd:LocalisedCharacterString> elements, keep only the localized
+ * <lan:LocalisedCharacterString> 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 <gmd:textGroup>} element defined in ISO 19139:2007.
+ * {@code <lan:textGroup>} element defined in ISO 19139:2007.
* See {@link PT_FreeText} class javadoc for an example.
*
* <p>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
* <gco:CharacterString>Apache SIS, projet OpenSource</gco:CharacterString>
- * <gmd:PT_FreeText>
- * <gmd:textGroup>
- * <gmd:LocalisedCharacterString locale="#locale-eng">Apache SIS, OpenSource
Project</gmd:LocalisedCharacterString>
- * <gmd:LocalisedCharacterString locale="#locale-ita">Apache SIS, progetto OpenSource</gmd:LocalisedCharacterString>
- * <gmd:LocalisedCharacterString locale="#locale-fra">Apache SIS, projet OpenSource</gmd:LocalisedCharacterString>
- * </gmd:textGroup>
- * </gmd:PT_FreeText>
+ * <lan:PT_FreeText>
+ * <lan:textGroup>
+ * <lan:LocalisedCharacterString locale="#locale-eng">Apache SIS, OpenSource
Project</lan:LocalisedCharacterString>
+ * <lan:LocalisedCharacterString locale="#locale-ita">Apache SIS, progetto OpenSource</lan:LocalisedCharacterString>
+ * <lan:LocalisedCharacterString locale="#locale-fra">Apache SIS, projet OpenSource</lan:LocalisedCharacterString>
+ * </lan:textGroup>
+ * </lan:PT_FreeText>
* }
*
* But the actual official format is:
*
* {@preformat xml
* <gco:CharacterString>Apache SIS, projet OpenSource</gco:CharacterString>
- * <gmd:PT_FreeText>
- * <gmd:textGroup>
- * <gmd:LocalisedCharacterString locale="#locale-eng">Apache SIS, OpenSource
Project</gmd:LocalisedCharacterString>
- * </gmd:textGroup>
- * <gmd:textGroup>
- * <gmd:LocalisedCharacterString locale="#locale-ita">Apache SIS, progetto OpenSource</gmd:LocalisedCharacterString>
- * </gmd:textGroup>
- * <gmd:textGroup>
- * <gmd:LocalisedCharacterString locale="#locale-fra">Apache SIS, projet OpenSource</gmd:LocalisedCharacterString>
- * </gmd:textGroup>
- * </gmd:PT_FreeText>
+ * <lan:PT_FreeText>
+ * <lan:textGroup>
+ * <lan:LocalisedCharacterString locale="#locale-eng">Apache SIS, OpenSource
Project</lan:LocalisedCharacterString>
+ * </lan:textGroup>
+ * <lan:textGroup>
+ * <lan:LocalisedCharacterString locale="#locale-ita">Apache SIS, progetto OpenSource</lan:LocalisedCharacterString>
+ * </lan:textGroup>
+ * <lan:textGroup>
+ * <lan:LocalisedCharacterString locale="#locale-fra">Apache SIS, projet OpenSource</lan:LocalisedCharacterString>
+ * </lan:textGroup>
+ * </lan:PT_FreeText>
* }
*
* @author Cédric Briançon (Geomatys)
|