sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1517764 - in /sis/branches/JDK7/profiles/sis-french-profile/src: main/java/org/apache/sis/internal/profile/fra/ main/java/org/apache/sis/profile/fra/ main/java/org/apache/sis/profile/france/ test/java/org/apache/sis/internal/ test/java/org...
Date Tue, 27 Aug 2013 08:44:15 GMT
Author: desruisseaux
Date: Tue Aug 27 08:44:14 2013
New Revision: 1517764

URL: http://svn.apache.org/r1517764
Log:
Refactoring the French profile: moved the two remaining public classes out of public API for
now,
because their documentation are insufficient and they were extending internal classes anyway.
We
will provide instead some static methods with the minimal amount of API that we can expose.

Added:
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
      - copied, changed from r1517763, sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_DirectReferenceSystem.java
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
      - copied, changed from r1517543, sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_IndirectReferenceSystem.java
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/
      - copied from r1517763, sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/
    sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/
    sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/
      - copied from r1517543, sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/
    sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
      - copied, changed from r1517543, sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/fra/XMLBindingsTest.java
    sis/branches/JDK7/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/
    sis/branches/JDK7/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/
      - copied from r1517543, sis/branches/JDK7/profiles/sis-french-profile/src/test/resources/org/apache/sis/profile/
Removed:
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/FRA_DirectReferenceSystem.java
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/FRA_IndirectReferenceSystem.java
    sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/XMLBindingsTest.java
    sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/
    sis/branches/JDK7/profiles/sis-french-profile/src/test/resources/org/apache/sis/profile/
Modified:
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ProfileTypes.java
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ReferenceSystemAdapter.java
    sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/package-info.java

