/** * 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(Georectified) */ public DefaultGeorectified(final Georectified object) { super(object); if (object != null) { checkPointDescription = object.getCheckPointDescription(); cornerPoints = copyList(object.getCornerPoints(), Point.class); centerPoint = object.getCenterPoint(); pointInPixel = object.getPointInPixel(); transformationDimensionDescription = object.getTransformationDimensionDescription(); transformationDimensionMapping = copyCollection(object.getTransformationDimensionMapping(), InternationalString.class); checkPoints = copyCollection(object.getCheckPoints(), GCP.class); // checkPointAvailability is required to be 'true' if there is a description. if (checkPointDescription != null || object.isCheckPointAvailable()) { booleans |= CHECK_POINT_MASK; } } }
/** * 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 DefaultGeorectified castOrCopy(final Georectified original) { if (original != null && !(original instanceof MI_Georectified)) { if (!isNullOrEmpty(original.getCheckPoints())) { return new MI_Georectified(original); } } return DefaultGeorectified.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 DefaultGeorectified castOrCopy(final Georectified original) { if (original != null && !(original instanceof MI_Georectified)) { if (!isNullOrEmpty(original.getCheckPoints())) { return new MI_Georectified(original); } } return DefaultGeorectified.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(Georectified) */ public DefaultGeorectified(final Georectified object) { super(object); if (object != null) { checkPointDescription = object.getCheckPointDescription(); cornerPoints = copyList(object.getCornerPoints(), Point.class); centerPoint = object.getCenterPoint(); pointInPixel = object.getPointInPixel(); transformationDimensionDescription = object.getTransformationDimensionDescription(); transformationDimensionMapping = copyCollection(object.getTransformationDimensionMapping(), InternationalString.class); checkPoints = copyCollection(object.getCheckPoints(), GCP.class); // checkPointAvailability is required to be 'true' if there is a description. if (checkPointDescription != null || object.isCheckPointAvailable()) { booleans |= CHECK_POINT_MASK; } } }
/** * 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 DefaultGeorectified castOrCopy(final Georectified original) { if (original != null && !(original instanceof MI_Georectified)) { if (!isNullOrEmpty(original.getCheckPoints())) { return new MI_Georectified(original); } } return DefaultGeorectified.castOrCopy(original); } }