sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1683837 [1/7] - in /sis/trunk: ./ application/sis-console/src/test/java/org/apache/sis/console/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/...
Date Fri, 05 Jun 2015 18:41:32 GMT
Author: desruisseaux
Date: Fri Jun  5 18:41:29 2015
New Revision: 1683837

URL: http://svn.apache.org/r1683837
Log:
Merge from the JDK6 branch. This merge include an initial commit of a WKT 1 parser.
This parser will be upgraded to WKT 2 format in the next commits.

Added:
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
      - copied, changed from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/VerticalDatumTypes.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/WKTParser.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/WKTParser.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Element.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Element.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
      - copied, changed from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/MathTransformParser.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/MathTransformParser.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Parser.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Parser.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/VerticalDatumTypesTest.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/VerticalDatumTypesTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/ElementTest.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/ElementTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.txt
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.txt
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ConversionKeys.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/ConversionKeys.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/
      - copied from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
      - copied, changed from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
    sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory
    sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory
    sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory
    sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/io/
      - copied from r1683824, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/
      - copied from r1683824, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java
      - copied, changed from r1683824, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
      - copied unchanged from r1683824, sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
Removed:
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Standards.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Authority.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/OperationMethods.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Pending.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/VerticalDatumTypes.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticObjectFactory.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/VerticalDatumTypesTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GeodeticObjectFactoryTest.java
    sis/trunk/core/sis-utility/src/main/java/com/
Modified:
    sis/trunk/   (props changed)
    sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataSCTest.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/WKTFormatTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PrunerTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/HardCodedCitations.java
    sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/DeprecatedCode.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxesConvention.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/TimeDependentBWP.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MismatchedDatumException.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/jaxb/referencing/CodeTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/AxisDirectionsTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/AffineTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/MathTransformParserTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultDerivedCRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/CoordinateSystemsTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCompoundCSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultTemporalDatumTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/TimeDependentBWPTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/trunk/core/sis-utility/pom.xml
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/LocalizedParseException.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/simple/SimpleIdentifierTest.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/CitationsTest.java
    sis/trunk/core/sis-utility/src/test/java/org/apache/sis/internal/util/DefinitionURITest.java
    sis/trunk/ide-project/NetBeans/build.xml
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/pom.xml
    sis/trunk/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
    sis/trunk/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml
    sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
    sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun  5 18:41:29 2015
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
-/sis/branches/JDK6:1394364-1679633
-/sis/branches/JDK7:1394913-1679630
-/sis/branches/JDK8:1584960-1679629
+/sis/branches/JDK6:1394364-1683824
+/sis/branches/JDK7:1394913-1683807
+/sis/branches/JDK8:1584960-1683803

Modified: sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataSCTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataSCTest.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataSCTest.java [UTF-8] (original)
+++ sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataSCTest.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -31,7 +31,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.6
  * @module
  */
 @DependsOn(SubCommandTest.class)
