sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1635189 - in /sis/branches/JDK8/core/sis-metadata/src: main/java/org/apache/sis/metadata/iso/ main/java/org/apache/sis/metadata/iso/acquisition/ main/java/org/apache/sis/metadata/iso/citation/ main/java/org/apache/sis/metadata/iso/identifi...
Date Wed, 29 Oct 2014 16:11:35 GMT
Author: desruisseaux
Date: Wed Oct 29 16:11:34 2014
New Revision: 1635189

URL: http://svn.apache.org/r1635189
Log:
Added a test and minor cleaning.

Added:
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
  (with props)
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/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-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/package-info.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -100,7 +100,6 @@
 @XmlJavaTypeAdapters({
     @XmlJavaTypeAdapter(CI_Citation.class),
     @XmlJavaTypeAdapter(CI_Responsibility.class),
-    @XmlJavaTypeAdapter(CI_ResponsibleParty.class),
     @XmlJavaTypeAdapter(EX_Extent.class),
     @XmlJavaTypeAdapter(GM_Object.class),
     @XmlJavaTypeAdapter(MD_Identifier.class),

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -106,7 +106,6 @@
     @XmlJavaTypeAdapter(CI_Party.class),
     @XmlJavaTypeAdapter(CI_PresentationFormCode.class),
     @XmlJavaTypeAdapter(CI_Responsibility.class),
-    @XmlJavaTypeAdapter(CI_ResponsibleParty.class),
     @XmlJavaTypeAdapter(CI_RoleCode.class),
     @XmlJavaTypeAdapter(CI_Series.class),
     @XmlJavaTypeAdapter(CI_Telephone.class),

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=1635189&r1=1635188&r2=1635189&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] Wed Oct 29 16:11:34 2014
@@ -110,7 +110,6 @@
     @XmlJavaTypeAdapter(CI_Citation.class),
     @XmlJavaTypeAdapter(CI_OnlineResource.class),
     @XmlJavaTypeAdapter(CI_Responsibility.class),
-    @XmlJavaTypeAdapter(CI_ResponsibleParty.class),
     @XmlJavaTypeAdapter(DCPList.class),
     @XmlJavaTypeAdapter(DS_AssociationTypeCode.class),
     @XmlJavaTypeAdapter(DS_InitiativeTypeCode.class),

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -98,7 +98,6 @@
     @XmlJavaTypeAdapter(CI_Citation.class),
     @XmlJavaTypeAdapter(CI_OnlineResource.class),
     @XmlJavaTypeAdapter(CI_Responsibility.class),
-    @XmlJavaTypeAdapter(CI_ResponsibleParty.class),
     @XmlJavaTypeAdapter(DQ_DataQuality.class),
     @XmlJavaTypeAdapter(MD_ApplicationSchemaInformation.class),
     @XmlJavaTypeAdapter(MD_CharacterSetCode.class),

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -36,7 +36,7 @@ import static org.apache.sis.metadata.Ke
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.04)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @DependsOn(PropertyAccessorTest.class)

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -48,7 +48,7 @@ import static org.apache.sis.test.TestUt
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @DependsOn(PropertyAccessorTest.class)

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -36,7 +36,7 @@ import static org.apache.sis.test.TestUt
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @DependsOn(TreeNodeTest.class)

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -48,7 +48,7 @@ import static java.util.AbstractMap.Simp
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @DependsOn(PropertyAccessorTest.class)

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -47,7 +47,7 @@ import static org.apache.sis.test.TestUt
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
- * @version 0.4
+ * @version 0.5
  * @module
  *
  * @see MetadataStandardTest#testValueMap()

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -134,7 +134,8 @@ public final strictfp class APIVerifier 
                     assertFalse("Expected no @UML annotation", method.isAnnotationPresent(UML.class));
                 }
             }
-            assertTrue(classChanges.isEmpty());
+            // May still be non-empty if some methods were defined in parent classes.
+            classChanges.clear();
         }
     }
 

Added: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java?rev=1635189&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
(added)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.metadata.iso.citation;
+
+import javax.xml.bind.JAXBException;
+import org.opengis.metadata.citation.Role;
+import org.apache.sis.test.XMLTestCase;
+import org.apache.sis.xml.Namespaces;
+import org.junit.Test;
+
+import static java.util.Collections.singleton;
+import static org.apache.sis.test.Assert.*;
+
+
+/**
+ * Tests {@link DefaultResponsibility} and its marshalling as a legacy {@link DefaultResponsibleParty}.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.5
+ * @version 0.5
+ * @module
+ */
+public final strictfp class DefaultResponsibilityTest extends XMLTestCase {
+    /**
+     * Tests marshalling with replacement of {@link DefaultResponsibility} by {@link DefaultResponsibleParty}.
+     *
+     * @throws JAXBException if an error occurred during the marshalling.
+     */
+    @Test
+    public void testLegacyMarshalling() throws JAXBException {
+        final DefaultIndividual  party = new DefaultIndividual("An author", null, null);
+        final DefaultResponsibility  r = new DefaultResponsibility(Role.AUTHOR, null, party);
+        final DefaultCitation citation = new DefaultCitation();
+        citation.setCitedResponsibleParties(singleton(r));
+        final String xml = marshal(citation);
+        assertXmlEquals("<gmd:CI_Citation xmlns:gco=\"" + Namespaces.GCO + '"' +
+                                        " xmlns:gmd=\"" + Namespaces.GMD + "\">\n" +
+                "  <gmd:citedResponsibleParty>\n" +
+                "    <gmd:CI_ResponsibleParty>\n" +
+                "      <gmd:individualName>\n" +
+                "        <gco:CharacterString>An author</gco:CharacterString>\n"
+
+                "      </gmd:individualName>\n" +
+                "      <gmd:role>\n" +
+                "        <gmd:CI_RoleCode codeList=\"http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_RoleCode\"
codeListValue=\"author\" codeSpace=\"eng\">Author</gmd:CI_RoleCode>\n" +
+                "      </gmd:role>\n" +
+                "    </gmd:CI_ResponsibleParty>\n" +
+                "  </gmd:citedResponsibleParty>\n" +
+                "</gmd:CI_Citation>\n", xml, "xmlns:*");
+    }
+}

Propchange: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java?rev=1635189&r1=1635188&r2=1635189&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
[UTF-8] Wed Oct 29 16:11:34 2014
@@ -61,6 +61,7 @@ import org.junit.BeforeClass;
 
     // ISO implementations.
     org.apache.sis.metadata.iso.citation.DefaultContactTest.class,
+    org.apache.sis.metadata.iso.citation.DefaultResponsibilityTest.class,
     org.apache.sis.metadata.iso.citation.DefaultCitationDateTest.class,
     org.apache.sis.metadata.iso.citation.DefaultCitationTest.class,
     org.apache.sis.metadata.iso.maintenance.DefaultScopeDescriptionTest.class,



Mime
View raw message