sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1810208 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/ sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ sis-metadata/src/main/java/org/apache/sis/metadata/iso...
Date Sat, 30 Sep 2017 14:25:51 GMT
Author: desruisseaux
Date: Sat Sep 30 14:25:50 2017
New Revision: 1810208

URL: http://svn.apache.org/viewvc?rev=1810208&view=rev
Log:
Move JAXB adapters for GenericName in a separated package.
This is a step toward moving most of XML support in sis-metadata module.

Added:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_GenericName.java
      - copied, changed from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_LocalName.java
      - copied, changed from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_LocalName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameAdapter.java
      - copied, changed from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameAdapter.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameValue.java
      - copied, changed from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/package-info.java
      - copied, changed from r1809812, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java
Removed:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_LocalName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameAdapter.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/package-info.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/direct/GO_ScopedName.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -19,7 +19,7 @@ package org.apache.sis.internal.jaxb.met
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
-import org.apache.sis.internal.jaxb.gml.CodeType;
+import org.apache.sis.internal.jaxb.name.NameValue;
 
 
 /**
@@ -29,12 +29,12 @@ import org.apache.sis.internal.jaxb.gml.
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.5
  *
- * @see org.apache.sis.internal.jaxb.gco.GO_GenericName
+ * @see org.apache.sis.internal.jaxb.name.GO_GenericName
  *
  * @since 0.5
  * @module
  */
