/** * Invoked by JAXB at marshalling time for getting the actual element to write * inside the {@code <gml:Conversion>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the element to be marshalled. */ @XmlElement(name = "Conversion") public DefaultConversion getElement() { return DefaultConversion.castOrCopy(metadata); }
/** * Invoked by JAXB at marshalling time for getting the actual element to write * inside the {@code <gml:Conversion>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the element to be marshalled. */ @XmlElement(name = "Conversion") public DefaultConversion getElement() { return DefaultConversion.castOrCopy(metadata); }
/** * Creates the conversion instance to associate with this {@code AbstractDerivedCRS}. * * <p><b>WARNING:</b> this method is invoked at construction time and will invoke indirectly * (through {@link DefaultConversion}) the {@link #getCoordinateSystem()} method on {@code this}. * Consequently this method shall be invoked only after the construction of this {@code AbstractDerivedCRS} * instance is advanced enough for allowing the {@code getCoordinateSystem()} method to execute. * Subclasses may consider to make the {@code getCoordinateSystem()} method final for better guarantees.</p> */ private C createConversionFromBase(final Map<String,?> properties, final SingleCRS baseCRS, final Conversion conversion) { MathTransformFactory factory = null; if (properties != null) { factory = (MathTransformFactory) properties.get(ReferencingServices.MT_FACTORY); } if (factory == null) { factory = DefaultFactories.forBuildin(MathTransformFactory.class); } try { return DefaultConversion.castOrCopy(conversion).specialize(getConversionType(), baseCRS, this, factory); } catch (FactoryException e) { throw new IllegalArgumentException(Errors.getResources(properties).getString( Errors.Keys.IllegalArgumentValue_2, "conversion", conversion.getName()), e); } }
/** * Creates the conversion instance to associate with this {@code AbstractDerivedCRS}. * * <p><b>WARNING:</b> this method is invoked at construction time and will invoke indirectly * (through {@link DefaultConversion}) the {@link #getCoordinateSystem()} method on {@code this}. * Consequently this method shall be invoked only after the construction of this {@code AbstractDerivedCRS} * instance is advanced enough for allowing the {@code getCoordinateSystem()} method to execute. * Subclasses may consider to make the {@code getCoordinateSystem()} method final for better guarantees.</p> */ private C createConversionFromBase(final Map<String,?> properties, final SingleCRS baseCRS, final Conversion conversion) { MathTransformFactory factory = null; if (properties != null) { factory = (MathTransformFactory) properties.get(ReferencingServices.MT_FACTORY); } if (factory == null) { factory = DefaultFactories.forBuildin(MathTransformFactory.class); } try { return DefaultConversion.castOrCopy(conversion).specialize(getConversionType(), baseCRS, this, factory); } catch (FactoryException e) { throw new IllegalArgumentException(Errors.getResources(properties).getString( Errors.Keys.IllegalArgumentValue_2, "conversion", conversion.getName()), e); } }