sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1623831 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ core/sis-referencing/src/test/java/org/apache/sis/test/i...
Date Tue, 09 Sep 2014 14:21:12 GMT
Author: desruisseaux
Date: Tue Sep  9 14:21:11 2014
New Revision: 1623831

URL: http://svn.apache.org/r1623831
Log:
Moved ReferenceSystemMetadata (an internal class) to its own package,
in order to prepare for the addition of ServiceParameter in that package too.

Added:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
      - copied, changed from r1623822, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ReferenceSystemMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
      - copied, changed from r1623822, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/package-info.java
Removed:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ReferenceSystemMetadata.java
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
    sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
    sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
    sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/france/FrenchProfileTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java?rev=1623831&r1=1623830&r2=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_ReferenceSystem.java
[UTF-8] Tue Sep  9 14:21:11 2014
@@ -19,6 +19,7 @@ package org.apache.sis.internal.jaxb.met
 import javax.xml.bind.annotation.XmlElementRef;
 import org.opengis.referencing.ReferenceSystem;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata;
 
 
 /**

Copied: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
(from r1623822, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ReferenceSystemMetadata.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java?p2=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java&p1=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ReferenceSystemMetadata.java&r1=1623822&r2=1623831&rev=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ReferenceSystemMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
[UTF-8] Tue Sep  9 14:21:11 2014
@@ -14,11 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb.metadata;
+package org.apache.sis.internal.jaxb.metadata.replace;
 
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.internal.simple.SimpleIdentifiedObject;
@@ -38,7 +37,7 @@ import org.apache.sis.util.ComparisonMod
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
- * @version 0.3
+ * @version 0.5
  * @module
  *
  * @see org.apache.sis.referencing.AbstractReferenceSystem
@@ -82,7 +81,6 @@ public class ReferenceSystemMetadata ext
      */
     @Override
     @XmlElement(name = "referenceSystemIdentifier")
-    @XmlJavaTypeAdapter(RS_Identifier.class)
     public ReferenceIdentifier getName() {
         return super.getName();
     }

Copied: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
(from r1623822, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/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?p2=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java&p1=sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/package-info.java&r1=1623822&r2=1623831&rev=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/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] Tue Sep  9 14:21:11 2014
@@ -16,56 +16,53 @@
  */
 
 /**
- * JAXB adapters for metadata. The class defined in this package are both JAXB adapters
- * replacing GeoAPI interfaces by SIS implementation classes at marshalling time (since
- * JAXB can not marshall directly interfaces), and wrappers around the value to be marshalled.
- * ISO 19139 have the strange habit to wrap every properties in an extra level, for example:
+ * Classes that are normally omitted from public API because they duplicate existing classes,
+ * but still temporarily used at XML (un)marshalling time for standards compliance.
  *
- * {@preformat xml
- *   <CI_ResponsibleParty>
- *     <contactInfo>
- *       <CI_Contact>
- *         ...
- *       </CI_Contact>
- *     </contactInfo>
- *   </CI_ResponsibleParty>
- * }
+ * <p>Some objects defined in various standards have overlapping functionalities. For
example the
+ * Metadata (ISO 19115), Referencing by Coordinates (ISO 19111) and Web Processing Service
(WPS)
+ * all define their own parameter objects. An other example is ISO 19115 defining basic referencing
+ * information, which is clearly ISO 19111 subject. GeoAPI tries to provide a uniform API
by merging
+ * objects, or by omitting an object from one standard in favor of the equivalent object
of another
+ * standard. However at XML (un)marshalling time, we still need to temporarily recreate the
omitted
+ * object as defined in the original standard. This package is used for such replacement.</p>
  *
- * The {@code </CI_Contact>} level is not really necessary, and JAXB is not designed
for inserting
- * such level since it is not the usual way to write XML. In order to get this output with
JAXB, we
- * have to wrap metadata object in an additional object. Those additional objects are defined
in
- * this package.
- *
- * <p>So each class in this package is both a JAXB adapter and a wrapper. We have merged
those
- * functionalities in order to avoid doubling the amount of classes, which is already large.</p>
- *
- * <p>In ISO 19139 terminology:</p>
- * <ul>
- *   <li>the public classes defined in the {@code org.apache.sis.metadata.iso} packages
are defined
- *       as {@code Foo_Type} in ISO 19139, where <var>Foo</var> is the ISO name
of a class.</li>
- *   <li>the internal classes defined in this package are defined as {@code Foo_PropertyType}
in
- *       ISO 19139 schemas.</li>
- * </ul>
- *
- * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @since   0.3 (derived from geotk-2.5)
- * @version 0.3
+ * @author  Rémi Maréchal (Geomatys)
+ * @since   0.5
+ * @version 0.5
  * @module
- *
- * @see javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
  */
 @XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMD, xmlns =
{
     @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+    @XmlNs(prefix = "srv", namespaceURI = Namespaces.SRV),
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
     @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI)
 })
 @XmlAccessorType(XmlAccessType.NONE)
