You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2014/07/15 00:55:33 UTC

svn commit: r1610550 [2/2] - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/...

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=1610550&r1=1610549&r2=1610550&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] Mon Jul 14 22:55:33 2014
@@ -22,11 +22,13 @@ import java.util.Date;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.CitationDate;
+import org.opengis.metadata.citation.OnlineResource;
 import org.opengis.metadata.citation.PresentationForm;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.citation.Series;
 import org.opengis.metadata.extent.GeographicExtent;
 import org.opengis.metadata.extent.GeographicDescription;
+import org.opengis.metadata.identification.BrowseGraphic;
 import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.extent.AbstractGeographicExtent;
@@ -68,13 +70,15 @@ public final strictfp class TypeMapTest 
             new SimpleEntry<>("edition",               InternationalString.class),
             new SimpleEntry<>("editionDate",           Date.class),
             new SimpleEntry<>("identifier",            Identifier.class),
-            new SimpleEntry<>("citedResponsibleParty", ResponsibleParty.class),
+            new SimpleEntry<>("citedResponsibleParty", Responsibility.class),
             new SimpleEntry<>("presentationForm",      PresentationForm.class),
             new SimpleEntry<>("series",                Series.class),
             new SimpleEntry<>("otherCitationDetails",  InternationalString.class),
             new SimpleEntry<>("collectiveTitle",       InternationalString.class),
             new SimpleEntry<>("ISBN",                  String.class),
-            new SimpleEntry<>("ISSN",                  String.class)
+            new SimpleEntry<>("ISSN",                  String.class),
+            new SimpleEntry<>("graphic",               BrowseGraphic.class),
+            new SimpleEntry<>("onlineResource",        OnlineResource.class)
         }, map.entrySet().toArray());
 
         assertEquals(InternationalString.class, map.get("alternateTitle"));

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=1610550&r1=1610549&r2=1610550&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] Mon Jul 14 22:55:33 2014
@@ -170,7 +170,9 @@ public final strictfp class ValueMapTest
             new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
             new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
             new SimpleEntry<>("presentationForms",       emptySet()),
-            new SimpleEntry<>("ISBN",                    "9782505004509")
+            new SimpleEntry<>("ISBN",                    "9782505004509"),
+            new SimpleEntry<>("graphics",                emptyList()),
+            new SimpleEntry<>("onlineResources",         emptyList())
         }, all.entrySet().toArray());
     }
 
@@ -198,7 +200,9 @@ public final strictfp class ValueMapTest
             new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
             new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
             new SimpleEntry<>("presentationForms",       emptySet()),
-            new SimpleEntry<>("ISBN",                    "9782505004509")
+            new SimpleEntry<>("ISBN",                    "9782505004509"),
+            new SimpleEntry<>("graphics",                emptyList()),
+            new SimpleEntry<>("onlineResources",         emptyList())
         }, all.entrySet().toArray());
     }
 
@@ -229,7 +233,9 @@ public final strictfp class ValueMapTest
             new SimpleEntry<>("otherCitationDetails",    null),
             new SimpleEntry<>("collectiveTitle",         null),
             new SimpleEntry<>("ISBN",                    "9782505004509"),
-            new SimpleEntry<>("ISSN",                    null)
+            new SimpleEntry<>("ISSN",                    null),
+            new SimpleEntry<>("graphics",                emptyList()),
+            new SimpleEntry<>("onlineResources",         emptyList())
         }, all.entrySet().toArray());
     }
 

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1610550&r1=1610549&r2=1610550&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] Mon Jul 14 22:55:33 2014
@@ -144,7 +144,6 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.identification.Progress.class,
             org.opengis.metadata.identification.RepresentativeFraction.class,
             org.opengis.metadata.identification.Resolution.class,
-            org.opengis.metadata.identification.ServiceIdentification.class,
             org.opengis.metadata.identification.TopicCategory.class,
             org.opengis.metadata.identification.Usage.class,
             org.opengis.metadata.lineage.Algorithm.class,
@@ -192,6 +191,7 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.service.OperationChainMetadata.class,
             org.opengis.metadata.service.OperationMetadata.class,
             org.opengis.metadata.service.Parameter.class,