@@ -57,7 +57,7 @@ public final strictfp class MetadataSCTe
      */
     private static void verifyNetCDF(final String expectedHeader, final String result) {
         assertTrue(expectedHeader,                           result.startsWith(expectedHeader));
-        assertTrue("ISO 19115-2",                            result.contains("ISO 19115-2"));
+        assertTrue("ISO 19115",                              result.contains("ISO 19115"));
         assertTrue("Sea Surface Temperature Analysis Model", result.contains("Sea Surface Temperature Analysis Model"));
         assertTrue("GCMD Science Keywords",                  result.contains("GCMD Science Keywords"));
         assertTrue("NOAA/NWS/NCEP",                          result.contains("NOAA/NWS/NCEP"));

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -17,6 +17,7 @@
 package org.apache.sis.internal.metadata;
 
 import java.util.Locale;
+import java.util.Collection;
 import org.opengis.util.NameSpace;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
@@ -25,8 +26,10 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.util.iso.DefaultNameSpace;
+import org.apache.sis.util.CharSequences;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.util.Characters.Filter.LETTERS_AND_DIGITS;
 
 // Branch-dependent imports
 import org.apache.sis.internal.jdk7.Objects;
@@ -34,6 +37,8 @@ import org.apache.sis.internal.jdk7.Obje
 
 /**
  * Does the unobvious mapping between {@link Identifier} properties and {@link GenericName} ones.
+ * This class also implements the {@link #isHeuristicMatchForName(Identifier, Collection, CharSequence)}
+ * method since that method involves a mix of names and identifiers.
  *
  * <p><b>Limitation:</b>
  * Current version does not yet work with URN or HTTP syntax.</p>
@@ -193,4 +198,46 @@ public final class NameToIdentifier impl
         }
         return null;
     }
+
+    /**
+     * Returns {@code true} if the given {@linkplain org.apache.sis.referencing.AbstractIdentifiedObject#getName()
+     * primary name} or one of the given aliases matches the given name. The comparison ignores case, some Latin
+     * diacritical signs and any characters that are not letters or digits.
+     *
+     * @param  name     The name of the {@code IdentifiedObject} to check.
+     * @param  aliases  The list of alias in the {@code IdentifiedObject} (may be {@code null}). This method will never
+     *                  modify that list. Consequently, the given list can be a direct reference to an internal list.
+     * @param  toSearch The name for which to check for equality.
+     * @return {@code true} if the primary name or at least one alias matches the given {@code name}.
+     */
+    public static boolean isHeuristicMatchForName(final Identifier name, final Collection<GenericName> aliases,
+            CharSequence toSearch)
+    {
+        toSearch = CharSequences.toASCII(toSearch);
+        if (name != null) { // Paranoiac check.
+            final CharSequence code = CharSequences.toASCII(name.getCode());
+            if (code != null) { // Paranoiac check.
+                if (CharSequences.equalsFiltered(toSearch, code, LETTERS_AND_DIGITS, true)) {
+                    return true;
+                }
+            }
+        }
+        if (aliases != null) {
+            for (final GenericName alias : aliases) {
+                if (alias != null) { // Paranoiac check.
+                    final CharSequence tip = CharSequences.toASCII(alias.tip().toString());
+                    if (CharSequences.equalsFiltered(toSearch, tip, LETTERS_AND_DIGITS, true)) {
+                        return true;
+                    }
+                    /*
+                     * Note: a previous version compared also the scoped names. We removed that part,
+                     * because experience has shown that this method is used only for the "code" part
+                     * of an object name. If we really want to compare scoped name, it would probably
+                     * be better to take a GenericName argument instead than String.
+                     */
+                }
+            }
+        }
+        return false;
+    }
 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -16,19 +16,38 @@
  */
 package org.apache.sis.internal.metadata;
 
+import java.util.Map;
+import javax.measure.unit.Unit;
+import javax.measure.quantity.Length;
 import org.opengis.geometry.Envelope;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.referencing.IdentifiedObject;
+import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.referencing.crs.SingleCRS;
+import org.opengis.referencing.crs.DerivedCRS;
+import org.opengis.referencing.cs.CartesianCS;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.opengis.referencing.datum.PrimeMeridian;
 import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.MathTransformFactory;
+import org.opengis.referencing.operation.CoordinateOperationFactory;
+import org.opengis.referencing.operation.OperationMethod;
+import org.opengis.referencing.operation.SingleOperation;
 import org.opengis.referencing.operation.TransformException;
+import org.opengis.util.FactoryException;
+import org.opengis.util.NoSuchIdentifierException;
 import org.apache.sis.metadata.iso.extent.DefaultExtent;
 import org.apache.sis.metadata.iso.extent.DefaultVerticalExtent;
 import org.apache.sis.metadata.iso.extent.DefaultTemporalExtent;
 import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
 import org.apache.sis.metadata.iso.extent.DefaultSpatialTemporalExtent;
-import org.apache.sis.internal.system.SystemListener;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.system.OptionalDependency;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.io.wkt.FormattableObject;
+import org.apache.sis.util.iso.DefaultNameSpace;
+import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.resources.Errors;
 
 
@@ -37,15 +56,15 @@ import org.apache.sis.util.resources.Err
  * This class searches for the {@link org.apache.sis.internal.referencing.ServicesForMetadata}
  * implementation using Java reflection.
  *
- * <p>This class also opportunistically defines some constants related to "referencing by coordinates"
- * but needed by metadata.</p>
+ * <p>This class also opportunistically defines some methods and constants related to
+ * <cite>"referencing by coordinates"</cite> but needed by metadata.</p>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
  * @version 0.6
  * @module
  */
-public abstract class ReferencingServices extends SystemListener {
+public class ReferencingServices extends OptionalDependency {
     /**
      * The length of one nautical mile, which is {@value} metres.
      */
@@ -58,6 +77,37 @@ public abstract class ReferencingService
     public static final double AUTHALIC_RADIUS = 6371007;
 
     /**
+     * The {@link org.apache.sis.referencing.datum.DefaultGeodeticDatum#BURSA_WOLF_KEY} value.
+     */
+    public static final String BURSA_WOLF_KEY = "bursaWolf";
+
+    /**
+     * The key for specifying explicitely the value to be returned by
+     * {@link org.apache.sis.referencing.operation.DefaultConversion#getParameterValues()}.
+     * It is usually not necessary to specify those parameters because they are inferred either from
+     * the {@link MathTransform}, or specified explicitely in a {@code DefiningConversion}. However
+     * there is a few cases, for example the Molodenski transform, where none of the above can apply,
+     * because SIS implements those operations as a concatenation of math transforms, and such
+     * concatenations do not have {@link org.opengis.parameter.ParameterValueGroup}.
+     */
+    public static final String PARAMETERS_KEY = "parameters";
+
+    /**
+     * The key for specifying a {@linkplain org.opengis.referencing.operation.MathTransformFactory}
+     * instance to use for the construction of a geodetic object. This is usually not needed for CRS
+     * construction, except in the special case of a derived CRS created from a defining conversion.
+     */
+    public static final String MT_FACTORY = "mtFactory";
+
+    /**
+     * The separator character between an identifier and its namespace in the argument given to
+     * {@link #getOperationMethod(String)}. For example this is the separator in {@code "EPSG:9807"}.
+     *
+     * This is defined as a constant for now, but we may make it configurable in a future version.
+     */
+    private static final char IDENTIFIER_SEPARATOR = DefaultNameSpace.DEFAULT_SEPARATOR;
+
+    /**
      * The services, fetched when first needed.
      */
     private static volatile ReferencingServices instance;
@@ -67,8 +117,7 @@ public abstract class ReferencingService
      * in order to force a new {@code ReferencingServices} lookup if the classpath changes.
      */
     protected ReferencingServices() {
-        super(Modules.METADATA);
-        SystemListener.add(this);
+        super(Modules.METADATA, "sis-referencing");
     }
 
     /**
@@ -79,6 +128,7 @@ public abstract class ReferencingService
     @Override
     protected final void classpathChanged() {
         synchronized (ReferencingServices.class) {
+            super.classpathChanged();
             instance = null;
         }
     }
@@ -87,62 +137,38 @@ public abstract class ReferencingService
      * Returns the singleton instance.
      *
      * @return The singleton instance.
-     * @throws UnsupportedOperationException If the {@code "sis-referencing"} module has not
-     *         been found on the classpath.
      */
-    public static ReferencingServices getInstance() throws UnsupportedOperationException {
+    public static ReferencingServices getInstance() {
         ReferencingServices c = instance;
         if (c == null) {
             synchronized (ReferencingServices.class) {
                 c = instance;
-                if (c == null) try {
-                    instance = c = (ReferencingServices) Class.forName("org.apache.sis.internal.referencing.ServicesForMetadata").newInstance();
-                } catch (ClassNotFoundException exception) {
-                    throw new UnsupportedOperationException(Errors.format(
-                            Errors.Keys.MissingRequiredModule_1, "sis-referencing"), exception);
-                } catch (Exception exception) { // (ReflectiveOperationException) on JDK7 branch.
-                    // Should never happen if we didn't broke our helper class.
-                    throw new AssertionError(exception);
+                if (c == null) {
+                    /*
+                     * Double-checked locking: okay since Java 5 provided that the 'instance' field is volatile.
+                     * In the particular case of this class, the intend is to ensure that SystemListener.add(…)
+                     * is invoked only once.
+                     */
+                    c = getInstance(ReferencingServices.class, Modules.METADATA, "sis-referencing",
+                            "org.apache.sis.internal.referencing.ServicesForMetadata");
+                    if (c == null) {
+                        c = new ReferencingServices();
+                    }
+                    instance = c;
                 }
             }
         }
         return c;
     }
 
-    /**
-     * Returns a fully implemented parameter descriptor.
-     *
-     * @param  parameter A partially implemented parameter descriptor, or {@code null}.
-     * @return A fully implemented parameter descriptor, or {@code null} if the given argument was null.
-     *
-     * @since 0.5
-     */
-    public abstract ParameterDescriptor<?> toImplementation(ParameterDescriptor<?> parameter);
 
-    /**
-     * Converts the given object in a {@code FormattableObject} instance.
-     *
-     * @param  object The object to wrap.
-     * @return The given object converted to a {@code FormattableObject} instance.
-     *
-     * @see org.apache.sis.referencing.AbstractIdentifiedObject#castOrCopy(IdentifiedObject)
-     *
-     * @since 0.4
-     */
-    public abstract FormattableObject toFormattableObject(IdentifiedObject object);
 
-    /**
-     * Converts the given object in a {@code FormattableObject} instance. Callers should verify that the given
-     * object is not already an instance of {@code FormattableObject} before to invoke this method. This method
-     * returns {@code null} if it can not convert the object.
-     *
-     * @param  object The object to wrap.
-     * @param  internal {@code true} if the formatting convention is {@code Convention.INTERNAL}.
-     * @return The given object converted to a {@code FormattableObject} instance, or {@code null}.
-     *
-     * @since 0.6
-     */
-    public abstract FormattableObject toFormattableObject(MathTransform object, boolean internal);
+
+    ///////////////////////////////////////////////////////////////////////////////////////
+    ////                                                                               ////
+    ////                        SERVICES FOR ISO 19115 METADATA                        ////
+    ////                                                                               ////
+    ///////////////////////////////////////////////////////////////////////////////////////
 
     /**
      * Sets a geographic bounding box from the specified envelope.
@@ -152,10 +178,12 @@ public abstract class ReferencingService
      *
      * @param  envelope The source envelope.
      * @param  target The target bounding box.
-     * @throws TransformException If the given envelope can't be transformed.
+     * @throws TransformException if the given envelope can't be transformed.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
      */
-    public abstract void setBounds(Envelope envelope, DefaultGeographicBoundingBox target)
-            throws TransformException;
+    public void setBounds(Envelope envelope, DefaultGeographicBoundingBox target) throws TransformException {
+        throw moduleNotFound();
+    }
 
     /**
      * Sets a vertical extent with the value inferred from the given envelope.
@@ -163,10 +191,12 @@ public abstract class ReferencingService
      *
      * @param  envelope The source envelope.
      * @param  target The target vertical extent.
-     * @throws TransformException If no vertical component can be extracted from the given envelope.
+     * @throws TransformException if no vertical component can be extracted from the given envelope.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
      */
-    public abstract void setBounds(Envelope envelope, DefaultVerticalExtent target)
-            throws TransformException;
+    public void setBounds(Envelope envelope, DefaultVerticalExtent target) throws TransformException {
+        throw moduleNotFound();
+    }
 
     /**
      * Sets a temporal extent with the value inferred from the given envelope.
@@ -174,10 +204,12 @@ public abstract class ReferencingService
      *
      * @param  envelope The source envelope.
      * @param  target The target temporal extent.
-     * @throws TransformException If no temporal component can be extracted from the given envelope.
+     * @throws TransformException if no temporal component can be extracted from the given envelope.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
      */
-    public abstract void setBounds(Envelope envelope, DefaultTemporalExtent target)
-            throws TransformException;
+    public void setBounds(Envelope envelope, DefaultTemporalExtent target) throws TransformException {
+        throw moduleNotFound();
+    }
 
     /**
      * Sets the geographic, vertical and temporal extents with the values inferred from the given envelope.
@@ -195,18 +227,293 @@ public abstract class ReferencingService
      *
      * @param  envelope The source envelope.
      * @param  target The target spatio-temporal extent.
-     * @throws TransformException If no temporal component can be extracted from the given envelope.
+     * @throws TransformException if no temporal component can be extracted from the given envelope.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
      */
-    public abstract void setBounds(Envelope envelope, DefaultSpatialTemporalExtent target)
-            throws TransformException;
+    public void setBounds(Envelope envelope, DefaultSpatialTemporalExtent target) throws TransformException {
+        throw moduleNotFound();
+    }
 
     /**
-     * Initializes a horizontal, vertical and temporal extent with the values inferred from
-     * the given envelope.
+     * Initializes a horizontal, vertical and temporal extent with the values inferred from the given envelope.
      *
      * @param  envelope The source envelope.
      * @param  target The target extent.
-     * @throws TransformException If a coordinate transformation was required and failed.
+     * @throws TransformException if a coordinate transformation was required and failed.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
+     */
+    public void addElements(Envelope envelope, DefaultExtent target) throws TransformException {
+        throw moduleNotFound();
+    }
+
+
+
+
+    ///////////////////////////////////////////////////////////////////////////////////////
+    ////                                                                               ////
+    ////                          SERVICES FOR WKT FORMATTING                          ////
+    ////                                                                               ////
+    ///////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Returns a fully implemented parameter descriptor.
+     *
+     * @param  parameter A partially implemented parameter descriptor, or {@code null}.
+     * @return A fully implemented parameter descriptor, or {@code null} if the given argument was null.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
+     *
+     * @since 0.5
+     */
+    public ParameterDescriptor<?> toImplementation(ParameterDescriptor<?> parameter) {
+        throw moduleNotFound();
+    }
+
+    /**
+     * Converts the given object in a {@code FormattableObject} instance.
+     *
+     * @param  object The object to wrap.
+     * @return The given object converted to a {@code FormattableObject} instance.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
+     *
+     * @see org.apache.sis.referencing.AbstractIdentifiedObject#castOrCopy(IdentifiedObject)
+     *
+     * @since 0.4
+     */
+    public FormattableObject toFormattableObject(IdentifiedObject object) {
+        throw moduleNotFound();
+    }
+
+    /**
+     * Converts the given object in a {@code FormattableObject} instance. Callers should verify that the given
+     * object is not already an instance of {@code FormattableObject} before to invoke this method. This method
+     * returns {@code null} if it can not convert the object.
+     *
+     * @param  object The object to wrap.
+     * @param  internal {@code true} if the formatting convention is {@code Convention.INTERNAL}.
+     * @return The given object converted to a {@code FormattableObject} instance, or {@code null}.
+     * @throws UnsupportedOperationException if the {@code "sis-referencing"} module has not been found on the classpath.
+     *
+     * @since 0.6
      */
-    public abstract void addElements(Envelope envelope, DefaultExtent target) throws TransformException;
+    public FormattableObject toFormattableObject(MathTransform object, boolean internal) {
+        throw moduleNotFound();
+    }
+
+
+
+
+    ///////////////////////////////////////////////////////////////////////////////////////
+    ////                                                                               ////
+    ////                           SERVICES FOR WKT PARSING                            ////
+    ////                                                                               ////
+    ///////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Returns the Greenwich prime meridian.
+     *
+     * @return The Greenwich prime meridian.
+     *
+     * @since 0.6
+     */
+    public PrimeMeridian getGreenwich() {
+        throw moduleNotFound();
+    }
+
+    /**
+     * Returns the coordinate system of a geocentric CRS using axes in the given unit of measurement.
+     *
+     * @param  unit The unit of measurement for the geocentric CRS axes.
+     * @return The coordinate system for a geocentric CRS with axes using the given unit of measurement.
+     *
+     * @since 0.6
+     */
+    public CartesianCS getGeocentricCS(final Unit<Length> unit) {
+        throw moduleNotFound();
+    }
+
+    /**
+     * Converts a geocentric coordinate system from the legacy WKT 1 to the current ISO 19111 standard.
+     * This method replaces the (Other, East, North) directions by (Geocentric X, Geocentric Y, Geocentric Z).
+     *
+     * @param  cs The geocentric coordinate system to upgrade.
+     * @return The upgraded coordinate system, or {@code cs} if this method can not upgrade the given CS.
+     *
+     * @since 0.6
+     */
+    public CartesianCS upgradeGeocentricCS(final CartesianCS cs) {
+        return cs;
+    }
+
+    /**
+     * Creates a coordinate system of unknown type. This method is used during parsing of WKT version 1,
+     * since that legacy format did not specified any information about the coordinate system in use.
+     * This method should not need to be invoked for parsing WKT version 2.
+     *
+     * @param  axes The axes of the unknown coordinate system.
+     * @return An "abstract" coordinate system using the given axes.
+     *
+     * @since 0.6
+     */
+    public CoordinateSystem createAbstractCS(final CoordinateSystemAxis[] axes) {
+        throw moduleNotFound();
+    }
+
+    /**
+     * Creates a derived CRS from the information found in a WKT 1 {@code FITTED_CS} element.
+     * This coordinate system can not be easily constructed from the information provided by the WKT 1 format.
+     * Note that this method is needed only for WKT 1 parsing, since WKT provides enough information for using
+     * the standard factories.
+     *
+     * @param  properties    The properties to be given to the {@code DerivedCRS} and {@code Conversion} objects.
+     * @param  baseCRS       Coordinate reference system to base the derived CRS on.
+     * @param  method        The coordinate operation method (mandatory in all cases).
+     * @param  baseToDerived Transform from positions in the base CRS to positions in this target CRS.
+     * @param  derivedCS     The coordinate system for the derived CRS.
+     * @return The newly created derived CRS, potentially implementing an additional CRS interface.
+     *
+     * @since 0.6
+     */
+    public DerivedCRS createDerivedCRS(final Map<String,?>    properties,
+                                       final SingleCRS        baseCRS,
+                                       final OperationMethod  method,
+                                       final MathTransform    baseToDerived,
+                                       final CoordinateSystem derivedCS)
+    {
+        throw moduleNotFound();
+    }
+
+    /**
+     * Creates the {@code TOWGS84} element during parsing of a WKT version 1. This is an optional operation:
+     * this method is allowed to return {@code null} if the "sis-referencing" module is not in the classpath.
+     *
+     * @param  values The 7 Bursa-Wolf parameter values.
+     * @return The {@link org.apache.sis.referencing.datum.BursaWolfParameters}, or {@code null}.
+     *
+     * @since 0.6
+     */
+    public Object createToWGS84(final double[] values) {
+        return null;
+    }
+
+    /**
+     * Returns the coordinate operation factory to use for the given properties and math transform factory.
+     * If the given properties are empty and the {@code mtFactory} is the system default, then this method
+     * returns the system default {@code CoordinateOperationFactory} instead of creating a new one.
+     *
+     * @param  properties The default properties.
+     * @param  mtFactory  The math transform factory to use.
+     * @return The coordinate operation factory to use.
+     *
+     * @since 0.6
+     */
+    public CoordinateOperationFactory getCoordinateOperationFactory(Map<String,?> properties, MathTransformFactory mtFactory) {
+        /*
+         * The check for 'properties' and 'mtFactory' is performed by the ServicesForMetadata subclass. If this code is
+         * executed, this means that the "sis-referencing" module is not on the classpath, in which case we do not know
+         * how to pass the 'properties' and 'mtFactory' arguments to the foreigner CoordinateOperationFactory anyway.
+         */
+        final CoordinateOperationFactory factory = DefaultFactories.forClass(CoordinateOperationFactory.class);
+        if (factory != null) {
+            return factory;
+        } else {
+            throw moduleNotFound();
+        }
+    }
+
+    /**
+     * Returns {@code true} if the {@linkplain org.apache.sis.referencing.AbstractIdentifiedObject#getName()
+     * primary name} or an aliases of the given object matches the given name. The comparison ignores case,
+     * some Latin diacritical signs and any characters that are not letters or digits.
+     *
+     * @param  object The object for which to check the name or alias.
+     * @param  name The name to compare with the object name or aliases.
+     * @return {@code true} if the primary name of at least one alias matches the specified {@code name}.
+     *
+     * @since 0.6
+     */
+    public boolean isHeuristicMatchForName(final IdentifiedObject object, final String name) {
+        return NameToIdentifier.isHeuristicMatchForName(object.getName(), object.getAlias(), name);
+    }
+
+    /**
+     * Returns {@code true} if the name or an identifier of the given method matches the given {@code identifier}.
+     *
+     * @param  method     The method to test for a match.
+     * @param  identifier The name or identifier of the operation method to search.
+     * @return {@code true} if the given method is a match for the given identifier.
+     *
+     * @since 0.6
+     */
+    private boolean matches(final OperationMethod method, final String identifier) {
+        if (isHeuristicMatchForName(method, identifier)) {
+            return true;
+        }
+        for (int s = identifier.indexOf(IDENTIFIER_SEPARATOR); s >= 0;
+                 s = identifier.indexOf(IDENTIFIER_SEPARATOR, s))
+        {
+            final String codespace = identifier.substring(0, s).trim();
+            final String code = identifier.substring(++s).trim();
+            for (final ReferenceIdentifier id : method.getIdentifiers()) {
+                if (codespace.equalsIgnoreCase(id.getCodeSpace()) && code.equalsIgnoreCase(id.getCode())) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Returns the operation method for the specified name or identifier. The given argument shall be either a
+     * method name (e.g. <cite>"Transverse Mercator"</cite>) or one of its identifiers (e.g. {@code "EPSG:9807"}).
+     *
+     * @param  methods The method candidates.
+     * @param  identifier The name or identifier of the operation method to search.
+     * @return The coordinate operation method for the given name or identifier, or {@code null} if none.
+     *
+     * @see org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory#getOperationMethod(String)
+     * @see org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory#getOperationMethod(String)
+     *
+     * @since 0.6
+     */
+    public final OperationMethod getOperationMethod(final Iterable<? extends OperationMethod> methods, final String identifier) {
+        OperationMethod fallback = null;
+        for (final OperationMethod method : methods) {
+            if (matches(method, identifier)) {
+                /*
+                 * Stop the iteration at the first non-deprecated method.
+                 * If we find only deprecated methods, take the first one.
+                 */
+                if (!(method instanceof Deprecable) || !((Deprecable) method).isDeprecated()) {
+                    return method;
+                }
+                if (fallback == null) {
+                    fallback = method;
+                }
+            }
+        }
+        return fallback;
+    }
+
+    /**
+     * Returns the coordinate operation method for the given classification.
+     * This method checks if the given {@code opFactory} is a SIS implementation
+     * before to fallback on a slower fallback.
+     *
+     * @param  opFactory  The coordinate operation factory to use if it is a SIS implementation.
+     * @param  mtFactory  The math transform factory to use as a fallback.
+     * @param  identifier The name or identifier of the operation method to search.
+     * @return The coordinate operation method for the given name or identifier.
+     * @throws FactoryException if an error occurred which searching for the given method.
+     *
+     * @since 0.6
+     */
+    public OperationMethod getOperationMethod(final CoordinateOperationFactory opFactory,
+            final MathTransformFactory mtFactory, final String identifier) throws FactoryException
+    {
+        final OperationMethod method = getOperationMethod(mtFactory.getAvailableMethods(SingleOperation.class), identifier);
+        if (method != null) {
+            return method;
+        }
+        throw new NoSuchIdentifierException(Errors.format(Errors.Keys.NoSuchOperationMethod_1, identifier), identifier);
+    }
 }

Copied: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java (from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java?p2=sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java&p1=sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java&r1=1683824&r2=1683837&rev=1683837&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -20,7 +20,7 @@ import java.util.Collection;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.PresentationForm;
-import org.opengis.metadata.citation.Responsibility;
+import org.opengis.metadata.citation.ResponsibleParty;
 import org.apache.sis.internal.simple.SimpleCitation;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.MetadataServices;
@@ -28,7 +28,7 @@ import org.apache.sis.metadata.iso.Immut
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.citation.DefaultOrganisation;
-import org.apache.sis.metadata.iso.citation.DefaultResponsibility;
+import org.apache.sis.metadata.iso.citation.DefaultResponsibleParty;
 import org.apache.sis.util.iso.Types;
 
 import static java.util.Collections.singleton;
@@ -152,8 +152,9 @@ public final class ServicesForUtility ex
         if (citedResponsibleParty != null) {
             final DefaultOrganisation organisation = new DefaultOrganisation();
             organisation.setName(Types.toInternationalString(citedResponsibleParty));
-            final DefaultResponsibility r = new DefaultResponsibility(Role.PRINCIPAL_INVESTIGATOR, null, organisation);
-            final Collection<Responsibility> parties = c.getCitedResponsibleParties();
+            final DefaultResponsibleParty r = new DefaultResponsibleParty(Role.PRINCIPAL_INVESTIGATOR);
+            r.setParties(singleton(organisation));
+            final Collection<ResponsibleParty> parties = c.getCitedResponsibleParties();
             if (parties != null) {
                 parties.add(r);
             } else {

Copied: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java (from r1683824, sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java?p2=sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java&p1=sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java&r1=1683824&r2=1683837&rev=1683837&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -532,7 +532,7 @@ final class GeodeticObjectParser extends
          * Element (usually a "PROJCS" element), not in this "PROJECTION" element.
          */
         try {
-            final OperationMethod method = opFactory.getOperationMethod(classification);
+            final OperationMethod method = referencing.getOperationMethod(opFactory, mtFactory, classification);
             final ParameterValueGroup parameters = method.getParameters().createValue();
             parseParameters(parent, parameters, linearUnit, angularUnit);
             return opFactory.createDefiningConversion(parseAuthorityAndClose(element, classification), method, parameters);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Symbols.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -69,7 +69,7 @@ import org.apache.sis.internal.jdk7.JDK7
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.6
  * @module
  *
  * @see WKTFormat#getSymbols()
@@ -167,6 +167,11 @@ public class Symbols implements Localize
     private String separator;
 
     /**
+     * Same value than {@link #separator} but without leading and trailing spaces.
+     */
+    private transient String trimmedSeparator;
+
+    /**
      * {@code true} if this instance shall be considered as immutable.
      */
     private boolean isImmutable;
@@ -178,13 +183,14 @@ public class Symbols implements Localize
      */
     public Symbols(final Symbols symbols) {
         ensureNonNull("symbols", symbols);
-        locale        = symbols.locale;
-        brackets      = symbols.brackets;
-        quotes        = symbols.quotes;
-        quote         = symbols.quote;
-        openSequence  = symbols.openSequence;
-        closeSequence = symbols.closeSequence;
-        separator     = symbols.separator;
+        locale           = symbols.locale;
+        brackets         = symbols.brackets;
+        quotes           = symbols.quotes;
+        quote            = symbols.quote;
+        openSequence     = symbols.openSequence;
+        closeSequence    = symbols.closeSequence;
+        separator        = symbols.separator;
+        trimmedSeparator = symbols.trimmedSeparator;
     }
 
     /**
@@ -192,14 +198,15 @@ public class Symbols implements Localize
      * The given array is stored by reference - it is not cloned.
      */
     private Symbols(final int[] brackets, final int[] quotes) {
-        this.locale        = Locale.ROOT;
-        this.brackets      = brackets;
-        this.quotes        = quotes;
-        this.quote         = "\"";
-        this.openSequence  = '{';
-        this.closeSequence = '}';
-        this.separator     = ", ";
-        this.isImmutable   = true;
+        this.locale           = Locale.ROOT;
+        this.brackets         = brackets;
+        this.quotes           = quotes;
+        this.quote            = "\"";
+        this.openSequence     = '{';
+        this.closeSequence    = '}';
+        this.separator        = ", ";
+        this.trimmedSeparator = ",";
+        this.isImmutable      = true;
     }
 
     /**
@@ -254,19 +261,26 @@ public class Symbols implements Localize
     }
 
     /**
-     * If the given character is an opening bracket, returns the matching closing bracket.
-     * Otherwise returns -1.
+     * Implementation of {@link #matchingBracket(int)} and {@link #matchingQuote(int)}.
      */
-    final int matchingBracket(final int c) {
-        for (int i=0; i<brackets.length; i+=2) {
-            if (brackets[i] == c) {
-                return brackets[i+1];
+    private static int matching(final int[] chars, final int c) {
+        for (int i = 0; i < chars.length; i += 2) {
+            if (chars[i] == c) {
+                return chars[i + 1];
             }
         }
         return -1;
     }
 
     /**
+     * If the given character is an opening bracket, returns the matching closing bracket.
+     * Otherwise returns -1.
+     */
+    final int matchingBracket(final int c) {
+        return matching(brackets, c);
+    }
+
+    /**
      * Returns the number of paired brackets. For example if the WKT parser accepts both the
      * {@code […]} and {@code (…)} bracket pairs, then this method returns 2.
      *
@@ -327,6 +341,14 @@ public class Symbols implements Localize
     }
 
     /**
+     * If the given character is an opening quote, returns the matching closing quote.
+     * Otherwise returns -1.
+     */
+    final int matchingQuote(final int c) {
+        return matching(quotes, c);
+    }
+
+    /**
      * Returns the number of paired quotes. For example if the WKT parser accepts both the
      * {@code "…"} and {@code “…”} quote pairs, then this method returns 2.
      *
@@ -476,8 +498,17 @@ public class Symbols implements Localize
      */
     public void setSeparator(final String separator) {
         checkWritePermission();
-        ensureNonEmpty("separator", separator);
+        final String s = CharSequences.trimWhitespaces(separator.trim());
+        ensureNonEmpty("separator", s);
         this.separator = separator;
+        trimmedSeparator = s;
+    }
+
+    /**
+     * Returns the separator without trailing spaces.
+     */
+    final String trimmedSeparator() {
+        return trimmedSeparator;
     }
 
     /**
@@ -691,6 +722,7 @@ public class Symbols implements Localize
             if (equals(CURLY_BRACKETS))  return CURLY_BRACKETS;
         }
         quote = String.valueOf(Character.toChars(quotes[1]));
+        trimmedSeparator = CharSequences.trimWhitespaces(separator.trim());
         return this;
     }
 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -19,14 +19,18 @@ package org.apache.sis.io.wkt;
 import java.util.Date;
 import java.util.Locale;
 import java.util.TimeZone;
+import java.util.Map;
+import java.util.HashMap;
 import java.io.IOException;
 import java.text.Format;
 import java.text.NumberFormat;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.text.ParsePosition;
+import java.text.ParseException;
 import javax.measure.unit.Unit;
 import javax.measure.unit.UnitFormat;
+import org.opengis.util.Factory;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.io.CompoundFormat;
@@ -176,6 +180,16 @@ public class WKTFormat extends CompoundF
     private transient Formatter formatter;
 
     /**
+     * The parser. Will be created when first needed.
+     */
+    private transient Parser parser;
+
+    /**
+     * The factories needed by the parser. Will be created when first needed.
+     */
+    private transient Map<Class<?>,Factory> factories;
+
+    /**
      * Creates a format for the given locale and timezone. The given locale will be used for
      * {@link org.opengis.util.InternationalString} localization; this is <strong>not</strong>
      * the locale for number format.
@@ -210,6 +224,7 @@ public class WKTFormat extends CompoundF
         if (!symbols.equals(this.symbols)) {
             this.symbols = symbols.immutable();
             formatter = null;
+            parser = null;
         }
     }
 
@@ -354,6 +369,7 @@ public class WKTFormat extends CompoundF
         ArgumentChecks.ensureNonNull("convention", convention);
         this.convention = convention;
         updateFormatter(formatter);
+        parser = null;
     }
 
     /**
@@ -456,15 +472,23 @@ public class WKTFormat extends CompoundF
     }
 
     /**
-     * Not yet supported.
+     * Creates an object from the given character sequence.
+     * The parsing begins at the index given by the {@code pos} argument.
      *
-     * @param  text The text to parse.
-     * @param  position The index of the first character to parse.
-     * @return The parsed object, or {@code null} in case of failure.
+     * @param  text The character sequence for the object to parse.
+     * @param  pos  The position where to start the parsing.
+     * @return The parsed object.
+     * @throws ParseException If an error occurred while parsing the object.
      */
     @Override
-    public Object parse(final CharSequence text, final ParsePosition position) {
-        throw new UnsupportedOperationException("Not supported yet.");
+    public Object parse(final CharSequence text, final ParsePosition pos) throws ParseException {
+        if (parser == null) {
+            if (factories == null) {
+                factories = new HashMap<Class<?>,Factory>();
+            }
+            parser = new GeodeticObjectParser(symbols, convention, false, getLocale(), factories);
+        }
+        return parser.parseObject(text.toString(), pos);
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -82,8 +82,15 @@ import org.apache.sis.util.logging.Loggi
 public abstract class AbstractMetadata implements LenientComparable, Emptiable {
     /**
      * The logger for messages related to metadata implementations.
+     *
+     * Note that another logger is provided with public access in the {@code iso} sub-package:
+     * {@link org.apache.sis.metadata.iso.ISOMetadata#LOGGER}. This {@code LOGGER} instance is
+     * kept package-privated for avoiding confusion (other sub-packages like {@code sql} should
+     * create their own logger). This logger is declared in a static field because otherwise,
+     * any configuration done by the user may be lost when the garbage-collector collects the
+     * logger.
      */
-    protected static final Logger LOGGER = Logging.getLogger(AbstractMetadata.class);
+    static final Logger LOGGER = Logging.getLogger(AbstractMetadata.class);
 
     /**
      * Creates an initially empty metadata.

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -128,7 +128,7 @@ final class PropertyInformation<E> exten
     PropertyInformation(final Citation standard, final String property, final Method getter,
             final Class<E> elementType, final ValueRange range)
     {
-        super(standard, property);
+        super(standard, property, getter.isAnnotationPresent(Deprecated.class));
         parent = getter.getDeclaringClass();
         this.elementType = elementType;
         final UML uml = getter.getAnnotation(UML.class);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -313,7 +313,7 @@ public class DefaultIdentifier extends I
 
     /**
      * Sets the organization or party responsible for definition and maintenance of the
-     * {@linkplain #getCode code}.
+     * {@linkplain #getCode() code}.
      *
      * @param newValue The new authority.
      */

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -910,6 +910,8 @@ public class DefaultMetadata extends ISO
 
     /**
      * Returns the citation(s) for the standard(s) to which the metadata conform.
+     * The collection returned by this method typically contains elements from the
+     * {@link org.apache.sis.metadata.iso.citation.Citations#ISO_19115} list.
      *
      * @return The standard(s) to which the metadata conform.
      *

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1683837&r1=1683836&r2=1683837&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Fri Jun  5 18:41:29 2015
@@ -430,12 +430,8 @@ public class ImmutableIdentifier extends
 
     /**
      * Organization or party responsible for definition and maintenance of the {@linkplain #getCode() code}.
-     * The organization's abbreviation is often the same than this identifier {@linkplain #getCodeSpace()
-     * code space}, but not necessarily.
-     *
-     * <div class="note"><b>Example:</b> Coordinate Reference System (CRS) identified by an EPSG code will return
-     * contact information for the <cite>International Association of Oil &amp; Gas producers</cite> (IOGP), since
-     * IOGP is the organization maintaining the EPSG geodetic database.</div>
+     * The organization's abbreviation is often the same than this identifier {@linkplain #getCodeSpace() code space},
+     * but not necessarily.
      *
      * @return The authority, or {@code null} if not available.
      */



Mime
View raw message