-package org.apache.sis.internal.jaxb.metadata;
+@XmlJavaTypeAdapters({
+    @XmlJavaTypeAdapter(RS_Identifier.class),
+    @XmlJavaTypeAdapter(SV_ParameterDirection.class),
+
+    // Java types, primitive types and basic OGC types handling
+    @XmlJavaTypeAdapter(StringAdapter.class),
+    @XmlJavaTypeAdapter(InternationalStringAdapter.class),
+    @XmlJavaTypeAdapter(GO_GenericName.class),
+    @XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class)
+})
+package org.apache.sis.internal.jaxb.metadata.replace;
 
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlAccessType;
 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_Boolean;
+import org.apache.sis.internal.jaxb.gco.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;
+import org.apache.sis.internal.jaxb.code.SV_ParameterDirection;
 import org.apache.sis.xml.Namespaces;

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java?rev=1623831&r1=1623830&r2=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
[UTF-8] Tue Sep  9 14:21:11 2014
@@ -45,7 +45,7 @@ import org.apache.sis.referencing.datum.
 import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
 import org.apache.sis.referencing.cs.DefaultVerticalCS;
 import org.apache.sis.referencing.crs.DefaultVerticalCRS;
-import org.apache.sis.internal.jaxb.metadata.ReferenceSystemMetadata;
+import org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata;
 import org.apache.sis.internal.jaxb.gmx.Anchor;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.util.iso.SimpleInternationalString;

Modified: sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java?rev=1623831&r1=1623830&r2=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
[UTF-8] (original)
+++ sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
[UTF-8] Tue Sep  9 14:21:11 2014
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.referencing.ReferenceIdentifier;
-import org.apache.sis.internal.jaxb.metadata.ReferenceSystemMetadata;
+import org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata;
 
 
 /**

Modified: sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java?rev=1623831&r1=1623830&r2=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
[UTF-8] (original)
+++ sis/branches/JDK8/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
[UTF-8] Tue Sep  9 14:21:11 2014
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.referencing.ReferenceIdentifier;
-import org.apache.sis.internal.jaxb.metadata.ReferenceSystemMetadata;
+import org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata;
 
 
 /**

Modified: sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/france/FrenchProfileTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/france/FrenchProfileTest.java?rev=1623831&r1=1623830&r2=1623831&view=diff
==============================================================================
--- sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/france/FrenchProfileTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/france/FrenchProfileTest.java
[UTF-8] Tue Sep  9 14:21:11 2014
@@ -23,7 +23,7 @@ import org.opengis.metadata.constraint.S
 import org.apache.sis.metadata.iso.constraint.DefaultConstraints;
 import org.apache.sis.metadata.iso.constraint.DefaultLegalConstraints;
 import org.apache.sis.metadata.iso.constraint.DefaultSecurityConstraints;
-import org.apache.sis.internal.jaxb.metadata.ReferenceSystemMetadata;
+import org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata;
 import org.apache.sis.internal.profile.fra.IndirectReferenceSystem;
 import org.apache.sis.internal.profile.fra.DirectReferenceSystem;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;



Mime
View raw message