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 2015/01/14 09:43:06 UTC
svn commit: r1651596 - in /sis/branches/JDK7: ./
core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/
core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/
core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/
core/sis-ref...
Author: desruisseaux
Date: Wed Jan 14 08:43:05 2015
New Revision: 1651596
URL: http://svn.apache.org/r1651596
Log:
Merge from the JDK8 branch:
- renaming of DefaultMetadata.getDates() as getDateInfo()
- Clarification of who is responsible to apply longitude rotation before to use Bursa-Wolf parameters.
Modified:
sis/branches/JDK7/ (props changed)
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 14 08:43:05 2015
@@ -1,4 +1,4 @@
/sis/branches/Android:1430670-1480699
/sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1651214
+/sis/branches/JDK8:1584960-1651592
/sis/trunk:1394364-1508466,1519089-1519674
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -163,7 +163,7 @@ public class DefaultMetadata extends ISO
/**
* Date(s) associated with the metadata.
*/
- private Collection<CitationDate> dates;
+ private Collection<CitationDate> dateInfo;
/**
* Citation(s) for the standard(s) to which the metadata conform.
@@ -271,7 +271,7 @@ public class DefaultMetadata extends ISO
this.contacts = singleton(contact, Responsibility.class);
this.identificationInfo = singleton(identificationInfo, Identification.class);
if (dateStamp != null) {
- dates = singleton(new DefaultCitationDate(dateStamp, DateType.CREATION), CitationDate.class);
+ dateInfo = singleton(new DefaultCitationDate(dateStamp, DateType.CREATION), CitationDate.class);
}
}
@@ -293,7 +293,7 @@ public class DefaultMetadata extends ISO
characterSets = copyCollection(object.getCharacterSets(), Charset.class);
metadataScopes = copyCollection(object.getMetadataScopes(), MetadataScope.class);
contacts = copyCollection(object.getContacts(), Responsibility.class);
- dates = copyCollection(object.getDates(), CitationDate.class);
+ dateInfo = copyCollection(object.getDateInfo(), CitationDate.class);
metadataStandards = copyCollection(object.getMetadataStandards(), Citation.class);
metadataProfiles = copyCollection(object.getMetadataProfiles(), Citation.class);
alternativeMetadataReferences = copyCollection(object.getAlternativeMetadataReferences(), Citation.class);
@@ -799,8 +799,8 @@ public class DefaultMetadata extends ISO
* @since 0.5
*/
@Override
- public Collection<CitationDate> getDates() {
- return dates = nonNullCollection(dates, CitationDate.class);
+ public Collection<CitationDate> getDateInfo() {
+ return dateInfo = nonNullCollection(dateInfo, CitationDate.class);
}
/**
@@ -811,8 +811,8 @@ public class DefaultMetadata extends ISO
*
* @since 0.5
*/
- public void setDates(final Collection<? extends CitationDate> newValues) {
- dates = writeCollection(newValues, dates, CitationDate.class);
+ public void setDateInfo(final Collection<? extends CitationDate> newValues) {
+ dateInfo = writeCollection(newValues, dateInfo, CitationDate.class);
}
/**
@@ -826,7 +826,7 @@ public class DefaultMetadata extends ISO
@Deprecated
@XmlElement(name = "dateStamp", required = true)
public Date getDateStamp() {
- final Collection<CitationDate> dates = getDates();
+ final Collection<CitationDate> dates = getDateInfo();
if (dates != null) {
for (final CitationDate date : dates) {
if (DateType.CREATION.equals(date.getDateType())) {
@@ -847,7 +847,7 @@ public class DefaultMetadata extends ISO
@Deprecated
public void setDateStamp(final Date newValue) {
checkWritePermission();
- Collection<CitationDate> newValues = dates; // See "Note about deprecated methods implementation"
+ Collection<CitationDate> newValues = dateInfo; // See "Note about deprecated methods implementation"
if (newValues == null) {
if (newValue == null) {
return;
@@ -872,7 +872,7 @@ public class DefaultMetadata extends ISO
}
}
newValues.add(new DefaultCitationDate(newValue, DateType.CREATION));
- setDates(newValues);
+ setDateInfo(newValues);
}
/**
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -284,7 +284,7 @@ public final strictfp class DefaultMetad
new DefaultCitationDate(date("2014-10-09 00:00:00"), DateType.LAST_UPDATE),
new DefaultCitationDate(creation, DateType.CREATION)
};
- metadata.setDates(Arrays.asList(dates));
+ metadata.setDateInfo(Arrays.asList(dates));
assertEquals("dateStamp", creation, metadata.getDateStamp());
/*
* Invoking the deprecated setters shall modify the CitationDate object
@@ -293,7 +293,7 @@ public final strictfp class DefaultMetad
creation = date("2014-10-06 00:00:00");
metadata.setDateStamp(creation);
assertEquals("citationDates[1].date", creation, dates[1].getDate());
- assertArrayEquals("dates", dates, metadata.getDates().toArray());
+ assertArrayEquals("dates", dates, metadata.getDateInfo().toArray());
}
/**
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -97,17 +97,21 @@ import java.util.Objects;
* {@section Source and target geodetic datum}
* The <var>source datum</var> in above coordinates transformation is the {@link DefaultGeodeticDatum} instance
* that contain this {@code BursaWolfParameters}. It can be any datum, including datum that are valid only locally.
- * The <var>{@linkplain #getTargetDatum() target datum}</var> is specified at construction time and often fixed to
- * WGS 84 for the needs of the {@code TOWGS84[…]} element in <cite>Well Known Text</cite> (WKT 1) representation.
+ * The <var>{@linkplain #getTargetDatum() target datum}</var> is specified at construction time and is often,
+ * but not necessarily, the <cite>World Geodetic System 1984</cite> (WGS 84) datum.
+ *
+ * <p>If the source and target datum does not have the same {@linkplain DefaultGeodeticDatum#getPrimeMeridian()
+ * prime meridian}, then it is user's responsibility to apply longitude rotation before to use the Bursa-Wolf
+ * parameters.</p>
*
* {@section When Bursa-Wolf parameters are used}
* {@code BursaWolfParameters} are used in three contexts:
* <ol>
* <li>Created as a step while creating a {@linkplain org.apache.sis.referencing.operation.DefaultCoordinateOperation
* coordinate operation} from the EPSG database.</li>
- * <li>Associated to a {@link DefaultGeodeticDatum} for the sole needs of the WKT 1 {@code TOWGS84[…]} element.
- * In this case, only Bursa-Wolf parameters having a WGS 84 {@linkplain #getTargetDatum() target datum} are
- * useful.</li>
+ * <li>Associated to a {@link DefaultGeodeticDatum} with the WGS 84 {@linkplain #getTargetDatum() target datum} for
+ * providing the parameter values to display in the {@code TOWGS84[…]} element of <cite>Well Known Text</cite>
+ * (WKT) version 1. Note that WKT version 2 does not have {@code TOWGS84[…]} element anymore.</li>
* <li>Specified at {@code DefaultGeodeticDatum} construction time for arbitrary target datum.
* Apache SIS will ignore those Bursa-Wolf parameters, except as a fallback if no parameters
* can been found in the EPSG database for a given pair of source and target CRS.</li>
@@ -358,6 +362,10 @@ public class BursaWolfParameters extends
* Those geocentric coordinates are typically converted from geographic coordinates
* in the region or timeframe given by {@link #getDomainOfValidity()}.
*
+ * <p>If the source datum and the {@linkplain #getTargetDatum() target datum} do not use the same
+ * {@linkplain DefaultGeodeticDatum#getPrimeMeridian() prime meridian}, then it is caller's responsibility
+ * to apply longitude rotation before to use the matrix returned by this method.</p>
+ *
* {@section Time-dependent transformation}
* Some transformations use parameters that vary with time (e.g. operation method EPSG:1053).
* Users can optionally specify a date for which the transformation is desired.
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -35,7 +35,6 @@ import org.apache.sis.referencing.operat
import org.apache.sis.metadata.iso.extent.Extents;
import org.apache.sis.internal.referencing.ExtentSelector;
import org.apache.sis.internal.util.CollectionsExt;
-import org.apache.sis.util.resources.Errors;
import org.apache.sis.util.logging.Logging;
import org.apache.sis.util.ComparisonMode;
import org.apache.sis.io.wkt.Formatter;
@@ -44,7 +43,6 @@ import static org.apache.sis.util.Utilit
import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
import static org.apache.sis.util.ArgumentChecks.ensureNonNullElement;
import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
-import static org.apache.sis.internal.referencing.ReferencingUtilities.isGreenwichLongitudeEquals;
// Branch-dependent imports
import java.util.Objects;
@@ -61,26 +59,33 @@ import java.util.Objects;
* Associating Bursa-Wolf parameters to geodetic datum is known as the <cite>early-binding</cite> approach.
* A recommended alternative, discussed below, is the <cite>late-binding</cite> approach.
*
- * <p>There is different methods for transforming coordinates from one geodetic datum to an other datum,
- * and Bursa-Wolf parameters are used with some of them. However different set of parameters may exist
- * for the same pair of (<var>source</var>, <var>target</var>) datum, so it is often not sufficient to
- * know those datum. The (<var>source</var>, <var>target</var>) pair of CRS are often necessary,
- * sometime together with the geographic extent of the coordinates to transform.</p>
- *
- * <p>Apache SIS searches for datum shift methods (including Bursa-Wolf parameters) in the EPSG database when a
- * {@link org.opengis.referencing.operation.CoordinateOperation} or a
- * {@link org.opengis.referencing.operation.MathTransform} is requested for a pair of CRS.
- * This is known as the <cite>late-binding</cite> approach.
- * If a datum shift method is found in the database, it will have precedence over any {@code BursaWolfParameters}
- * instance associated to this {@code DefaultGeodeticDatum}. Only if no datum shift method is found in the database,
- * then the {@code BursaWolfParameters} associated to the datum may be used as a fallback.</p>
- *
- * <p>The Bursa-Wolf parameters association serves an other purpose: when a CRS is formatted in the older
- * <cite>Well Known Text</cite> (WKT 1) format, the formatted string may contain a {@code TOWGS84[…]} element
- * with the parameter values of the transformation to the WGS 84 datum. This element is provided as a help
- * for other Geographic Information Systems that support only the <cite>early-binding</cite> approach.
- * Apache SIS usually does not need the {@code TOWGS84} element, except as a fallback for datum that
- * do not exist in the EPSG database.</p>
+ * <p>The Bursa-Wolf parameters serve two purposes:</p>
+ * <ol>
+ * <li><p><b>Fallback for datum shifts</b><br>
+ * There is different methods for transforming coordinates from one geodetic datum to an other datum,
+ * and Bursa-Wolf parameters are used with some of them. However different set of parameters may exist
+ * for the same pair of (<var>source</var>, <var>target</var>) datum, so it is often not sufficient to
+ * know those datum. The (<var>source</var>, <var>target</var>) pair of CRS are often necessary,
+ * sometime together with the geographic extent of the coordinates to transform.</p>
+ *
+ * <p>Apache SIS searches for datum shift methods (including Bursa-Wolf parameters) in the EPSG database when a
+ * {@link org.opengis.referencing.operation.CoordinateOperation} or a
+ * {@link org.opengis.referencing.operation.MathTransform} is requested for a pair of CRS.
+ * This is known as the <cite>late-binding</cite> approach.
+ * If a datum shift method is found in the database, it will have precedence over any {@code BursaWolfParameters}
+ * instance associated to this {@code DefaultGeodeticDatum}. Only if no datum shift method is found in the database,
+ * then the {@code BursaWolfParameters} associated to the datum may be used as a fallback.</p>
+ * </li>
+ *
+ * <li><p><b>WKT version 1 formatting</b><br>
+ * The Bursa-Wolf parameters association serves an other purpose: when a CRS is formatted in the older
+ * <cite>Well Known Text</cite> (WKT 1) format, the formatted string may contain a {@code TOWGS84[…]} element
+ * with the parameter values of the transformation to the WGS 84 datum. This element is provided as a help
+ * for other Geographic Information Systems that support only the <cite>early-binding</cite> approach.
+ * Apache SIS usually does not need the {@code TOWGS84} element, except as a fallback for datum that
+ * do not exist in the EPSG database.</p>
+ * </li>
+ * </ol>
*
* {@section Creating new geodetic datum instances}
* New instances can be created either directly by specifying all information to a factory method (choices 3
@@ -233,10 +238,6 @@ public class DefaultGeodeticDatum extend
* </tr>
* </table>
*
- * If the given {@code properties} map contains Bursa-Wolf parameters, then for all of them the
- * {@linkplain BursaWolfParameters#getTargetDatum() target datum} prime meridian shall be equal
- * (ignoring metadata) to the {@code primeMeridian} parameter given to this constructor.
- *
* @param properties The properties to be given to the identified object.
* @param ellipsoid The ellipsoid.
* @param primeMeridian The prime meridian.
@@ -258,12 +259,6 @@ public class DefaultGeodeticDatum extend
ensureNonNullElement("bursaWolf", i, param);
param = param.clone();
param.verify();
- final GeodeticDatum targetDatum = param.getTargetDatum();
- if (targetDatum != null && !isGreenwichLongitudeEquals(primeMeridian, targetDatum.getPrimeMeridian())) {
-// TODO
-// throw new IllegalArgumentException(Errors.format(
-// Errors.Keys.MismatchedPrimeMeridianInBWP_1, primeMeridian.getName()));
- }
bursaWolf[i] = param;
}
}
@@ -284,8 +279,8 @@ public class DefaultGeodeticDatum extend
super(datum);
ellipsoid = datum.getEllipsoid();
primeMeridian = datum.getPrimeMeridian();
- bursaWolf = (datum instanceof DefaultGeodeticDatum) ?
- ((DefaultGeodeticDatum) datum).bursaWolf : null;
+ bursaWolf = (datum instanceof DefaultGeodeticDatum) ? ((DefaultGeodeticDatum) datum).bursaWolf : null;
+ // No need to clone the 'bursaWolf' array since it is read only.
}
/**
@@ -341,11 +336,7 @@ public class DefaultGeodeticDatum extend
/**
* Returns all Bursa-Wolf parameters specified in the {@code properties} map at construction time.
- * For a discussion about what Bursa-Wolf parameters are, see the class javadoc.
- *
- * <p><b>Invariant:</b> for all Bursa-Wolf parameters, the {@linkplain BursaWolfParameters#getTargetDatum()
- * target datum} prime meridian is equals (ignoring metadata) to this datum {@linkplain #getPrimeMeridian()
- * prime meridian}.</p>
+ * See class javadoc for a discussion about Bursa-Wolf parameters.
*
* @return The Bursa-Wolf parameters, or an empty array if none.
*/
@@ -362,31 +353,36 @@ public class DefaultGeodeticDatum extend
/**
* Returns the position vector transformation (geocentric domain) to the specified datum.
- * This method performs the search in the following order:
+ * If the returned matrix is non-null, then the transformation is represented by an affine transform which can be
+ * applied on <strong>geocentric</strong> coordinates. This is identified in the EPSG database as operation method
+ * 1033 – <cite>Position Vector transformation (geocentric domain)</cite>, or
+ * 1053 – <cite>Time-dependent Position Vector transformation</cite>.
*
- * <ul>
+ * <p>If this datum and the given {@code targetDatum} do not use the same
+ * {@linkplain #getPrimeMeridian() prime meridian}, then it is caller's responsibility
+ * to apply longitude rotation before to use the matrix returned by this method.</p>
+ *
+ * <p><b>Search order</b><br>
+ * This method performs the search in the following order:</p>
+ * <ol>
* <li>If this {@code GeodeticDatum} contains {@code BursaWolfParameters} having the given
* {@linkplain BursaWolfParameters#getTargetDatum() target datum} (ignoring metadata),
* then the matrix will be built from those parameters.</li>
* <li>Otherwise if the other datum contains {@code BursaWolfParameters} having this datum
* as their target (ignoring metadata), then the matrix will be built from those parameters
* and {@linkplain MatrixSIS#inverse() inverted}.</li>
- * <li>Otherwise this method returns {@code null}.</li>
- * </ul>
+ * </ol>
*
+ * <p><b>Multi-occurrences resolution</b><br>
* If more than one {@code BursaWolfParameters} instance is found in any of the above steps, then the one having
* the largest intersection between its {@linkplain BursaWolfParameters#getDomainOfValidity() domain of validity}
* and the given extent will be selected. If more than one instance have the same intersection, then the first
- * occurrence is selected.
+ * occurrence is selected.</p>
*
- * <p>If the given extent contains a {@linkplain org.opengis.metadata.extent.TemporalExtent temporal extent},
+ * <p><b>Time-dependent parameters</b><br>
+ * If the given extent contains a {@linkplain org.opengis.metadata.extent.TemporalExtent temporal extent},
* then the instant located midway between start and end time will be taken as the date where to evaluate the
- * Bursa-Wolf parameters. This apply only to {@linkplain TimeDependentBWP time-dependent parameters}.</p>
- *
- * <p>If the returned matrix is non-null, then the transformation is represented by an affine transform which can be
- * applied on <strong>geocentric</strong> coordinates. This is identified in the EPSG database as operation method
- * 1033 – <cite>Position Vector transformation (geocentric domain)</cite>, or
- * 1053 – <cite>Time-dependent Position Vector transformation</cite>.</p>
+ * Bursa-Wolf parameters. This is relevant only to {@linkplain TimeDependentBWP time-dependent parameters}.</p>
*
* @param targetDatum The target datum.
* @param areaOfInterest The geographic and temporal extent where the transformation should be valid, or {@code null}.
Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DefaultMetadataTest.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -108,7 +108,7 @@ public strictfp class DefaultMetadataTes
metadata.setLanguages(singleton(Locale.ENGLISH));
metadata.setCharacterSets(singleton(StandardCharsets.UTF_8));
metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET, "Common Data Index record")));
- metadata.setDates(singleton(new DefaultCitationDate(TestUtilities.date("2009-01-01 04:00:00"), DateType.CREATION)));
+ metadata.setDateInfo(singleton(new DefaultCitationDate(TestUtilities.date("2009-01-01 04:00:00"), DateType.CREATION)));
/*
* Contact information for the author. The same party will be used for custodian and distributor,
* with only the role changed. Note that we need to create an instance of the deprecated class,
Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -82,7 +82,7 @@ public final strictfp class ReferencingI
assertEquals("fileIdentifier", "20090901", metadata.getMetadataIdentifier().getCode());
assertEquals("language", Locale.ENGLISH, getSingleton(metadata.getLanguages()));
assertEquals("characterSet", StandardCharsets.UTF_8, getSingleton(metadata.getCharacterSets()));
- assertEquals("dateStamp", xmlDate("2014-01-04 00:00:00"), getSingleton(metadata.getDates()).getDate());
+ assertEquals("dateStamp", xmlDate("2014-01-04 00:00:00"), getSingleton(metadata.getDateInfo()).getDate());
/*
* <gmd:contact>
* <gmd:CI_ResponsibleParty>
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -434,6 +434,11 @@ public final class Errors extends Indexe
public static final short InfiniteArgumentValue_1 = 51;
/**
+ * Inseparable transform.
+ */
+ public static final short InseparableTransform = 175;
+
+ /**
* Argument ‘{0}’ shall contain at least {1} elements. A number of {2} is insufficient.
*/
public static final short InsufficientArgumentSize_3 = 53;
@@ -479,11 +484,6 @@ public final class Errors extends Indexe
public static final short MismatchedParameterDescriptor_1 = 146;
/**
- * Bursa-Wolf parameters shall target a datum having the “{0}” prime meridian.
- */
- public static final short MismatchedPrimeMeridianInBWP_1 = 175;
-
- /**
* Mismatched type for “{0}” property.
*/
public static final short MismatchedPropertyType_1 = 154;
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Wed Jan 14 08:43:05 2015
@@ -97,6 +97,7 @@ IdentifierAlreadyBound_1 = Iden
IndexOutOfBounds_1 = Index {0} is out of bounds.
IndicesOutOfBounds_2 = Indices ({0}, {1}) are out of bounds.
InfiniteArgumentValue_1 = Argument \u2018{0}\u2019 can not take an infinite value.
+InseparableTransform = Inseparable transform.
InsufficientArgumentSize_3 = Argument \u2018{0}\u2019 shall contain at least {1} elements. A number of {2} is insufficient.
KeyCollision_1 = A different value is already associated to the \u201c{0}\u201d key.
MandatoryAttribute_2 = Attribute \u201c{0}\u201d is mandatory for an object of type \u2018{1}\u2019.
@@ -106,7 +107,6 @@ MismatchedDimension_2 = Mism
MismatchedDimension_3 = Argument \u2018{0}\u2019 has {2} dimension{2,choice,1#|2#s}, while {1} was expected.
MismatchedMatrixSize_4 = Mismatched matrix sizes: expected {0}\u00d7{1} but got {2}\u00d7{3}.
MismatchedParameterDescriptor_1 = Mismatched descriptor for \u201c{0}\u201d parameter.
-MismatchedPrimeMeridianInBWP_1 = Bursa-Wolf parameters shall target a datum having the \u201c{0}\u201d prime meridian.
MismatchedPropertyType_1 = Mismatched type for \u201c{0}\u201d property.
MismatchedValueClass_3 = Class of \u201c{0}\u201d values is \u2018{2}\u2019, but the requested type is \u2018{1}\u2019.
MissingAuthority_1 = No authority was specified for code \u201c{0}\u201d. The expected syntax is \u201cAUTHORITY:CODE\u201d.
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] Wed Jan 14 08:43:05 2015
@@ -87,6 +87,7 @@ IdentifierAlreadyBound_1 = L\u2
IndexOutOfBounds_1 = L\u2019index {0} est en dehors des limites permises.
IndicesOutOfBounds_2 = Les index ({0}, {1}) sont en dehors des limites permises.
InfiniteArgumentValue_1 = L\u2019argument \u2018{0}\u2019 ne peut pas prendre une valeur infinie.
+InseparableTransform = La transformation n\u2019est pas s\u00e9parable.
InsufficientArgumentSize_3 = L\u2019argument \u2018{0}\u2019 doit contenir au moins {1} \u00e9l\u00e9ments. Un nombre de {2} est insuffisant.
KeyCollision_1 = Une valeur diff\u00e9rente est d\u00e9j\u00e0 associ\u00e9e \u00e0 la cl\u00e9 \u00ab\u202f{0}\u202f\u00bb.
MandatoryAttribute_2 = L\u2019attribut \u00ab\u202f{0}\u202f\u00bb est obligatoire pour un objet de type \u2018{1}\u2019.
@@ -96,7 +97,6 @@ MismatchedDimension_2 = Les
MismatchedDimension_3 = L\u2019argument \u2018{0}\u2019 a {2} dimension{2,choice,1#|2#s}, alors qu\u2019on en attendait {1}.
MismatchedMatrixSize_4 = Une matrice de taille de {0}\u00d7{1} \u00e9tait attendue mais la matrice donn\u00e9es est de taille {2}\u00d7{3}.
MismatchedParameterDescriptor_1 = Le descripteur du param\u00e8tre \u00ab\u202f{0}\u202f\u00bb ne correspond pas.
-MismatchedPrimeMeridianInBWP_1 = Les param\u00e8tres de Bursa-Wolf doivent avoir un r\u00e9f\u00e9rentiel de destination ayant le m\u00e9ridien d\u2019origine \u00ab\u202f{0}\u202f\u00bb.
MismatchedPropertyType_1 = Le type de la propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb ne correspond pas.
MismatchedValueClass_3 = Les valeurs de \u00ab\u202f{0}\u202f\u00bb sont de la classe \u2018{2}\u2019, alors que le type demand\u00e9 \u00e9tait \u2018{1}\u2019.
MissingAuthority_1 = Aucune autorit\u00e9 n\u2019a \u00e9t\u00e9 sp\u00e9cifi\u00e9e pour le code \u00ab\u202f{0}\u202f\u00bb. Le format attendu est \u00ab\u202fAUTORIT\u00c9:CODE\u202f\u00bb.
Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -215,7 +215,7 @@ public final strictfp class MetadataMock
* @return {@code null}.
*/
@Override
- public Collection<? extends CitationDate> getDates() {
+ public Collection<? extends CitationDate> getDateInfo() {
return null;
}
Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java?rev=1651596&r1=1651595&r2=1651596&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java [UTF-8] Wed Jan 14 08:43:05 2015
@@ -946,7 +946,7 @@ final class MetadataReader {
metadata.setMetadataIdentifier(identifier);
final Date creation = decoder.dateValue(METADATA_CREATION);
if (creation != null) {
- metadata.setDates(singleton(new DefaultCitationDate(creation, DateType.CREATION)));
+ metadata.setDateInfo(singleton(new DefaultCitationDate(creation, DateType.CREATION)));
}
metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET, null)));
for (final String service : SERVICES) {