+//          org.opengis.metadata.service.ServiceIdentification.class,
             org.opengis.metadata.spatial.CellGeometry.class,
             org.opengis.metadata.spatial.Dimension.class,
             org.opengis.metadata.spatial.DimensionNameType.class,

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java?rev=1610550&r1=1610549&r2=1610550&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java [UTF-8] Mon Jul 14 22:55:33 2014
@@ -115,6 +115,13 @@ public abstract class PropertyType<Value
         extends XmlAdapter<ValueType,BoundType>
 {
     /**
+     * {@code true} if marshalling an XML based on ISO 19115:2003 model. A value of {@code false}
+     * (ISO 19115:2014 model) is not yet supported, so we currently use this variable only as a way
+     * to identify the code to revisit when we will want to support the new model.
+     */
+    protected static final boolean LEGACY_XML = true;
+
+    /**
      * The wrapped GeoAPI metadata instance, or {@code null} if the metadata shall not be marshalled.
      * Metadata are not marshalled when replaced by {@code xlink:href} or {@code uuidref} attributes.
      */

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java?rev=1610550&r1=1610549&r2=1610550&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java [UTF-8] Mon Jul 14 22:55:33 2014
@@ -23,9 +23,11 @@ import java.io.Serializable;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.CitationDate;
+import org.opengis.metadata.citation.OnlineResource;
 import org.opengis.metadata.citation.PresentationForm;
-import org.opengis.metadata.citation.ResponsibleParty;
+import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.citation.Series;
+import org.opengis.metadata.identification.BrowseGraphic;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.Debug;
@@ -84,13 +86,15 @@ public class SimpleCitation implements C
     @Override public InternationalString              getEdition()                 {return null;}
     @Override public Date                             getEditionDate()             {return null;}
     @Override public Collection<? extends Identifier> getIdentifiers()             {return Collections.emptyList();}
-    @Override public Collection<ResponsibleParty>     getCitedResponsibleParties() {return Collections.emptyList();}
+    @Override public Collection<Responsibility>       getCitedResponsibleParties() {return Collections.emptyList();}
     @Override public Collection<PresentationForm>     getPresentationForms()       {return Collections.emptyList();}
     @Override public Series                           getSeries()                  {return null;}
     @Override public InternationalString              getOtherCitationDetails()    {return null;}
     @Override public InternationalString              getCollectiveTitle()         {return null;}
     @Override public String                           getISBN()                    {return null;}
     @Override public String                           getISSN()                    {return null;}
+    @Override public Collection<OnlineResource>       getOnlineResources()         {return Collections.emptyList();}
+    @Override public Collection<BrowseGraphic>        getGraphics()                {return Collections.emptyList();}
 
     /**
      * Compares the given object with this citation for equality.

Modified: sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java?rev=1610550&r1=1610549&r2=1610550&view=diff
==============================================================================
--- sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java [UTF-8] (original)
+++ sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java [UTF-8] Mon Jul 14 22:55:33 2014
@@ -27,7 +27,6 @@ import org.apache.sis.test.XMLTestCase;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
-import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
 /**
@@ -36,7 +35,7 @@ import static org.apache.sis.test.TestUt
  * @author  Cédric Briançon (Geomatys)
  * @author  Guilhem Legal (Geomatys)
  * @version 0.4 (derived from geotk-3.00)
- * @since   0.4
+ * @since   0.5
  * @module
  */
 public final strictfp class DirectReferenceSystemTest extends XMLTestCase {
@@ -50,8 +49,9 @@ public final strictfp class DirectRefere
      */
     private static DefaultMetadata createMetadata() {
         final DefaultMetadata metadata = new DefaultMetadata();
-        final DirectReferenceSystem refSys = new DirectReferenceSystem(new ImmutableIdentifier(
-                new DefaultCitation(getSingleton(HardCodedCitations.EPSG.getCitedResponsibleParties())), null, "4326"));
+        final DefaultCitation citation = new DefaultCitation("European Petroleum Survey Group");
+        citation.setCitedResponsibleParties(HardCodedCitations.EPSG.getCitedResponsibleParties());
+        final DirectReferenceSystem refSys = new DirectReferenceSystem(new ImmutableIdentifier(citation, null, "4326"));
         metadata.setReferenceSystemInfo(Arrays.asList(refSys));
         return metadata;
     }

Modified: sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java?rev=1610550&r1=1610549&r2=1610550&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java [UTF-8] Mon Jul 14 22:55:33 2014
@@ -87,8 +87,9 @@ public final strictfp class MetadataRead
             "  ├─File identifier………………………………………………………………………… edu.ucar.unidata:NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
             "  ├─Hierarchy level………………………………………………………………………… Dataset\n" +
             "  ├─Contact\n" +
-            "  │   ├─Individual name……………………………………………………………… NOAA/NWS/NCEP\n" +
-            "  │   └─Role…………………………………………………………………………………………… Point of contact\n" +
+            "  │   ├─Role…………………………………………………………………………………………… Point of contact\n" +
+            "  │   └─Party\n" +
+            "  │       └─Name………………………………………………………………………………… NOAA/NWS/NCEP\n" +
             "  ├─Metadata standard name……………………………………………………… ISO 19115-2 Geographic Information - Metadata Part 2 Extensions for imagery and gridded data\n" +
             "  ├─Metadata standard version……………………………………………… ISO 19115-2:2009(E)\n" +
             "  ├─Spatial representation info\n" +
@@ -115,12 +116,14 @@ public final strictfp class MetadataRead
             "  │   │   │   └─Authority\n" +
             "  │   │   │       └─Title………………………………………………………… edu.ucar.unidata\n" +
             "  │   │   └─Cited responsible party\n" +
-            "  │   │       ├─Individual name………………………………………… NOAA/NWS/NCEP\n" +
-            "  │   │       └─Role……………………………………………………………………… Originator\n" +
+            "  │   │       ├─Role……………………………………………………………………… Originator\n" +
+            "  │   │       └─Party\n" +
+            "  │   │           └─Name…………………………………………………………… NOAA/NWS/NCEP\n" +
             "  │   ├─Abstract………………………………………………………………………………… NCEP SST Global 5.0 x 2.5 degree model data\n" +
             "  │   ├─Point of contact\n" +
-            "  │   │   ├─Individual name…………………………………………………… NOAA/NWS/NCEP\n" +
-            "  │   │   └─Role………………………………………………………………………………… Point of contact\n" +
+            "  │   │   ├─Role………………………………………………………………………………… Point of contact\n" +
+            "  │   │   └─Party\n" +
+            "  │   │       └─Name……………………………………………………………………… NOAA/NWS/NCEP\n" +
             "  │   ├─Descriptive keywords\n" +
             "  │   │   ├─Keyword………………………………………………………………………… EARTH SCIENCE > Oceans > Ocean Temperature > Sea Surface Temperature\n" +
             "  │   │   ├─Type………………………………………………………………………………… Theme\n" +