Copied: sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
(from r1517763, sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_DirectReferenceSystem.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java?p2=sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java&p1=sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_DirectReferenceSystem.java&r1=1517763&r2=1517764&rev=1517764&view=diff
==============================================================================
--- sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_DirectReferenceSystem.java
[UTF-8] (original)
+++ sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
[UTF-8] Tue Aug 27 08:44:14 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.profile.fra;
+package org.apache.sis.internal.profile.fra;
 
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -46,7 +46,7 @@ import org.apache.sis.internal.jaxb.meta
  */
 @XmlType(name = "FRA_DirectReferenceSystem_Type")
 @XmlRootElement(name= "FRA_DirectReferenceSystem")
-public class FRA_DirectReferenceSystem extends ReferenceSystemMetadata {
+public class DirectReferenceSystem extends ReferenceSystemMetadata {
     /**
      * For serialization purpose.
      */
@@ -55,7 +55,7 @@ public class FRA_DirectReferenceSystem e
     /**
      * Empty constructor for JAXB.
      */
-    private FRA_DirectReferenceSystem() {
+    private DirectReferenceSystem() {
     }
 
     /**
@@ -63,7 +63,7 @@ public class FRA_DirectReferenceSystem e
      *
      * @param crs The reference system to partially copy.
      */
-    public FRA_DirectReferenceSystem(final ReferenceSystem crs) {
+    public DirectReferenceSystem(final ReferenceSystem crs) {
         super(crs);
     }
 
@@ -72,7 +72,7 @@ public class FRA_DirectReferenceSystem e
      *
      * @param identifier The reference system identifier.
      */
-    public FRA_DirectReferenceSystem(final ReferenceIdentifier identifier) {
+    public DirectReferenceSystem(final ReferenceIdentifier identifier) {
         super(identifier);
     }
 
@@ -87,7 +87,7 @@ public class FRA_DirectReferenceSystem e
      * @param code
      *          Identifier code or name, optionally from a controlled list or pattern defined
by a code space.
      */
-    public FRA_DirectReferenceSystem(final Citation authority, final String codespace, final
String code) {
+    public DirectReferenceSystem(final Citation authority, final String codespace, final
String code) {
         super(new ImmutableIdentifier(authority, codespace, code));
     }
 }

Copied: sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
(from r1517543, sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_IndirectReferenceSystem.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java?p2=sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java&p1=sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_IndirectReferenceSystem.java&r1=1517543&r2=1517764&rev=1517764&view=diff
==============================================================================
--- sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/fra/FRA_IndirectReferenceSystem.java
[UTF-8] (original)
+++ sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
[UTF-8] Tue Aug 27 08:44:14 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.profile.fra;
+package org.apache.sis.internal.profile.fra;
 
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -46,7 +46,7 @@ import org.apache.sis.internal.jaxb.meta
  */
 @XmlType(name = "FRA_IndirectReferenceSystem_Type")
 @XmlRootElement(name= "FRA_IndirectReferenceSystem")
-public class FRA_IndirectReferenceSystem extends ReferenceSystemMetadata {
+public class IndirectReferenceSystem extends ReferenceSystemMetadata {
     /**
      * For serialization purpose.
      */
@@ -55,7 +55,7 @@ public class FRA_IndirectReferenceSystem
     /**
      * Empty constructor for JAXB.
      */
-    private FRA_IndirectReferenceSystem() {
+    private IndirectReferenceSystem() {
     }
 
     /**
@@ -63,7 +63,7 @@ public class FRA_IndirectReferenceSystem
      *
      * @param crs The reference system to partially copy.
      */
-    public FRA_IndirectReferenceSystem(final ReferenceSystem crs) {
+    public IndirectReferenceSystem(final ReferenceSystem crs) {
         super(crs);
     }
 
@@ -72,7 +72,7 @@ public class FRA_IndirectReferenceSystem
      *
      * @param identifier The reference system identifier.
      */
-    public FRA_IndirectReferenceSystem(final ReferenceIdentifier identifier) {
+    public IndirectReferenceSystem(final ReferenceIdentifier identifier) {
         super(identifier);
     }
 
@@ -87,7 +87,7 @@ public class FRA_IndirectReferenceSystem
      * @param code
      *          Identifier code or name, optionally from a controlled list or pattern defined
by a code space.
      */
-    public FRA_IndirectReferenceSystem(final Citation authority, final String codespace,
final String code) {
+    public IndirectReferenceSystem(final Citation authority, final String codespace, final
String code) {
         super(new ImmutableIdentifier(authority, codespace, code));
     }
 }

Modified: sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ProfileTypes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ProfileTypes.java?rev=1517764&r1=1517763&r2=1517764&view=diff
==============================================================================
--- sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ProfileTypes.java
[UTF-8] (original)
+++ sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ProfileTypes.java
[UTF-8] Tue Aug 27 08:44:14 2013
@@ -18,8 +18,6 @@ package org.apache.sis.internal.profile.
 
 import java.util.Collection;
 import org.apache.sis.internal.jaxb.TypeRegistration;
-import org.apache.sis.profile.fra.FRA_DirectReferenceSystem;
-import org.apache.sis.profile.fra.FRA_IndirectReferenceSystem;
 
 
 /**
@@ -37,7 +35,7 @@ public final class ProfileTypes extends 
      */
     @Override
     public void getTypes(final Collection<Class<?>> addTo) {
-        addTo.add(FRA_DirectReferenceSystem.class);
-        addTo.add(FRA_IndirectReferenceSystem.class);
+        addTo.add(DirectReferenceSystem.class);
+        addTo.add(IndirectReferenceSystem.class);
     }
 }

Modified: sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ReferenceSystemAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ReferenceSystemAdapter.java?rev=1517764&r1=1517763&r2=1517764&view=diff
==============================================================================
--- sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ReferenceSystemAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/ReferenceSystemAdapter.java
[UTF-8] Tue Aug 27 08:44:14 2013
@@ -20,8 +20,6 @@ import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import org.opengis.referencing.ReferenceSystem;
 import org.apache.sis.internal.jaxb.AdapterReplacement;
-import org.apache.sis.profile.fra.FRA_DirectReferenceSystem;
-import org.apache.sis.profile.fra.FRA_IndirectReferenceSystem;
 import org.apache.sis.internal.jaxb.metadata.RS_ReferenceSystem;
 import org.apache.sis.internal.jaxb.metadata.ReferenceSystemMetadata;
 
@@ -91,7 +89,7 @@ public final class ReferenceSystemAdapte
     public ReferenceSystemMetadata getElement() {
         if (skip()) return null;
         final ReferenceSystem metadata = this.metadata;
-        if (metadata instanceof FRA_DirectReferenceSystem || metadata instanceof FRA_IndirectReferenceSystem)
{
+        if (metadata instanceof DirectReferenceSystem || metadata instanceof IndirectReferenceSystem)
{
             return null;
         }
         return super.getElement();
@@ -106,8 +104,8 @@ public final class ReferenceSystemAdapte
     @Override
     public ReferenceSystemMetadata getDirectReferenceSystem() {
         final ReferenceSystem metadata = this.metadata;
-        if (metadata instanceof FRA_DirectReferenceSystem) {
-            return (FRA_DirectReferenceSystem) metadata;
+        if (metadata instanceof DirectReferenceSystem) {
+            return (DirectReferenceSystem) metadata;
         }
         return null;
     }
@@ -121,8 +119,8 @@ public final class ReferenceSystemAdapte
     @Override
     public ReferenceSystemMetadata getIndirectReferenceSystem() {
         final ReferenceSystem metadata = this.metadata;
-        if (metadata instanceof FRA_IndirectReferenceSystem) {
-            return (FRA_IndirectReferenceSystem) metadata;
+        if (metadata instanceof IndirectReferenceSystem) {
+            return (IndirectReferenceSystem) metadata;
         }
         return null;
     }

Modified: sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/package-info.java?rev=1517764&r1=1517763&r2=1517764&view=diff
==============================================================================
--- sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/profiles/sis-french-profile/src/main/java/org/apache/sis/profile/france/package-info.java
[UTF-8] Tue Aug 27 08:44:14 2013
@@ -26,8 +26,8 @@
  *
  * <table class="sis">
  *   <tr><th>French profile</th> <th>ISO 19115:2013 equivalent</th></tr>
- *   <tr><td>{@code FRA_DataIdentification.relatedCitation}</td> <td>MD_Identification.additionalDocumentation</td></tr>
- *   <tr><td>{@code FRA_Constraints.citation}</td> <td>MD_Constraints.reference</td></tr>
+ *   <tr><td>{@code FRA_DataIdentification.relatedCitation}</td> <td>{@code
MD_Identification.additionalDocumentation}</td></tr>
+ *   <tr><td>{@code FRA_Constraints.citation}</td> <td>{@code MD_Constraints.reference}</td></tr>
  * </table>
  *
  * @author  Cédric Briançon (Geomatys)
@@ -36,12 +36,4 @@
  * @since   0.4
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.FRA)
-@XmlAccessorType(XmlAccessType.NONE)
-package org.apache.sis.profile.fra;
-
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import org.apache.sis.xml.Namespaces;
+package org.apache.sis.profile.france;

Copied: sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
(from r1517543, sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/fra/XMLBindingsTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java?p2=sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java&p1=sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/fra/XMLBindingsTest.java&r1=1517543&r2=1517764&rev=1517764&view=diff
==============================================================================
--- sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/profile/fra/XMLBindingsTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
[UTF-8] Tue Aug 27 08:44:14 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.profile.fra;
+package org.apache.sis.internal.profile.fra;
 
 import java.util.Arrays;
 import java.io.IOException;
@@ -41,7 +41,7 @@ import static org.apache.sis.test.TestUt
  * @since   0.4
  * @module
  */
-public final strictfp class XMLBindingsTest extends TestCase {
+public final strictfp class DirectReferenceSystemTest extends TestCase {
     /**
      * An XML file representing a reference system tree.
      */
@@ -52,7 +52,7 @@ public final strictfp class XMLBindingsT
      */
     private static DefaultMetadata createMetadata() {
         final DefaultMetadata metadata = new DefaultMetadata();
-        final FRA_DirectReferenceSystem refSys = new FRA_DirectReferenceSystem(
+        final DirectReferenceSystem refSys = new DirectReferenceSystem(
                 new DefaultCitation(getSingleton(HardCodedCitations.EPSG.getCitedResponsibleParties())),
null, "4326");
         metadata.setReferenceSystemInfo(Arrays.asList(refSys));
         return metadata;
@@ -68,7 +68,7 @@ public final strictfp class XMLBindingsT
     @Test
     public void marshallingTest() throws IOException, JAXBException {
         final String actual = XML.marshal(createMetadata());
-        assertXmlEquals(XMLBindingsTest.class.getResource(RESOURCE_FILE), actual, "xmlns:*",
"xsi:schemaLocation");
+        assertXmlEquals(DirectReferenceSystemTest.class.getResource(RESOURCE_FILE), actual,
"xmlns:*", "xsi:schemaLocation");
     }
 
     /**
@@ -81,7 +81,7 @@ public final strictfp class XMLBindingsT
     @Test
     public void unmarshallingTest() throws JAXBException, IOException {
         final DefaultMetadata result;
-        try (InputStream in = XMLBindingsTest.class.getResourceAsStream(RESOURCE_FILE)) {
+        try (InputStream in = DirectReferenceSystemTest.class.getResourceAsStream(RESOURCE_FILE))
{
             result = (DefaultMetadata) XML.unmarshal(in);
         }
         final DefaultMetadata expected = createMetadata();



Mime
View raw message