sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1497598 - in /sis/branches/JDK7/core: sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/ sis-metadata/src/test/java/org/apache/sis/xml/ sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/
Date Thu, 27 Jun 2013 22:41:38 GMT
Author: desruisseaux
Date: Thu Jun 27 22:41:38 2013
New Revision: 1497598

URL: http://svn.apache.org/r1497598
Log:
Trivial reformating (indentation). No significant code change.

Modified:
    sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
    sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java
    sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageMarshallingTest.java

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java?rev=1497598&r1=1497597&r2=1497598&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
[UTF-8] Thu Jun 27 22:41:38 2013
@@ -66,9 +66,11 @@ public final strictfp class TimePeriodTe
      * The (un)marshallers locale and timezone will be set to fixed values.
      *
      * @throws JAXBException If an error occurred while creating the pool.
+     *
+     * @see #disposeMarshallerPool()
      */
     @BeforeClass
-    public static void createMarshallers() throws JAXBException {
+    public static void createMarshallerPool() throws JAXBException {
         final Map<String,Object> properties = new HashMap<>(4);
         assertNull(properties.put(XML.LOCALE, Locale.FRANCE));
         assertNull(properties.put(XML.TIMEZONE, "CET"));
@@ -133,18 +135,18 @@ public final strictfp class TimePeriodTe
         final TimePeriodBound end   = new TimePeriodBound.GML2(new DummyInstant(date("2007-12-31
00:00:00")));
         clearContext();
         testPeriod(begin, end,
-            "<gml:TimePeriod>\n" +
-            "  <gml:begin>\n" +
-            "    <gml:TimeInstant>\n" +
-            "      <gml:timePosition>1992-01-01T01:00:00+01:00</gml:timePosition>\n"
+
-            "    </gml:TimeInstant>\n" +
-            "  </gml:begin>\n" +
-            "  <gml:end>\n" +
-            "    <gml:TimeInstant>\n" +
-            "      <gml:timePosition>2007-12-31T01:00:00+01:00</gml:timePosition>\n"
+
-            "    </gml:TimeInstant>\n" +
-            "  </gml:end>\n" +
-            "</gml:TimePeriod>\n", true);
+                "<gml:TimePeriod>\n" +
+                "  <gml:begin>\n" +
+                "    <gml:TimeInstant>\n" +
+                "      <gml:timePosition>1992-01-01T01:00:00+01:00</gml:timePosition>\n"
+
+                "    </gml:TimeInstant>\n" +
+                "  </gml:begin>\n" +
+                "  <gml:end>\n" +
+                "    <gml:TimeInstant>\n" +
+                "      <gml:timePosition>2007-12-31T01:00:00+01:00</gml:timePosition>\n"
+
+                "    </gml:TimeInstant>\n" +
+                "  </gml:end>\n" +
+                "</gml:TimePeriod>\n", true);
     }
 
     /**
@@ -186,10 +188,10 @@ public final strictfp class TimePeriodTe
         final TimePeriodBound end   = new TimePeriodBound.GML3(new DummyInstant(date("2007-12-31
00:00:00")), "after");
         clearContext();
         testPeriod(begin, end,
-            "<gml:TimePeriod>\n" +
-            "  <gml:beginPosition>1992-01-01T01:00:00+01:00</gml:beginPosition>\n"
+
-            "  <gml:endPosition>2007-12-31T01:00:00+01:00</gml:endPosition>\n"
+
-            "</gml:TimePeriod>\n", true);
+                "<gml:TimePeriod>\n" +
+                "  <gml:beginPosition>1992-01-01T01:00:00+01:00</gml:beginPosition>\n"
+
+                "  <gml:endPosition>2007-12-31T01:00:00+01:00</gml:endPosition>\n"
+
+                "</gml:TimePeriod>\n", true);
     }
 
     /**
@@ -205,10 +207,10 @@ public final strictfp class TimePeriodTe
         final TimePeriodBound end   = new TimePeriodBound.GML3(new DummyInstant(date("2007-12-30
23:00:00")), "after");
         clearContext();
         testPeriod(begin, end,
-            "<gml:TimePeriod>\n" +
-            "  <gml:beginPosition>1992-01-02</gml:beginPosition>\n" +
-            "  <gml:endPosition>2007-12-31</gml:endPosition>\n" +
-            "</gml:TimePeriod>\n", false);
+                "<gml:TimePeriod>\n" +
+                "  <gml:beginPosition>1992-01-02</gml:beginPosition>\n" +
+                "  <gml:endPosition>2007-12-31</gml:endPosition>\n" +
+                "</gml:TimePeriod>\n", false);
     }
 
     /**
@@ -224,10 +226,10 @@ public final strictfp class TimePeriodTe
         final TimePeriodBound end   = new TimePeriodBound.GML3(new DummyInstant(date("2007-12-30
23:00:00")), "after");
         clearContext();
         testPeriod(begin, end,
-            "<gml:TimePeriod>\n" +
-            "  <gml:beginPosition indeterminatePosition=\"before\"/>\n" +
-            "  <gml:endPosition>2007-12-31</gml:endPosition>\n" +
-            "</gml:TimePeriod>\n", false);
+                "<gml:TimePeriod>\n" +
+                "  <gml:beginPosition indeterminatePosition=\"before\"/>\n" +
+                "  <gml:endPosition>2007-12-31</gml:endPosition>\n" +
+                "</gml:TimePeriod>\n", false);
     }
 
     /**
@@ -243,9 +245,9 @@ public final strictfp class TimePeriodTe
         final TimePeriodBound end   = new TimePeriodBound.GML3(null, "after");
         clearContext();
         testPeriod(begin, end,
-            "<gml:TimePeriod>\n" +
-            "  <gml:beginPosition>1992-01-02</gml:beginPosition>\n" +
-            "  <gml:endPosition indeterminatePosition=\"after\"/>\n" +
-            "</gml:TimePeriod>\n", false);
+                "<gml:TimePeriod>\n" +
+                "  <gml:beginPosition>1992-01-02</gml:beginPosition>\n" +
+                "  <gml:endPosition indeterminatePosition=\"after\"/>\n" +
+                "</gml:TimePeriod>\n", false);
     }
 }

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java?rev=1497598&r1=1497597&r2=1497598&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java
[UTF-8] Thu Jun 27 22:41:38 2013
@@ -60,22 +60,22 @@ public final strictfp class FreeTextMars
     @Test
     public void testStandard() throws JAXBException {
         final String expected =
-            "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + "\" xmlns:gco=\"" + Namespaces.GCO
+ "\" xmlns:xsi=\"" + Namespaces.XSI + "\">\n" +
-            "  <gmd:title xsi:type=\"gmd:PT_FreeText_PropertyType\">\n" +
-            "    <gco:CharacterString>OpenSource Project</gco:CharacterString>\n"
+
-            "    <gmd:PT_FreeText>\n" +
-            "      <gmd:textGroup>\n" +
-            "        <gmd:LocalisedCharacterString locale=\"#locale-eng\">OpenSource
Project</gmd:LocalisedCharacterString>\n" +
-            "      </gmd:textGroup>\n" +
-            "      <gmd:textGroup>\n" +
-            "        <gmd:LocalisedCharacterString locale=\"#locale-ita\">Progetto
OpenSource</gmd:LocalisedCharacterString>\n" +
-            "      </gmd:textGroup>\n" +
-            "      <gmd:textGroup>\n" +
-            "        <gmd:LocalisedCharacterString locale=\"#locale-fra\">Projet OpenSource</gmd:LocalisedCharacterString>\n"
+
-            "      </gmd:textGroup>\n" +
-            "    </gmd:PT_FreeText>\n" +
-            "  </gmd:title>\n" +
-            "</gmd:CI_Citation>\n";
+                "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + "\" xmlns:gco=\"" +
Namespaces.GCO + "\" xmlns:xsi=\"" + Namespaces.XSI + "\">\n" +
+                "  <gmd:title xsi:type=\"gmd:PT_FreeText_PropertyType\">\n" +
+                "    <gco:CharacterString>OpenSource Project</gco:CharacterString>\n"
+
+                "    <gmd:PT_FreeText>\n" +
+                "      <gmd:textGroup>\n" +
+                "        <gmd:LocalisedCharacterString locale=\"#locale-eng\">OpenSource
Project</gmd:LocalisedCharacterString>\n" +
+                "      </gmd:textGroup>\n" +
+                "      <gmd:textGroup>\n" +
+                "        <gmd:LocalisedCharacterString locale=\"#locale-ita\">Progetto
OpenSource</gmd:LocalisedCharacterString>\n" +
+                "      </gmd:textGroup>\n" +
+                "      <gmd:textGroup>\n" +
+                "        <gmd:LocalisedCharacterString locale=\"#locale-fra\">Projet
OpenSource</gmd:LocalisedCharacterString>\n" +
+                "      </gmd:textGroup>\n" +
+                "    </gmd:PT_FreeText>\n" +
+                "  </gmd:title>\n" +
+                "</gmd:CI_Citation>\n";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
         assertEquals(getExpectedI18N(), citation.getTitle());
@@ -94,18 +94,18 @@ public final strictfp class FreeTextMars
     @Test
     public void testLegacy() throws JAXBException {
         final String legacy =
-            "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + "\" xmlns:gco=\"" + Namespaces.GCO
+ "\" xmlns:xsi=\"" + Namespaces.XSI + "\">\n" +
-            "  <gmd:title xsi:type=\"gmd:PT_FreeText_PropertyType\">\n" +
-            "    <gco:CharacterString>OpenSource Project</gco:CharacterString>\n"
+
-            "    <gmd:PT_FreeText>\n" +
-            "      <gmd:textGroup>\n" +
-            "        <gmd:LocalisedCharacterString locale=\"#locale-eng\">OpenSource
Project</gmd:LocalisedCharacterString>\n" +
-            "        <gmd:LocalisedCharacterString locale=\"#locale-ita\">Progetto
OpenSource</gmd:LocalisedCharacterString>\n" +
-            "        <gmd:LocalisedCharacterString locale=\"#locale-fra\">Projet OpenSource</gmd:LocalisedCharacterString>\n"
+
-            "      </gmd:textGroup>\n" +
-            "    </gmd:PT_FreeText>\n" +
-            "  </gmd:title>\n" +
-            "</gmd:CI_Citation>\n";
+                "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + "\" xmlns:gco=\"" +
Namespaces.GCO + "\" xmlns:xsi=\"" + Namespaces.XSI + "\">\n" +
+                "  <gmd:title xsi:type=\"gmd:PT_FreeText_PropertyType\">\n" +
+                "    <gco:CharacterString>OpenSource Project</gco:CharacterString>\n"
+
+                "    <gmd:PT_FreeText>\n" +
+                "      <gmd:textGroup>\n" +
+                "        <gmd:LocalisedCharacterString locale=\"#locale-eng\">OpenSource
Project</gmd:LocalisedCharacterString>\n" +
+                "        <gmd:LocalisedCharacterString locale=\"#locale-ita\">Progetto
OpenSource</gmd:LocalisedCharacterString>\n" +
+                "        <gmd:LocalisedCharacterString locale=\"#locale-fra\">Projet
OpenSource</gmd:LocalisedCharacterString>\n" +
+                "      </gmd:textGroup>\n" +
+                "    </gmd:PT_FreeText>\n" +
+                "  </gmd:title>\n" +
+                "</gmd:CI_Citation>\n";
 
         final Citation citation = (Citation) XML.unmarshal(legacy);
         assertEquals(getExpectedI18N(), citation.getTitle());

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java?rev=1497598&r1=1497597&r2=1497598&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
[UTF-8] Thu Jun 27 22:41:38 2013
@@ -44,14 +44,14 @@ public final strictfp class NilReasonMar
     @Test
     public void testMissing() throws JAXBException {
         final String expected =
-            "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + '"' +
-                            " xmlns:gco=\"" + Namespaces.GCO + '"' +
-                            " xmlns:xlink=\"" + Namespaces.XLINK + "\">\n" +
-            "  <gmd:title>\n" +
-            "    <gco:CharacterString>A title</gco:CharacterString>\n" +
-            "  </gmd:title>\n" +
-            "  <gmd:series gco:nilReason=\"missing\"/>\n" +
-            "</gmd:CI_Citation>";
+                "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + '"' +
+                                " xmlns:gco=\"" + Namespaces.GCO + '"' +
+                                " xmlns:xlink=\"" + Namespaces.XLINK + "\">\n" +
+                "  <gmd:title>\n" +
+                "    <gco:CharacterString>A title</gco:CharacterString>\n" +
+                "  </gmd:title>\n" +
+                "  <gmd:series gco:nilReason=\"missing\"/>\n" +
+                "</gmd:CI_Citation>";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
         assertEquals("title", "A title", citation.getTitle().toString());
@@ -80,14 +80,14 @@ public final strictfp class NilReasonMar
     @Test
     public void testOther() throws JAXBException {
         final String expected =
-            "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + '"' +
-                            " xmlns:gco=\"" + Namespaces.GCO + '"' +
-                            " xmlns:xlink=\"" + Namespaces.XLINK + "\">\n" +
-            "  <gmd:title>\n" +
-            "    <gco:CharacterString>A title</gco:CharacterString>\n" +
-            "  </gmd:title>\n" +
-            "  <gmd:series gco:nilReason=\"other:myReason\"/>\n" +
-            "</gmd:CI_Citation>";
+                "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + '"' +
+                                " xmlns:gco=\"" + Namespaces.GCO + '"' +
+                                " xmlns:xlink=\"" + Namespaces.XLINK + "\">\n" +
+                "  <gmd:title>\n" +
+                "    <gco:CharacterString>A title</gco:CharacterString>\n" +
+                "  </gmd:title>\n" +
+                "  <gmd:series gco:nilReason=\"other:myReason\"/>\n" +
+                "</gmd:CI_Citation>";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
         assertEquals("title", "A title", citation.getTitle().toString());
@@ -115,14 +115,14 @@ public final strictfp class NilReasonMar
     @Test
     public void testURI() throws JAXBException {
         final String expected =
-            "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + '"' +
-                            " xmlns:gco=\"" + Namespaces.GCO + '"' +
-                            " xmlns:xlink=\"" + Namespaces.XLINK + "\">\n" +
-            "  <gmd:title>\n" +
-            "    <gco:CharacterString>A title</gco:CharacterString>\n" +
-            "  </gmd:title>\n" +
-            "  <gmd:series gco:nilReason=\"http://www.myreason.org\"/>\n" +
-            "</gmd:CI_Citation>";
+                "<gmd:CI_Citation xmlns:gmd=\"" + Namespaces.GMD + '"' +
+                                " xmlns:gco=\"" + Namespaces.GCO + '"' +
+                                " xmlns:xlink=\"" + Namespaces.XLINK + "\">\n" +
+                "  <gmd:title>\n" +
+                "    <gco:CharacterString>A title</gco:CharacterString>\n" +
+                "  </gmd:title>\n" +
+                "  <gmd:series gco:nilReason=\"http://www.myreason.org\"/>\n" +
+                "</gmd:CI_Citation>";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
         assertEquals("title", "A title", citation.getTitle().toString());

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageMarshallingTest.java?rev=1497598&r1=1497597&r2=1497598&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageMarshallingTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/jaxb/gmd/LanguageMarshallingTest.java
[UTF-8] Thu Jun 27 22:41:38 2013
@@ -99,9 +99,9 @@ public final strictfp class LanguageMars
                 " xmlns:gco=\"" + Namespaces.GCO + "\">\n" +
                 "  <gmd:language>\n");
         if (languageCode) {
-            buffer.append("    <gmd:LanguageCode"
-                    + " codeList=\"http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/ML_gmxCodelists.xml#LanguageCode\""
-                    + " codeListValue=\"fra\">French</gmd:LanguageCode>\n");
+            buffer.append("    <gmd:LanguageCode" +
+                    " codeList=\"http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/ML_gmxCodelists.xml#LanguageCode\""
+
+                    " codeListValue=\"fra\">French</gmd:LanguageCode>\n");
         } else {
             buffer.append("    <gco:CharacterString>fra</gco:CharacterString>\n");
         }



Mime
View raw message