Author: desruisseaux
Date: Fri Sep 4 13:07:27 2015
New Revision: 1701242
URL: http://svn.apache.org/r1701242
Log:
Group together the private methods that are provided only for JAXB support.
The intend is to isolate what will need to be removed when porting to Android,
or to make easier the task for anyone who decide that he doesn't need XML.
As a side effect it makes more visible the cost of supporting this format
since we can see the amount of code added in some classes.
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.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/parameter/DefaultParameterValueGroup.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.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/DefaultDerivedCRS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.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/DefaultGeographicCRS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.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/crs/DefaultTemporalCRS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.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/DefaultAffineCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.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/cs/DefaultCylindricalCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.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/DefaultEngineeringDatum.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/datum/DefaultVerticalDatum.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultTransformation.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -1416,6 +1416,20 @@ public class DefaultMetadata extends ISO
resourceLineages = writeCollection(newValues, resourceLineages,
Lineage.class);
}
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
/**
* Invoked by JAXB {@link javax.xml.bind.Marshaller} before this object is
marshalled to XML.
* This method sets the locale to be used for XML marshalling to the
metadata language.
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -174,6 +174,20 @@ public class ISOMetadata extends Modifia
return new IdentifierMapWithSpecialCases(identifiers);
}
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
/**
* Returns an identifier unique for the XML document, or {@code null} if
none.
* This method is invoked automatically by JAXB and should never be
invoked explicitely.
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=1701242&r1=1701241&r2=1701242&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 Sep 4 13:07:27 2015
@@ -178,17 +178,6 @@ public class ImmutableIdentifier extends
private final InternationalString description;
/**
- * Empty constructor for JAXB.
- */
- private ImmutableIdentifier() {
- code = null;
- codeSpace = null;
- authority = null;
- version = null;
- description = null;
- }
-
- /**
* Creates a new identifier from the specified one. This is a copy
constructor which
* get the code, codespace, authority and version from the given
identifier.
*
@@ -677,4 +666,29 @@ public class ImmutableIdentifier extends
return WKTKeywords.URI;
}
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Empty constructor for JAXB.
+ */
+ private ImmutableIdentifier() {
+ code = null;
+ codeSpace = null;
+ authority = null;
+ version = null;
+ description = null;
+ }
}
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -241,13 +241,23 @@ public class DefaultCoupledResource exte
- // Bridges for elements from legacy ISO 19119
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
/**
* For JAXB marhalling of ISO 19119 document only.
*/
@XmlElement(name = "operationName", namespace = Namespaces.SRV)
- final String getOperationName() {
+ private String getOperationName() {
if (LEGACY_XML) {
final OperationMetadata operation = getOperation();
if (operation != null) {
@@ -262,7 +272,7 @@ public class DefaultCoupledResource exte
* {@link OperationName} placeholder. That temporary instance will be
replaced by the real
* one when the enclosing {@link DefaultServiceIdentification} is
unmarshalled.
*/
- final void setOperationName(final String name) {
+ private void setOperationName(final String name) {
if (operation == null) {
operation = new OperationName(name);
}
@@ -272,7 +282,7 @@ public class DefaultCoupledResource exte
* Returns the resource identifier, which is assumed to be the name as a
string.
*/
@XmlElement(name = "identifier", namespace = Namespaces.SRV)
- final String getIdentifier() {
+ private String getIdentifier() {
if (LEGACY_XML) {
final ScopedName name = getScopedName();
if (name != null) {
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -246,7 +246,17 @@ public class DefaultDataIdentification e
- // Bridges for elements from legacy ISO 19115:2003
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
/**
* For JAXB marhalling of ISO 19115:2003 document only.
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -311,6 +311,7 @@ public class DefaultRepresentativeFracti
* Those identifiers are marshalled in XML as {@code id} or {@code uuid}
attributes.
*/
@Override
+ @SuppressWarnings("ReturnOfCollectionOrArrayField")
public Collection<Identifier> getIdentifiers() {
if (identifiers == null) {
identifiers = new CheckedArrayList<>(Identifier.class);
@@ -328,6 +329,20 @@ public class DefaultRepresentativeFracti
return new IdentifierMapWithSpecialCases(getIdentifiers());
}
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
/**
* Invoked by JAXB for fetching the unique identifier unique for the XML
document.
*
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -445,6 +445,20 @@ public class DefaultServiceIdentificatio
containsChain = writeCollection(newValues, containsChain,
OperationChainMetadata.class);
}
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
/**
* Invoked after JAXB has unmarshalled this object.
*/
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -135,17 +135,6 @@ public abstract class AbstractParameterD
private short maximumOccurs;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- AbstractParameterDescriptor() {
-
super(org.apache.sis.internal.referencing.NilReferencingObject.INSTANCE);
- minimumOccurs = DEFAULT_OCCURRENCE; // Default value if XML element
is omitted.
- maximumOccurs = DEFAULT_OCCURRENCE;
- }
-
- /**
* Constructs a parameter descriptor from a set of properties. The
properties map is given unchanged to the
* {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map)
super-class constructor}.
* The following table is a reminder of main (not all) properties:
@@ -384,6 +373,17 @@ public abstract class AbstractParameterD
//////////////////////////////////////////////////////////////////////////////////////////////////
/**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ AbstractParameterDescriptor() {
+
super(org.apache.sis.internal.referencing.NilReferencingObject.INSTANCE);
+ minimumOccurs = DEFAULT_OCCURRENCE; // Default value if XML element
is omitted.
+ maximumOccurs = DEFAULT_OCCURRENCE;
+ }
+
+ /**
* Invoked by JAXB for marshalling the {@link #minimumOccurs} value. Omit
marshalling of this
* {@code gml:minimumOccurs} element if its value is equals to the default
value, which is 1.
*/
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -121,37 +121,6 @@ public class DefaultParameterDescriptor<
private final T defaultValue;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- *
- * <p>This constructor fetches the value class and the unit of measurement
from the enclosing
- * {@link DefaultParameterValue}, if presents, because those information
are not presents in GML.
- * They are GeoAPI additions.</p>
- */
- @SuppressWarnings("unchecked")
- private DefaultParameterDescriptor() {
- final PropertyType<?,?> wrapper =
Context.getWrapper(Context.current());
- if (wrapper instanceof CC_OperationParameter) {
- final CC_OperationParameter param = (CC_OperationParameter)
wrapper;
- /*
- * This unsafe cast would be forbidden if this constructor was
public or used in any context where the
- * user can choose the value of <T>. But this constructor should
be invoked only during unmarshalling,
- * after the creation of the ParameterValue (this is the reverse
creation order than what we normally
- * do through the public API). The 'valueClass' should be
compatible with DefaultParameterValue.value,
- * and the parameterized type visible to the user should be only
<?>.
- */
- valueClass = (Class) param.valueClass;
- valueDomain = param.valueDomain;
- } else {
- valueClass = null;
- valueDomain = null;
- }
- validValues = null;
- defaultValue = null;
- }
-
- /**
* Constructs a descriptor from the given properties. The properties map
is given unchanged to the
* {@linkplain
AbstractParameterDescriptor#AbstractParameterDescriptor(Map, int, int)
super-class constructor}.
* The following table is a reminder of main (not all) properties:
@@ -537,4 +506,50 @@ public class DefaultParameterDescriptor<
protected long computeHashCode() {
return Arrays.deepHashCode(new Object[] {valueClass, valueDomain,
defaultValue}) + super.computeHashCode();
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ *
+ * <p>This constructor fetches the value class and the unit of measurement
from the enclosing
+ * {@link DefaultParameterValue}, if presents, because those information
are not presents in GML.
+ * They are GeoAPI additions.</p>
+ */
+ @SuppressWarnings("unchecked")
+ private DefaultParameterDescriptor() {
+ final PropertyType<?,?> wrapper =
Context.getWrapper(Context.current());
+ if (wrapper instanceof CC_OperationParameter) {
+ final CC_OperationParameter param = (CC_OperationParameter)
wrapper;
+ /*
+ * This unsafe cast would be forbidden if this constructor was
public or used in any context where the
+ * user can choose the value of <T>. But this constructor should
be invoked only during unmarshalling,
+ * after the creation of the ParameterValue (this is the reverse
creation order than what we normally
+ * do through the public API). The 'valueClass' should be
compatible with DefaultParameterValue.value,
+ * and the parameterized type visible to the user should be only
<?>.
+ */
+ valueClass = (Class) param.valueClass;
+ valueDomain = param.valueDomain;
+ } else {
+ valueClass = null;
+ valueDomain = null;
+ }
+ validValues = null;
+ defaultValue = null;
+ }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -110,17 +110,6 @@ public class DefaultParameterDescriptorG
private List<GeneralParameterDescriptor> descriptors;
/**
- * Constructs a new object in which every attributes are set to a null
value or an empty list.
- * <strong>This is not a valid object.</strong> This constructor is
strictly reserved to JAXB
- * and to {@link DefaultParameterValueGroup}, which will assign values
later.
- *
- * @see #setDescriptors(GeneralParameterDescriptor[])
- */
- DefaultParameterDescriptorGroup() {
- descriptors = Collections.emptyList();
- }
-
- /**
* Constructs a parameter group from a set of properties. The properties
map is given unchanged to the
* {@linkplain
AbstractParameterDescriptor#AbstractParameterDescriptor(Map, int, int)
super-class constructor}.
* The following table is a reminder of main (not all) properties:
@@ -436,6 +425,17 @@ public class DefaultParameterDescriptorG
//////////////////////////////////////////////////////////////////////////////////////////////////
/**
+ * Constructs a new object in which every attributes are set to a null
value or an empty list.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly reserved to JAXB
+ * and to {@link DefaultParameterValueGroup}, which will assign values
later.
+ *
+ * @see #setDescriptors(GeneralParameterDescriptor[])
+ */
+ DefaultParameterDescriptorGroup() {
+ descriptors = Collections.emptyList();
+ }
+
+ /**
* Invoked by JAXB for getting the parameters to marshal.
*/
@XmlElement(name = "parameter", required = true)
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=1701242&r1=1701241&r2=1701242&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 Sep 4 13:07:27 2015
@@ -161,13 +161,6 @@ public class DefaultParameterValue<T> ex
private Unit<?> unit;
/**
- * Default constructor for JAXB only. The descriptor is initialized to
{@code null},
- * but will be assigned a value after XML unmarshalling.
- */
- private DefaultParameterValue() {
- }
-
- /**
* Creates a parameter value from the specified descriptor.
* The value will be initialized to the default value, if any.
*
@@ -1017,6 +1010,25 @@ public class DefaultParameterValue<T> ex
//////////////////////////////////////////////////////////////////////////////////////////////////
/**
+ * Default constructor for JAXB only. The descriptor is initialized to
{@code null},
+ * but will be assigned a value after XML unmarshalling.
+ */
+ private DefaultParameterValue() {
+ }
+
+ /**
+ * Invoked by JAXB at unmarshalling time.
+ * May also be invoked by {@link DefaultParameterValueGroup} if the
descriptor as been completed
+ * with additional information provided in the {@code <gml:group>} element
of a descriptor group.
+ *
+ * @see #getDescriptor()
+ */
+ final void setDescriptor(final ParameterDescriptor<T> descriptor) {
+ this.descriptor = descriptor;
+ assert (value == null) || descriptor.getValueClass().isInstance(value)
: this;
+ }
+
+ /**
* Invoked by JAXB for obtaining the object to marshal.
* The property name depends on its type after conversion by this method.
*/
@@ -1099,16 +1111,4 @@ public class DefaultParameterValue<T> ex
ReferencingUtilities.propertyAlreadySet(DefaultParameterValue.class,
"setXmlValue", "value");
}
}
-
- /**
- * Invoked by JAXB at unmarshalling time.
- * May also be invoked by {@link DefaultParameterValueGroup} if the
descriptor as been completed
- * with additional information provided in the {@code <gml:group>} element
of a descriptor group.
- *
- * @see #getDescriptor()
- */
- final void setDescriptor(final ParameterDescriptor<T> descriptor) {
- this.descriptor = descriptor;
- assert (value == null) || descriptor.getValueClass().isInstance(value)
: this;
- }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -133,13 +133,6 @@ public class DefaultParameterValueGroup
private ParameterValueList values;
/**
- * Default constructor for JAXB only. The values list is initialized to
{@code null},
- * but will be assigned a value after XML unmarshalling.
- */
- private DefaultParameterValueGroup() {
- }
-
- /**
* Creates a parameter group from the specified descriptor.
*
* <p><b>Usage note:</b> {@code ParameterValueGroup} are usually not
instantiated directly. Instead, consider
@@ -520,6 +513,29 @@ public class DefaultParameterValueGroup
//////////////////////////////////////////////////////////////////////////////////////////////////
/**
+ * Default constructor for JAXB only. The values list is initialized to
{@code null},
+ * but will be assigned a value after XML unmarshalling.
+ */
+ private DefaultParameterValueGroup() {
+ }
+
+ /**
+ * Invoked by JAXB for setting the group parameter descriptor. Those
parameter are redundant with
+ * the parameters associated to the values given to {@link
#setValues(GeneralParameterValue[])},
+ * except the the group identification (name, <i>etc.</i>) and for any
optional parameters which
+ * were not present in the above {@code GeneralParameterValue} array.
+ *
+ * @see #getDescriptor()
+ */
+ private void setDescriptor(final ParameterDescriptorGroup descriptor) {
+ if (values == null) {
+ values = new ParameterValueList(descriptor);
+ } else {
+
ReferencingUtilities.propertyAlreadySet(DefaultParameterValue.class,
"setDescriptor", "group");
+ }
+ }
+
+ /**
* Invoked by JAXB for getting the parameters to marshal.
*/
@XmlElement(name = "parameterValue", required = true)
@@ -584,20 +600,4 @@ public class DefaultParameterValueGroup
}
values = addTo;
}
-
- /**
- * Invoked by JAXB for setting the group parameter descriptor. Those
parameter are redundant with
- * the parameters associated to the values given to {@link
#setValues(GeneralParameterValue[])},
- * except the the group identification (name, <i>etc.</i>) and for any
optional parameters which
- * were not present in the above {@code GeneralParameterValue} array.
- *
- * @see #getDescriptor()
- */
- private void setDescriptor(final ParameterDescriptorGroup descriptor) {
- if (values == null) {
- values = new ParameterValueList(descriptor);
- } else {
-
ReferencingUtilities.propertyAlreadySet(DefaultParameterValue.class,
"setDescriptor", "group");
- }
- }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -224,16 +224,6 @@ public class AbstractIdentifiedObject ex
private transient int hashCode;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- AbstractIdentifiedObject() {
- remarks = null;
- deprecated = false;
- }
-
- /**
* Constructs an object from the given properties. Keys are strings from
the table below.
* The map given in argument shall contain an entry at least for the
* {@value org.opengis.referencing.IdentifiedObject#NAME_KEY} or
@@ -534,146 +524,6 @@ public class AbstractIdentifiedObject ex
}
/**
- * Returns a single element from the {@code Set<Identifier>} collection,
or {@code null} if none.
- * We have to define this method because ISO 19111 defines the {@code
identifiers} property as a collection
- * while GML 3.2 defines it as a singleton.
- *
- * <p>This method searches for the following identifiers, in preference
order:</p>
- * <ul>
- * <li>The first identifier having a code that begin with {@code
"urn:"}.</li>
- * <li>The first identifier having a code that begin with {@code
"http:"}.</li>
- * <li>The first identifier, converted to the {@code "urn:} syntax if
possible.</li>
- * </ul>
- */
- @XmlElement(name = "identifier")
- final Code getIdentifier() {
- return Code.forIdentifiedObject(getClass(), identifiers);
- }
-
- /**
- * Invoked by JAXB at unmarshalling time for setting the identifier.
- */
- private void setIdentifier(final Code identifier) {
- if (identifiers == null) {
- if (identifier != null) {
- final Identifier id = identifier.getIdentifier();
- if (id != null) {
- identifiers = Collections.singleton(id);
- }
- }
- } else {
-
ReferencingUtilities.propertyAlreadySet(AbstractIdentifiedObject.class,
"setIdentifier", "identifier");
- }
- }
-
- /**
- * A writable view over the {@linkplain AbstractIdentifiedObject#getName()
name} of the enclosing object followed
- * by all {@linkplain AbstractIdentifiedObject#getAlias() aliases} which
are instance of {@link Identifier}.
- * Used by JAXB only at (un)marshalling time because GML merges the name
and aliases in a single {@code <gml:name>}
- * property.
- */
- private final class Names extends AbstractCollection<Identifier> {
- /**
- * Invoked by JAXB before to write in the collection at unmarshalling
time.
- * Do nothing since our object is already empty.
- */
- @Override
- public void clear() {
- }
-
- /**
- * Returns the number of name and aliases that are instance of {@link
Identifier}.
- */
- @Override
- public int size() {
- return NameIterator.count(AbstractIdentifiedObject.this);
- }
-
- /**
- * Returns an iterator over the name and aliases that are instance of
{@link Identifier}.
- */
- @Override
- public Iterator<Identifier> iterator() {
- return new NameIterator(AbstractIdentifiedObject.this);
- }
-
- /**
- * Invoked by JAXB at unmarshalling time for each identifier. The
first identifier will be taken
- * as the name and all other identifiers (if any) as aliases.
- *
- * <p>Some (but not all) JAXB implementations never invoke setter
method for collections.
- * Instead they invoke {@link AbstractIdentifiedObject#getNames()} and
add directly the identifiers
- * in the returned collection. Consequently this method must writes
directly in the enclosing object.
- * See <a href="https://java.net/jira/browse/JAXB-488">JAXB-488</a>
for more information.</p>
- */
- @Override
- public boolean add(final Identifier id) {
- addName(id);
- return true;
- }
- }
-
- /**
- * Implementation of {@link Names#add(Identifier)}, defined in the
enclosing class
- * for access to private fields without compiler-generated bridge methods.
- */
- final void addName(final Identifier id) {
- if (name == NilReferencingObject.UNNAMED) {
- name = id;
- } else {
- /*
- * Our Code and RS_Identifier implementations should always create
NamedIdentifier instance,
- * so the 'instanceof' check should not be necessary. But we do a
paranoiac check anyway.
- */
- final GenericName n = id instanceof GenericName ? (GenericName) id
: new NamedIdentifier(id);
- if (alias == null) {
- alias = Collections.singleton(n);
- } else {
- /*
- * This implementation is inefficient since each addition
copies the array, but we rarely
- * have more than two aliases. This implementation is okay
for a small number of aliases
- * and ensures that the enclosing AbstractIdentifiedObject is
unmodifiable except by this
- * add(…) method.
- *
- * Note about alternative approaches
- * ---------------------------------
- * An alternative approach could be to use an ArrayList and
replace it by an unmodifiable
- * list only after unmarshalling (using an
afterUnmarshal(Unmarshaller, Object) method),
- * but we want to avoid Unmarshaller dependency (for reducing
classes loading for users
- * who are not interrested in XML) and it may actually be less
efficient for the vast
- * majority of cases where there is less than 3 aliases.
- */
- final int size = alias.size();
- final GenericName[] names = alias.toArray(new GenericName[size
+ 1]);
- names[size] = n;
- alias = UnmodifiableArrayList.wrap(names);
- }
- }
- }
-
- /**
- * Returns the {@link #name} and all aliases which are also instance of
{@link Identifier}.
- * The later happen often in SIS implementation since many aliases are
instance of {@link NamedIdentifier}.
- *
- * <p>The returned collection is <cite>live</cite>: adding elements in
that collection will modify this
- * {@code AbstractIdentifiedObject} instance. This is needed for
unmarshalling with JAXB and should not
- * be used in other context.</p>
- *
- * <div class="section">Why there is no <code>setNames(…)</code>
method</div>
- * Some JAXB implementations never invoke setter method for collections.
Instead they invoke the getter and
- * add directly the identifiers in the returned collection. Whether JAXB
will perform or not a final call to
- * {@code setNames(…)} is JAXB-implementation dependent (JDK7 does but
JDK6 and JDK8 early access do not).
- * It seems a more portable approach (at least for JAXB reference
implementations) to design our class
- * without setter method, in order to have the same behavior on all
supported JDK versions.
- *
- * @see <a href="https://java.net/jira/browse/JAXB-488">JAXB-488</a>
- */
- @XmlElement(name = "name", required = true)
- final Collection<Identifier> getNames() {
- return new Names();
- }
-
- /**
* Returns the primary name by which this object is identified.
*
* @return The primary name.
@@ -1070,4 +920,168 @@ public class AbstractIdentifiedObject ex
WKTUtilities.appendName(this, formatter,
ElementKind.forType(getClass()));
return null;
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ AbstractIdentifiedObject() {
+ remarks = null;
+ deprecated = false;
+ }
+
+ /**
+ * Returns a single element from the {@code Set<Identifier>} collection,
or {@code null} if none.
+ * We have to define this method because ISO 19111 defines the {@code
identifiers} property as a collection
+ * while GML 3.2 defines it as a singleton.
+ *
+ * <p>This method searches for the following identifiers, in preference
order:</p>
+ * <ul>
+ * <li>The first identifier having a code that begin with {@code
"urn:"}.</li>
+ * <li>The first identifier having a code that begin with {@code
"http:"}.</li>
+ * <li>The first identifier, converted to the {@code "urn:} syntax if
possible.</li>
+ * </ul>
+ */
+ @XmlElement(name = "identifier")
+ final Code getIdentifier() {
+ return Code.forIdentifiedObject(getClass(), identifiers);
+ }
+
+ /**
+ * Invoked by JAXB at unmarshalling time for setting the identifier.
+ */
+ private void setIdentifier(final Code identifier) {
+ if (identifiers == null) {
+ if (identifier != null) {
+ final Identifier id = identifier.getIdentifier();
+ if (id != null) {
+ identifiers = Collections.singleton(id);
+ }
+ }
+ } else {
+
ReferencingUtilities.propertyAlreadySet(AbstractIdentifiedObject.class,
"setIdentifier", "identifier");
+ }
+ }
+
+ /**
+ * Returns the {@link #name} and all aliases which are also instance of
{@link Identifier}.
+ * The later happen often in SIS implementation since many aliases are
instance of {@link NamedIdentifier}.
+ *
+ * <p>The returned collection is <cite>live</cite>: adding elements in
that collection will modify this
+ * {@code AbstractIdentifiedObject} instance. This is needed for
unmarshalling with JAXB and should not
+ * be used in other context.</p>
+ *
+ * <div class="section">Why there is no <code>setNames(…)</code>
method</div>
+ * Some JAXB implementations never invoke setter method for collections.
Instead they invoke the getter and
+ * add directly the identifiers in the returned collection. Whether JAXB
will perform or not a final call to
+ * {@code setNames(…)} is JAXB-implementation dependent (JDK7 does but
JDK6 and JDK8 early access do not).
+ * It seems a more portable approach (at least for JAXB reference
implementations) to design our class
+ * without setter method, in order to have the same behavior on all
supported JDK versions.
+ *
+ * @see <a href="https://java.net/jira/browse/JAXB-488">JAXB-488</a>
+ */
+ @XmlElement(name = "name", required = true)
+ final Collection<Identifier> getNames() {
+ return new Names();
+ }
+
+ /**
+ * A writable view over the {@linkplain AbstractIdentifiedObject#getName()
name} of the enclosing object followed
+ * by all {@linkplain AbstractIdentifiedObject#getAlias() aliases} which
are instance of {@link Identifier}.
+ * Used by JAXB only at (un)marshalling time because GML merges the name
and aliases in a single {@code <gml:name>}
+ * property.
+ */
+ private final class Names extends AbstractCollection<Identifier> {
+ /**
+ * Invoked by JAXB before to write in the collection at unmarshalling
time.
+ * Do nothing since our object is already empty.
+ */
+ @Override
+ public void clear() {
+ }
+
+ /**
+ * Returns the number of name and aliases that are instance of {@link
Identifier}.
+ */
+ @Override
+ public int size() {
+ return NameIterator.count(AbstractIdentifiedObject.this);
+ }
+
+ /**
+ * Returns an iterator over the name and aliases that are instance of
{@link Identifier}.
+ */
+ @Override
+ public Iterator<Identifier> iterator() {
+ return new NameIterator(AbstractIdentifiedObject.this);
+ }
+
+ /**
+ * Invoked by JAXB at unmarshalling time for each identifier. The
first identifier will be taken
+ * as the name and all other identifiers (if any) as aliases.
+ *
+ * <p>Some (but not all) JAXB implementations never invoke setter
method for collections.
+ * Instead they invoke {@link AbstractIdentifiedObject#getNames()} and
add directly the identifiers
+ * in the returned collection. Consequently this method must writes
directly in the enclosing object.
+ * See <a href="https://java.net/jira/browse/JAXB-488">JAXB-488</a>
for more information.</p>
+ */
+ @Override
+ public boolean add(final Identifier id) {
+ addName(id);
+ return true;
+ }
+ }
+
+ /**
+ * Implementation of {@link Names#add(Identifier)}, defined in the
enclosing class
+ * for access to private fields without compiler-generated bridge methods.
+ */
+ final void addName(final Identifier id) {
+ if (name == NilReferencingObject.UNNAMED) {
+ name = id;
+ } else {
+ /*
+ * Our Code and RS_Identifier implementations should always create
NamedIdentifier instance,
+ * so the 'instanceof' check should not be necessary. But we do a
paranoiac check anyway.
+ */
+ final GenericName n = id instanceof GenericName ? (GenericName) id
: new NamedIdentifier(id);
+ if (alias == null) {
+ alias = Collections.singleton(n);
+ } else {
+ /*
+ * This implementation is inefficient since each addition
copies the array, but we rarely
+ * have more than two aliases. This implementation is okay
for a small number of aliases
+ * and ensures that the enclosing AbstractIdentifiedObject is
unmodifiable except by this
+ * add(…) method.
+ *
+ * Note about alternative approaches
+ * ---------------------------------
+ * An alternative approach could be to use an ArrayList and
replace it by an unmodifiable
+ * list only after unmarshalling (using an
afterUnmarshal(Unmarshaller, Object) method),
+ * but we want to avoid Unmarshaller dependency (for reducing
classes loading for users
+ * who are not interrested in XML) and it may actually be less
efficient for the vast
+ * majority of cases where there is less than 3 aliases.
+ */
+ final int size = alias.size();
+ final GenericName[] names = alias.toArray(new GenericName[size
+ 1]);
+ names[size] = n;
+ alias = UnmodifiableArrayList.wrap(names);
+ }
+ }
+ }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -89,16 +89,6 @@ public class AbstractReferenceSystem ext
private final InternationalString scope;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- AbstractReferenceSystem() {
- domainOfValidity = null;
- scope = null;
- }
-
- /**
* Constructs a reference system from the given properties.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map)
super-class constructor}.
@@ -252,4 +242,28 @@ public class AbstractReferenceSystem ext
protected long computeHashCode() {
return super.computeHashCode() + Objects.hash(domainOfValidity, scope);
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ AbstractReferenceSystem() {
+ domainOfValidity = null;
+ scope = null;
+ }
}
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=1701242&r1=1701241&r2=1701242&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 Sep 4 13:07:27 2015
@@ -122,15 +122,6 @@ public class AbstractCRS extends Abstrac
private transient Map<AxesConvention,AbstractCRS> forConvention;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- AbstractCRS() {
-
super(org.apache.sis.internal.referencing.NilReferencingObject.INSTANCE);
- }
-
- /**
* Creates a coordinate reference system from the given properties and
coordinate system.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractReferenceSystem#AbstractReferenceSystem(Map)
super-class constructor}.
@@ -290,47 +281,6 @@ public class AbstractCRS extends Abstrac
}
/**
- * Sets the coordinate system to the given value. This method is invoked
only by JAXB at
- * unmarshalling time and can be invoked only if the coordinate system has
never been set.
- *
- * <div class="note"><b>Implementation note:</b>
- * It was easy to put JAXB annotations directly on datum fields in
subclasses because each CRS type
- * can be associated to only one datum type. But we do not have this
convenience for coordinate systems,
- * where the same CRS may accept different kinds of CS. In GML, the
different kinds of CS are marshalled
- * as different XML elements. The usual way to handle such {@code
<xs:choice>} with JAXB is to annotate
- * a single method like below:
- *
- * {@preformat java
- * @Override
- * @XmlElements({
- * @XmlElement(name = "cartesianCS", type =
DefaultCartesianCS.class),
- * @XmlElement(name = "affineCS", type =
DefaultAffineCS.class),
- * @XmlElement(name = "cylindricalCS", type =
DefaultCylindricalCS.class),
- * @XmlElement(name = "linearCS", type =
DefaultLinearCS.class),
- * @XmlElement(name = "polarCS", type =
DefaultPolarCS.class),
- * @XmlElement(name = "sphericalCS", type =
DefaultSphericalCS.class),
- * @XmlElement(name = "userDefinedCS", type =
DefaultUserDefinedCS.class)
- * })
- * public CoordinateSystem getCoordinateSystem() {
- * return super.getCoordinateSystem();
- * }
- * }
- *
- * However our attempts to apply this approach have not been conclusive.
- * For an unknown reason, the unmarshalled CS object was empty.</div>
- *
- * @param name The property name, used only in case of error message to
format.
- * @throws IllegalStateException If the coordinate system has already been
set.
- */
- final void setCoordinateSystem(final String name, final CoordinateSystem
cs) {
- if (coordinateSystem == null) {
- coordinateSystem = cs;
- } else {
- ReferencingUtilities.propertyAlreadySet(AbstractCRS.class,
"setCoordinateSystem", name);
- }
- }
-
- /**
* Returns the existing CRS for the given convention, or {@code null} if
none.
*/
final AbstractCRS getCached(final AxesConvention convention) {
@@ -537,4 +487,68 @@ public class AbstractCRS extends Abstrac
formatter.restoreContextualUnit(unit, oldUnit);
formatter.newLine(); // For writing the ID[…] element on its own line.
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ AbstractCRS() {
+
super(org.apache.sis.internal.referencing.NilReferencingObject.INSTANCE);
+ }
+
+ /**
+ * Sets the coordinate system to the given value. This method is invoked
only by JAXB at
+ * unmarshalling time and can be invoked only if the coordinate system has
never been set.
+ *
+ * <div class="note"><b>Implementation note:</b>
+ * It was easy to put JAXB annotations directly on datum fields in
subclasses because each CRS type
+ * can be associated to only one datum type. But we do not have this
convenience for coordinate systems,
+ * where the same CRS may accept different kinds of CS. In GML, the
different kinds of CS are marshalled
+ * as different XML elements. The usual way to handle such {@code
<xs:choice>} with JAXB is to annotate
+ * a single method like below:
+ *
+ * {@preformat java
+ * @Override
+ * @XmlElements({
+ * @XmlElement(name = "cartesianCS", type =
DefaultCartesianCS.class),
+ * @XmlElement(name = "affineCS", type =
DefaultAffineCS.class),
+ * @XmlElement(name = "cylindricalCS", type =
DefaultCylindricalCS.class),
+ * @XmlElement(name = "linearCS", type =
DefaultLinearCS.class),
+ * @XmlElement(name = "polarCS", type =
DefaultPolarCS.class),
+ * @XmlElement(name = "sphericalCS", type =
DefaultSphericalCS.class),
+ * @XmlElement(name = "userDefinedCS", type =
DefaultUserDefinedCS.class)
+ * })
+ * public CoordinateSystem getCoordinateSystem() {
+ * return super.getCoordinateSystem();
+ * }
+ * }
+ *
+ * However our attempts to apply this approach have not been conclusive.
+ * For an unknown reason, the unmarshalled CS object was empty.</div>
+ *
+ * @param name The property name, used only in case of error message to
format.
+ * @throws IllegalStateException If the coordinate system has already been
set.
+ */
+ final void setCoordinateSystem(final String name, final CoordinateSystem
cs) {
+ if (coordinateSystem == null) {
+ coordinateSystem = cs;
+ } else {
+ ReferencingUtilities.propertyAlreadySet(AbstractCRS.class,
"setCoordinateSystem", name);
+ }
+ }
}
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=1701242&r1=1701241&r2=1701242&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 Sep 4 13:07:27 2015
@@ -74,15 +74,6 @@ abstract class AbstractDerivedCRS<C exte
private final C conversionFromBase;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- AbstractDerivedCRS() {
- conversionFromBase = null;
- }
-
- /**
* Creates a derived CRS from a defining conversion.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractCRS#AbstractCRS(Map, CoordinateSystem) super-class
constructor}.
@@ -253,4 +244,27 @@ abstract class AbstractDerivedCRS<C exte
+ 31 * conversionFromBase.getSourceCRS().hashCode()
+ 37 * conversionFromBase.getMathTransform().hashCode();
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ AbstractDerivedCRS() {
+ conversionFromBase = null;
+ }
}
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=1701242&r1=1701241&r2=1701242&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 Sep 4 13:07:27 2015
@@ -130,15 +130,6 @@ public class DefaultCompoundCRS extends
private transient List<SingleCRS> singles;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- private DefaultCompoundCRS() {
- components = null;
- }
-
- /**
* Constructs a compound CRS from the given properties and CRS.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractReferenceSystem#AbstractReferenceSystem(Map)
super-class constructor}.
@@ -328,6 +319,7 @@ public class DefaultCompoundCRS extends
*
* @see
org.apache.sis.referencing.CRS#getSingleComponents(CoordinateReferenceSystem)
*/
+ @SuppressWarnings("ReturnOfCollectionOrArrayField")
public List<SingleCRS> getSingleComponents() {
return singles;
}
@@ -539,4 +531,27 @@ public class DefaultCompoundCRS extends
}
return isWKT1 ? WKTKeywords.Compd_CS : WKTKeywords.CompoundCRS;
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ private DefaultCompoundCRS() {
+ components = null;
+ }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -96,14 +96,6 @@ public class DefaultDerivedCRS extends A
private static final long serialVersionUID = -8149602276542469876L;
/**
- * Constructs a new object in which every attributes are set to a default
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- private DefaultDerivedCRS() {
- }
-
- /**
* Creates a derived CRS from a defining conversion.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractCRS#AbstractCRS(Map, CoordinateSystem) super-class
constructor}.
@@ -784,4 +776,26 @@ public class DefaultDerivedCRS extends A
return WKTKeywords.EngineeringCRS;
}
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a default
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ private DefaultDerivedCRS() {
+ }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -79,15 +79,6 @@ public class DefaultEngineeringCRS exten
private final EngineeringDatum datum;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- private DefaultEngineeringCRS() {
- datum = null;
- }
-
- /**
* Creates a coordinate reference system from the given properties, datum
and coordinate system.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractReferenceSystem#AbstractReferenceSystem(Map)
super-class constructor}.
@@ -222,13 +213,6 @@ public class DefaultEngineeringCRS exten
}
/**
- * Used by JAXB only (invoked by reflection).
- */
- private void setCoordinateSystem(final CoordinateSystem cs) {
- super.setCoordinateSystem("coordinateSystem", cs);
- }
-
- /**
* {@inheritDoc}
*
* @return {@inheritDoc}
@@ -259,4 +243,36 @@ public class DefaultEngineeringCRS exten
return (formatter.getConvention().majorVersion() == 1) ?
WKTKeywords.Local_CS
: isBaseCRS(formatter) ? WKTKeywords.BaseEngCRS :
WKTKeywords.EngineeringCRS;
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ private DefaultEngineeringCRS() {
+ datum = null;
+ }
+
+ /**
+ * Used by JAXB only (invoked by reflection).
+ *
+ * @see #getCoordinateSystem()
+ */
+ private void setCoordinateSystem(final CoordinateSystem cs) {
+ super.setCoordinateSystem("coordinateSystem", cs);
+ }
}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java?rev=1701242&r1=1701241&r2=1701242&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
[UTF-8] Fri Sep 4 13:07:27 2015
@@ -79,14 +79,6 @@ public class DefaultGeocentricCRS extend
private static final long serialVersionUID = 6784642848287659827L;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- private DefaultGeocentricCRS() {
- }
-
- /**
* For {@link #createSameType(Map, CoordinateSystem)} usage only.
* This constructor does not verify the coordinate system type.
*/
@@ -284,4 +276,26 @@ public class DefaultGeocentricCRS extend
protected String formatTo(final Formatter formatter) {
return super.formatTo(formatter);
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ private DefaultGeocentricCRS() {
+ }
}
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=1701242&r1=1701241&r2=1701242&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 Sep 4 13:07:27 2015
@@ -78,15 +78,6 @@ class DefaultGeodeticCRS extends Abstrac
private final GeodeticDatum datum;
/**
- * Constructs a new object in which every attributes are set to a null
value.
- * <strong>This is not a valid object.</strong> This constructor is
strictly
- * reserved to JAXB, which will assign values to the fields using
reflexion.
- */
- DefaultGeodeticCRS() {
- datum = null;
- }
-
- /**
* Creates a coordinate reference system from the given properties, datum
and coordinate system.
* The properties given in argument follow the same rules than for the
* {@linkplain AbstractReferenceSystem#AbstractReferenceSystem(Map)
super-class constructor}.
@@ -147,20 +138,6 @@ class DefaultGeodeticCRS extends Abstrac
}
/**
- * Invoked by JAXB at marshalling time.
- */
- @XmlElement(name="cartesianCS") private CartesianCS getCartesianCS()
{return getCoordinateSystem(CartesianCS .class);}
- @XmlElement(name="sphericalCS") private SphericalCS getSphericalCS()
{return getCoordinateSystem(SphericalCS .class);}
- @XmlElement(name="ellipsoidalCS") private EllipsoidalCS getEllipsoidalCS()
{return getCoordinateSystem(EllipsoidalCS.class);}
-
- /**
- * Invoked by JAXB at unmarshalling time.
- */
- private void setCartesianCS (final CartesianCS cs)
{super.setCoordinateSystem("cartesianCS", cs);}
- private void setSphericalCS (final SphericalCS cs)
{super.setCoordinateSystem("sphericalCS", cs);}
- private void setEllipsoidalCS(final EllipsoidalCS cs)
{super.setCoordinateSystem("ellipsoidalCS", cs);}
-
- /**
* Returns a coordinate reference system of the same type than this CRS
but with different axes.
* This method shall be overridden by all {@code DefaultGeodeticCRS}
subclasses in this package.
*/
@@ -252,4 +229,41 @@ class DefaultGeodeticCRS extends Abstrac
return isBaseCRS ? WKTKeywords.BaseGeodCRS :
WKTKeywords.GeodeticCRS;
}
}
+
+
+
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////
////////
+ //////// XML support with JAXB
////////
+ ////////
////////
+ //////// The following methods are invoked by JAXB using reflection
(even if ////////
+ //////// they are private) or are helpers for other methods invoked
by JAXB. ////////
+ //////// Those methods can be safely removed if Geographic Markup
Language ////////
+ //////// (GML) support is not needed.
////////
+ ////////
////////
+
//////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Constructs a new object in which every attributes are set to a null
value.
+ * <strong>This is not a valid object.</strong> This constructor is
strictly
+ * reserved to JAXB, which will assign values to the fields using
reflexion.
+ */
+ DefaultGeodeticCRS() {
+ datum = null;
+ }
+
+ /**
+ * Invoked by JAXB at marshalling time.
+ */
+ @XmlElement(name="cartesianCS") private CartesianCS getCartesianCS()
{return getCoordinateSystem(CartesianCS .class);}
+ @XmlElement(name="sphericalCS") private SphericalCS getSphericalCS()
{return getCoordinateSystem(SphericalCS .class);}
+ @XmlElement(name="ellipsoidalCS") private EllipsoidalCS getEllipsoidalCS()
{return getCoordinateSystem(EllipsoidalCS.class);}
+
+ /**
+ * Invoked by JAXB at unmarshalling time.
+ */
+ private void setCartesianCS (final CartesianCS cs)
{super.setCoordinateSystem("cartesianCS", cs);}
+ private void setSphericalCS (final SphericalCS cs)
{super.setCoordinateSystem("sphericalCS", cs);}
+ private void setEllipsoidalCS(final EllipsoidalCS cs)
{super.setCoordinateSystem("ellipsoidalCS", cs);}
}