sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1675812 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-referencing/src/main/java/org/apache/sis/parameter/ sis-referencing/src/main/java/org/apache/sis/referencing/crs/ sis-referencing/src/main/ja...
Date Fri, 24 Apr 2015 09:54:44 GMT
Author: desruisseaux
Date: Fri Apr 24 09:54:43 2015
New Revision: 1675812

URL: http://svn.apache.org/r1675812
Log:
Referencing: consistently invoke public methods instead than fetching the values directly
from the private fields during WKT formatting.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -541,19 +541,30 @@ public class ImmutableIdentifier extends
     @Override
     protected String formatTo(final Formatter formatter) {
         String keyword = null;
+        /*
+         * The code, codeSpace, authority and version local variables in this method usually
have the exact same
+         * value than the fields of the same name in this class.  But we get those values
by invoking the public
+         * methods in order to give to users a chance to override those properties.  The
intend is also to use a
+         * consistent approach for all 'formatTo' implementations, since some other classes
have no choice other
+         * than using the public methods.
+         */
+        final String code = getCode();
         if (code != null) {
+            final String   codeSpace = getCodeSpace();
+            final Citation authority = getAuthority();
             final String cs = (codeSpace != null) ? codeSpace :
                     org.apache.sis.internal.util.Citations.getIdentifier(authority, true);
             if (cs != null) {
                 final Convention convention = formatter.getConvention();
                 if (convention.majorVersion() == 1) {
                     keyword = "Authority";
-                    formatter.append(cs, ElementKind.IDENTIFIER);
+                    formatter.append(cs,   ElementKind.IDENTIFIER);
                     formatter.append(code, ElementKind.IDENTIFIER);
                 } else {
                     keyword = "Id";
                     formatter.append(cs, ElementKind.IDENTIFIER);
                     appendCode(formatter, code);
+                    final String version = getVersion();
                     if (version != null) {
                         appendCode(formatter, version);
                     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -827,6 +827,7 @@ public class DefaultParameterValue<T> ex
      */
     @Override
     protected String formatTo(final Formatter formatter) {
+        final ParameterDescriptor<T> descriptor = getDescriptor();  // Gives to users
a chance to override this property.
         WKTUtilities.appendName(descriptor, formatter, ElementKind.PARAMETER);
         final Unit<?> targetUnit = formatter.toContextualUnit(descriptor.getUnit());
         final Convention convention = formatter.getConvention();
@@ -836,6 +837,7 @@ public class DefaultParameterValue<T> ex
          * If this parameter value does not use the same unit, then we must convert it.
          * Otherwise we can write the value as-is.
          */
+        final Unit<?> unit = getUnit();  // Gives to users a chance to override this
property.
         if (isWKT1 && targetUnit != null) {
             double convertedValue;
             try {
@@ -848,6 +850,7 @@ public class DefaultParameterValue<T> ex
             }
             formatter.append(convertedValue);
         } else {
+            final T value = getValue();  // Gives to users a chance to override this property.
             if (!isWKT1 && (unit == null) && (value instanceof URI || value
instanceof URL
                     || value instanceof File || value instanceof Path))
             {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -467,7 +467,7 @@ public class AbstractCRS extends Abstrac
     @Override
     protected String formatTo(final Formatter formatter) {
         final String  keyword = super.formatTo(formatter);
-        final CoordinateSystem cs = coordinateSystem;
+        final CoordinateSystem cs = getCoordinateSystem();
         final boolean isWKT1  = formatter.getConvention().majorVersion() == 1;
         final Unit<?> unit    = ReferencingUtilities.getUnit(cs);
         final Unit<?> oldUnit = formatter.addContextualUnit(unit);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -215,6 +215,7 @@ class AbstractDerivedCRS extends Abstrac
     @Override
     protected String formatTo(final Formatter formatter) {
         WKTUtilities.appendName(this, formatter, null);
+        final Conversion conversionFromBase = getConversionFromBase();  // Gives to users
a chance to override.
         MathTransform inverse = conversionFromBase.getMathTransform();
         try {
             inverse = inverse.inverse();

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -424,7 +424,7 @@ public class DefaultCompoundCRS extends
         final Convention convention = formatter.getConvention();
         final boolean isWKT1 = convention.majorVersion() == 1;
         for (final CoordinateReferenceSystem element :
-                (isWKT1 || convention == Convention.INTERNAL) ? components : singles)
+                (isWKT1 || convention == Convention.INTERNAL) ? getComponents() : getSingleComponents())
         {
             formatter.newLine();
             formatter.append(toFormattable(element));

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -174,6 +174,7 @@ class DefaultGeodeticCRS extends Abstrac
         final boolean isWKT1  = formatter.getConvention().majorVersion() == 1;
         final Unit<?> unit    = getUnit();
         final Unit<?> oldUnit = formatter.addContextualUnit(unit);
+        final GeodeticDatum datum = getDatum();   // Gives to users a chance to override
this property.
         formatter.newLine();
         formatter.append(toFormattable(datum));
         formatter.newLine();
@@ -181,7 +182,7 @@ class DefaultGeodeticCRS extends Abstrac
         formatter.append(toFormattable(datum.getPrimeMeridian()));
         formatter.indent(isWKT1 ? 0 : -1);
         formatter.newLine();
-        CoordinateSystem cs = super.getCoordinateSystem();
+        CoordinateSystem cs = getCoordinateSystem();
         if (isWKT1) { // WKT 1 writes unit before axes, while WKT 2 writes them after axes.
             formatter.append(unit);
             if (unit == null) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -298,7 +298,7 @@ public class DefaultProjectedCRS extends
         formatter.removeContextualUnit(geoUnit);
         formatter.addContextualUnit(angularUnit);
         formatter.addContextualUnit(linearUnit);
-        formatter.newLine(); // For writing the Id[…] element on its own line.
+        formatter.newLine(); // For writing the ID[…] element on its own line.
         return "ProjCS";
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -446,7 +446,7 @@ public class AbstractCS extends Abstract
             formatter.setInvalidWKT(this, null);
         }
         formatter.append(type, null);
-        formatter.append(axes.length);
+        formatter.append(getDimension());
         return "CS";
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -759,8 +759,8 @@ public class DefaultCoordinateSystemAxis
     @Override
     protected String formatTo(final Formatter formatter) {
         final Convention convention = formatter.getConvention();
-        final boolean isWKT1 = convention.majorVersion() == 1;
-        final boolean isInternal = (convention == Convention.INTERNAL);
+        final boolean    isWKT1     = (convention.majorVersion() == 1);
+        final boolean    isInternal = (convention == Convention.INTERNAL);
         String name = null;
         if (isWKT1 || isInternal || !omitName(formatter)) {
             name = IdentifiedObjects.getName(this, formatter.getNameAuthority());
@@ -780,7 +780,7 @@ public class DefaultCoordinateSystemAxis
          * The specification also suggests to write only the abbreviation (e.g. "(X)") in
the
          * special case of Geocentric axis, and disallows Greek letters.
          */
-        String a = abbreviation;
+        String a = getAbbreviation();
         if (!isWKT1 && (a != null) && !a.equals(name)) {
             if (!isInternal && a.length() == 1) {
                 switch (a.charAt(0)) {
@@ -829,7 +829,7 @@ public class DefaultCoordinateSystemAxis
          * Format the axis direction, optionally followed by a MERIDIAN[…] element
          * if the direction is of the kind "South along 90°N" for instance.
          */
-        AxisDirection dir = direction;
+        AxisDirection dir = getDirection();
         DirectionAlongMeridian meridian = null;
         if (!isWKT1 && AxisDirections.isUserDefined(dir)) {
             meridian = DirectionAlongMeridian.parse(dir);
@@ -845,7 +845,7 @@ public class DefaultCoordinateSystemAxis
          * to all axes (we do not verify).
          */
         if (!isWKT1 && !formatter.hasContextualUnit(1)) {
-            formatter.append(unit);
+            formatter.append(getUnit());
         }
         return "Axis";
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -609,7 +609,7 @@ public class BursaWolfParameters extends
             return "ToWGS84";
         }
         formatter.setInvalidWKT(BursaWolfParameters.class, null);
-        String name = IdentifiedObjects.getUnicodeIdentifier(targetDatum);
+        String name = IdentifiedObjects.getUnicodeIdentifier(getTargetDatum());
         if (name == null) {
             name = "Unknown";
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -761,13 +761,15 @@ public class DefaultEllipsoid extends Ab
     @Override
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
-        final Convention convention = formatter.getConvention();
-        final boolean isWKT1 = convention.majorVersion() == 1;
-        double length = semiMajorAxis;
+        final Convention   convention = formatter.getConvention();
+        final boolean      isWKT1     = convention.majorVersion() == 1;
+        final Unit<Length> unit       = getAxisUnit();  // Gives to users a chance
to override properties.
+        double length = getSemiMajorAxis();
         if (isWKT1) {
             length = unit.getConverterTo(SI.METRE).convert(length);
         }
         formatter.append(length);
+        final double inverseFlattening = getInverseFlattening();  // Gives to users a chance
to override properties.
         formatter.append(isInfinite(inverseFlattening) ? 0 : inverseFlattening);
         if (isWKT1) {
             return "Spheroid";

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -536,7 +536,7 @@ public class DefaultGeodeticDatum extend
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
         formatter.newLine();
-        formatter.append(toFormattable(ellipsoid));
+        formatter.append(toFormattable(getEllipsoid()));
         if (formatter.getConvention().majorVersion() == 1) {
             /*
              * Note that at the different of other datum (in particular vertical datum),

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -245,7 +245,7 @@ public class DefaultImageDatum extends A
         super.formatTo(formatter);
         final Convention convention = formatter.getConvention();
         if (convention == Convention.INTERNAL) {
-            formatter.append(pixelInCell); // This is an extension compared to ISO 19162.
+            formatter.append(getPixelInCell());         // This is an extension compared
to ISO 19162.
         } else if (convention.majorVersion() == 1) {
             formatter.setInvalidWKT(this, null);
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -349,10 +349,11 @@ public class DefaultPrimeMeridian extend
         if (targetUnit == null) {
             targetUnit = NonSI.DEGREE_ANGLE;
         }
-        formatter.append(isWKT1 ? getGreenwichLongitude(targetUnit) : greenwichLongitude);
+        formatter.append(isWKT1 ? getGreenwichLongitude(targetUnit) : getGreenwichLongitude());
         if (isWKT1) {
             return "PrimeM";
         }
+        final Unit<Angle> angularUnit = getAngularUnit();   // Gives to users a chance
to override properties.
         if (!convention.isSimplified() || !targetUnit.equals(angularUnit)) {
             formatter.append(angularUnit);
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -289,7 +289,7 @@ public class DefaultTemporalDatum extend
     @Override
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
-        formatter.append(new Origin(MetadataUtilities.toDate(origin)));
+        formatter.append(new Origin(getOrigin()));
         if (formatter.getConvention().majorVersion() == 1) {
             formatter.setInvalidWKT(this, null);
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java?rev=1675812&r1=1675811&r2=1675812&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java
[UTF-8] Fri Apr 24 09:54:43 2015
@@ -180,11 +180,12 @@ public class DefaultFormula extends Form
     @Override
     protected String formatTo(final Formatter formatter) {
         InternationalString text = null;
+        final Citation citation = getCitation();    // Gives to users a chance to override
properties.
         if (citation != null) {
             text = citation.getTitle();
         }
         if (text == null) {
-            text = formula;
+            text = getFormula();
         }
         if (text != null) {
             formatter.append(text.toString(formatter.getLocale()), ElementKind.REMARKS);



Mime
View raw message