/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Georeferenceable) */ public DefaultGeoreferenceable(final Georeferenceable object) { super(object); if (object != null) { if (object.isControlPointAvailable()) { booleans |= CONTROL_POINT_MASK; } if (object.isOrientationParameterAvailable()) { booleans |= OPERATION_MASK; } orientationParameterDescription = object.getOrientationParameterDescription(); parameterCitations = copyCollection(object.getParameterCitations(), Citation.class); geolocationInformation = copyCollection(object.getGeolocationInformation(), GeolocationInformation.class); georeferencedParameters = object.getGeoreferencedParameters(); } }
/** * Wraps the given metadata into a SIS implementation that can be marshalled, * using the {@code "gmi"} namespace if necessary. * * @param original the original metadata provided by the user. * @return the metadata to marshall. */ public static DefaultGeoreferenceable castOrCopy(final Georeferenceable original) { if (original != null && !(original instanceof MI_Georeferenceable)) { if (!isNullOrEmpty(original.getGeolocationInformation())) { return new MI_Georeferenceable(original); } } return DefaultGeoreferenceable.castOrCopy(original); } }
/** * Wraps the given metadata into a Geotk implementation that can be marshalled, * using the {@code "gmi"} namespace if necessary. * * @param original The original metadata provided by the user. * @return The metadata to marshall. */ public static DefaultGeoreferenceable castOrCopy(final Georeferenceable original) { if (original != null && !(original instanceof MI_Georeferenceable)) { if (!isNullOrEmpty(original.getGeolocationInformation())) { return new MI_Georeferenceable(original); } } return DefaultGeoreferenceable.castOrCopy(original); } }
/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Georeferenceable) */ public DefaultGeoreferenceable(final Georeferenceable object) { super(object); if (object != null) { if (object.isControlPointAvailable()) { booleans |= CONTROL_POINT_MASK; } if (object.isOrientationParameterAvailable()) { booleans |= OPERATION_MASK; } orientationParameterDescription = object.getOrientationParameterDescription(); parameterCitations = copyCollection(object.getParameterCitations(), Citation.class); geolocationInformation = copyCollection(object.getGeolocationInformation(), GeolocationInformation.class); georeferencedParameters = object.getGeoreferencedParameters(); } }
/** * Wraps the given metadata into a SIS implementation that can be marshalled, * using the {@code "gmi"} namespace if necessary. * * @param original the original metadata provided by the user. * @return the metadata to marshall. */ public static DefaultGeoreferenceable castOrCopy(final Georeferenceable original) { if (original != null && !(original instanceof MI_Georeferenceable)) { if (!isNullOrEmpty(original.getGeolocationInformation())) { return new MI_Georeferenceable(original); } } return DefaultGeoreferenceable.castOrCopy(original); } }