-public final class GO_ScopedName extends XmlAdapter<CodeType.ScopedName, ScopedName>
{
+public final class GO_ScopedName extends XmlAdapter<NameValue.Scoped, ScopedName> {
     /**
      * Converts a GeoAPI interface to the SIS implementation for XML marshalling.
      *
@@ -42,9 +42,9 @@ public final class GO_ScopedName extends
      * @return the adapter for the given value, here the SIS implementation.
      */
     @Override
-    public CodeType.ScopedName marshal(final ScopedName name) {
+    public NameValue.Scoped marshal(final ScopedName name) {
         if (name != null) {
-            final CodeType.ScopedName code = new CodeType.ScopedName();
+            final NameValue.Scoped code = new NameValue.Scoped();
             code.setName(name);
             return code;
         }
@@ -58,7 +58,7 @@ public final class GO_ScopedName extends
      * @return the value to marshal (which is the same).
      */
     @Override
-    public ScopedName unmarshal(final CodeType.ScopedName code) {
+    public ScopedName unmarshal(final NameValue.Scoped code) {
         if (code != null) {
             final GenericName parsed = code.getName();
             if (parsed instanceof ScopedName) {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -60,7 +60,7 @@ import javax.xml.bind.annotation.XmlAcce
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.internal.jaxb.gco.GO_Boolean;
-import org.apache.sis.internal.jaxb.gco.GO_GenericName;
+import org.apache.sis.internal.jaxb.name.GO_GenericName;
 import org.apache.sis.internal.jaxb.gco.StringAdapter;
 import org.apache.sis.internal.jaxb.gco.InternationalStringAdapter;
 import org.apache.sis.internal.jaxb.metadata.RS_Identifier;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -127,3 +127,4 @@ import org.apache.sis.internal.jaxb.gco.
 import org.apache.sis.internal.jaxb.gmd.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;
+import org.apache.sis.internal.jaxb.name.GO_GenericName;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -113,3 +113,4 @@ import org.apache.sis.internal.jaxb.Sche
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;
+import org.apache.sis.internal.jaxb.name.GO_LocalName;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -162,3 +162,4 @@ import org.apache.sis.internal.jaxb.gco.
 import org.apache.sis.internal.jaxb.gmd.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;
+import org.apache.sis.internal.jaxb.name.GO_GenericName;

Copied: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_GenericName.java
(from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_GenericName.java?p2=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_GenericName.java&p1=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java&r1=1810207&r2=1810208&rev=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_GenericName.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb.gco;
+package org.apache.sis.internal.jaxb.name;
 
 import org.opengis.util.GenericName;
 

Copied: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_LocalName.java
(from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_LocalName.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_LocalName.java?p2=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_LocalName.java&p1=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_LocalName.java&r1=1810207&r2=1810208&rev=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_LocalName.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/GO_LocalName.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb.gco;
+package org.apache.sis.internal.jaxb.name;
 
 import org.opengis.util.LocalName;
 

Copied: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameAdapter.java
(from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameAdapter.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameAdapter.java?p2=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameAdapter.java&p1=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameAdapter.java&r1=1810207&r2=1810208&rev=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/NameAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameAdapter.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb.gco;
+package org.apache.sis.internal.jaxb.name;
 
 import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
@@ -23,7 +23,6 @@ import org.opengis.util.LocalName;
 import org.opengis.util.ScopedName;
 import org.opengis.util.MemberName;
 import org.opengis.util.GenericName;
-import org.apache.sis.internal.jaxb.gml.CodeType;
 import org.apache.sis.util.iso.DefaultLocalName;
 import org.apache.sis.util.iso.DefaultTypeName;
 import org.apache.sis.util.iso.DefaultMemberName;
@@ -76,22 +75,27 @@ abstract class NameAdapter<ValueType ext
 
     /**
      * Returns the {@code LocalName} or {@code ScopedName} to marshall. Returns {@code null} if
the name
-     * is a {@link TypeName} or a {@link MemberName}, in order to use {@link #getNameType()}
instead.
+     * is a {@link TypeName} or a {@link MemberName}, in order to use {@link #getName()}
instead.
+     * Example:
+     *
+     * {@preformat xml
+     *   <gco:LocalName codeSpace=\"A code space\">A name in a scope</gco:LocalName>
+     * }
      *
      * @return the code for the current name, or {@code null} if none.
      */
     @XmlElementRef
-    public final CodeType getCodeType() {
+    public final NameValue getValue() {
         final GenericName name = this.name;
-        final CodeType code;
+        final NameValue code;
         if (name instanceof LocalName) {
             if (name instanceof TypeName || name instanceof MemberName) {
                 return null;
             } else {
-                code = new CodeType.LocalName();
+                code = new NameValue.Local();
             }
         } else if (name instanceof ScopedName) {
-            code = new CodeType.ScopedName();
+            code = new NameValue.Scoped();
         } else {
             return null;
         }
@@ -106,7 +110,7 @@ abstract class NameAdapter<ValueType ext
      * @param  code  the new name.
      * @throws IllegalStateException if a name is already defined.
      */
-    public final void setCodeType(final CodeType code) throws IllegalStateException {
+    public final void setValue(final NameValue code) throws IllegalStateException {
         ensureUndefined();
         if (code != null) {
             name = code.getName();
@@ -115,12 +119,21 @@ abstract class NameAdapter<ValueType ext
 
     /**
      * Returns the {@code TypeName} or {@code MemberName} to marshall. Returns {@code null}
if the name
-     * is a {@link LocalName} or {@link ScopedName}, in order to use {@link #getCodeType()}
instead.
+     * is a {@link LocalName} or {@link ScopedName}, in order to use {@link #getValue()}
instead.
+     * Example:
+     *
+     * {@preformat xml
+     *   <gco:TypeName>
+     *     <gco:aName>
+     *       <gco:CharacterString>An other local name</gco:CharacterString>
+     *     </gco:aName>
+     *   </gco:TypeName>
+     * }
      *
      * @return the current name, or {@code null} if none.
      */
     @XmlElementRef
-    public final DefaultLocalName getNameType() {
+    public final DefaultLocalName getName() {
         final GenericName name = this.name;
         if (name instanceof TypeName) {
             return DefaultTypeName.castOrCopy((TypeName) name);
@@ -138,7 +151,7 @@ abstract class NameAdapter<ValueType ext
      * @param  value  the new name.
      * @throws IllegalStateException if a name is already defined.
      */
-    public final void setNameType(final DefaultLocalName value) throws IllegalStateException
{
+    public final void setName(final DefaultLocalName value) throws IllegalStateException
{
         ensureUndefined();
         name = value;
     }

Copied: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameValue.java
(from r1810207, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameValue.java?p2=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameValue.java&p1=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java&r1=1810207&r2=1810208&rev=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/NameValue.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb.gml;
+package org.apache.sis.internal.jaxb.name;
 
 import javax.xml.bind.annotation.XmlValue;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -41,15 +41,15 @@ import org.apache.sis.xml.Namespaces;
  *   </complexType>
  * }
  *
- * {@code CodeType}s are used for:
+ * {@code NameValue}s are used for:
  *
  * <ul>
- *   <li>{@code GenericName}</li>
- *   <li>{@link LocalName}</li>
- *   <li>{@link ScopedName}</li>
+ *   <li>{@code org.opengis.util.GenericName}</li>
+ *   <li>{@link org.opengis.util.LocalName}</li>
+ *   <li>{@link org.opengis.util.ScopedName}</li>
  * </ul>
  *
- * {@code CodeType}s are not used for {@code MemberName} and {@code TypeName}.
+ * {@code NameValue}s are not used for {@code MemberName} and {@code TypeName}.
  * The two later use a quite different XML structure, with an {@code aName} element instead
than a XML value.
  *
  * @author  Martin Desruisseaux (Geomatys)
@@ -58,10 +58,10 @@ import org.apache.sis.xml.Namespaces;
  * @module
  */
 @XmlSeeAlso({
-    CodeType.LocalName.class,
-    CodeType.ScopedName.class
+    NameValue.Local.class,
+    NameValue.Scoped.class
 })
-public class CodeType {
+public class NameValue {
     /**
      * The term.
      */
@@ -73,13 +73,13 @@ public class CodeType {
      * or {@code null} if none.
      */
     @XmlAttribute
-    @XmlSchemaType(name = "anyURI")
+    @XmlSchemaType(name = "anyURI", namespace = Namespaces.GML)
     String codeSpace;
 
     /**
      * Invoked by reflection by JAXB on unmarshalling.
      */
-    public CodeType() {
+    public NameValue() {
     }
 
     /**
@@ -105,19 +105,19 @@ public class CodeType {
     }
 
     /**
-     * The {@code CodeType} as a {@code gco:LocalName}.
+     * The {@code NameValue} as a {@code gco:LocalName}.
      */
-    @XmlRootElement(name = "LocalName", namespace = Namespaces.GCO)
-    public static final class LocalName extends CodeType {
+    @XmlRootElement(name = "LocalName")
+    public static final class Local extends NameValue {
         @Override public GenericName getName() {
             return Names.createLocalName(codeSpace, null, value);
         }
     }
 
     /**
-     * The {@code CodeType} as a {@code gco:ScopedName}.
+     * The {@code NameValue} as a {@code gco:ScopedName}.
      */
-    @XmlRootElement(name = "ScopedName", namespace = Namespaces.GCO)
-    public static final class ScopedName extends CodeType {
+    @XmlRootElement(name = "ScopedName")
+    public static final class Scoped extends NameValue {
     }
 }

Copied: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/package-info.java
(from r1809812, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/package-info.java?p2=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/package-info.java&p1=sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java&r1=1809812&r2=1810208&rev=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/name/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -16,84 +16,31 @@
  */
 
 /**
- * Miscellaneous objects and adapters defined in the {@code "gco"} namespace.
+ * Adapters for (un)marshalling ISO 19103 generic names.
  * For example, a {@link java.lang.String} value has to be marshalled this way:
- *
- * {@preformat text
- *     <gco:CharacterString>my text</gco:CharacterString>
- * }
- *
- * In the above example, {@code gco} is the prefix for the {@code http://www.isotc211.org/2005/gco}
- * namespace URL.
- *
- * <p>This package includes:</p>
- *
- * <ul class="verbose">
- *   <li><b>JAXB adapters for primitive types.</b><br>
- *   JAXB can write directly Java primitive type at marshalling time "as is". However ISO-19139
- *   requires those values to be surrounded by elements representing the data type. The role
of
- *   these adapters is to add these elements around the value.</li>
- *
- *   <li><b>JAXB adapters for <cite>unit of measure</cite></b>
as specified in the ISO-19103 specifications.<br>
- *   For example, a measure marshalled with JAXB will be formatted like {@code <gco:Measure
uom="m">220.0</gco:Measure>}.</li>
- *
- *   <li>JAXB adapters for date and time.</li>
- * </ul>
- *
- * Classes prefixed by two letters, like {@code "GO_Decimal"}, are also wrappers around the
actual
+ * Classes prefixed by two letters, like {@code "GO_GenericName"}, are also wrappers around
the actual
  * object to be marshalled. See the {@link org.apache.sis.internal.jaxb.metadata} package
for more
  * explanation about wrappers. Note that the two-letters prefixes used in this package (not
to be
  * confused with the three-letters prefixes used in XML documents) are not defined by OGC/ISO
  * specifications; they are used only for consistency with current practice in
  * {@link org.apache.sis.internal.jaxb.metadata} and similar packages.
  *
- * <div class="section">Object identification and reference</div>
- * <ul class="verbose">
- *   <li><code>org.apache.sis.<b>metadata.iso</b></code> public
packages:
- *   <ul>
- *     <li>Implement the ISO 19139 {@code Foo_Type}, where <var>Foo</var>
is the ISO name of a class.</li>
- *     <li>Contains the {@code gco:ObjectIdentification} group of attributes ({@code
id}, {@code uuid}).</li>
- *     <li>Conceptually could have been subclasses of {@code ObjectIdentification}
defined in this package.</li>
- *   </ul></li>
- *   <li><code>org.apache.sis.<b>internal.jaxb</b></code> private
packages:
- *   <ul>
- *     <li>Implement the ISO 19139 {@code Foo_PropertyType} as subclasses of the {@link
org.apache.sis.internal.jaxb.gco.PropertyType} class.</li>
- *     <li>Contains the {@code gco:ObjectReference} group of attributes ({@code xlink},
{@code uuidref}).</li>
- *     <li>Attributes are declared in the {@link org.apache.sis.internal.jaxb.gco.ObjectReference}
Java class.</li>
- *    </ul></li>
- * </ul>
- *
- * <p>Those two kinds of types are marshalled as below:</p>
- *
- * {@preformat xml
- *   <MD_MetaData>
- *     <property uuidref="…">
- *       <Foo_Type uuid="…">
- *         ...
- *       </Foo_Type>
- *     </property>
- *   </MD_MetaData>
- * }
- *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.7
- *
- * @see javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
- *
- * @since 0.3
+ * @version 0.8
+ * @since   0.3
  * @module
  */
 @XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GCO, xmlns =
{
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
-    @XmlNs(prefix = "gmx", namespaceURI = Namespaces.GMX)
+    @XmlNs(prefix = "gml", namespaceURI = Namespaces.GML)
 })
 @XmlAccessorType(XmlAccessType.NONE)
 /*
  * Do NOT define a package-level adapter for InternationalString,
  * because such adapter shall NOT apply to GO_CharacterString.getAnchor().
  */
-package org.apache.sis.internal.jaxb.gco;
+package org.apache.sis.internal.jaxb.name;
 
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -94,7 +94,7 @@ public class DefaultLocalName extends Ab
      * The {@link XmlElement} annotation applied here is appropriate for subclasses only
({@link DefaultTypeName}
      * and {@link DefaultMemberName}). It is <strong>not</strong> appropriate
when (un)marshalling directly this
      * {@code DefaultLocalName} class. In this later case, we will rather rely on the {@link
String} conversion
-     * performed by {@link org.apache.sis.internal.jaxb.gco.GO_GenericName}.
+     * performed by {@link org.apache.sis.internal.jaxb.name.GO_GenericName}.
      */
     @XmlJavaTypeAdapter(CharSequenceAdapter.class)
     @XmlElement(name = "aName", namespace = Namespaces.GCO)

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -128,4 +128,4 @@ import javax.xml.bind.annotation.XmlAcce
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.gco.GO_GenericName;
+import org.apache.sis.internal.jaxb.name.GO_GenericName;

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -29,7 +29,7 @@ import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.internal.util.CollectionsExt;
-import org.apache.sis.internal.jaxb.gco.GO_GenericName;
+import org.apache.sis.internal.jaxb.name.GO_GenericName;
 
 
 /**

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/package-info.java?rev=1810208&r1=1810207&r2=1810208&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/package-info.java
[UTF-8] Sat Sep 30 14:25:50 2017
@@ -49,5 +49,5 @@ import javax.xml.bind.annotation.XmlAcce
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
-import org.apache.sis.internal.jaxb.gco.GO_GenericName;
+import org.apache.sis.internal.jaxb.name.GO_GenericName;
 import org.apache.sis.xml.Namespaces;



Mime
View raw message