/** * 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(CoverageDescription) */ public DefaultCoverageDescription(final CoverageDescription object) { super(object); if (object != null) { attributeDescription = object.getAttributeDescription(); rangeElementDescriptions = copyCollection(object.getRangeElementDescriptions(), RangeElementDescription.class); if (object instanceof DefaultCoverageDescription) { processingLevelCode = ((DefaultCoverageDescription) object).getProcessingLevelCode(); attributeGroups = copyCollection(((DefaultCoverageDescription) object).getAttributeGroups(), DefaultAttributeGroup.class); } } }
/** * 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 DefaultCoverageDescription castOrCopy(final CoverageDescription original) { if (original != null && !(original instanceof MI_CoverageDescription)) { if (!isNullOrEmpty(original.getRangeElementDescriptions())) { return new MI_CoverageDescription(original); } } return DefaultCoverageDescription.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 DefaultCoverageDescription castOrCopy(final CoverageDescription original) { if (original != null && !(original instanceof MI_CoverageDescription)) { if (!isNullOrEmpty(original.getRangeElementDescriptions())) { return new MI_CoverageDescription(original); } } return DefaultCoverageDescription.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(CoverageDescription) */ public DefaultCoverageDescription(final CoverageDescription object) { super(object); if (object != null) { attributeDescription = object.getAttributeDescription(); rangeElementDescriptions = copyCollection(object.getRangeElementDescriptions(), RangeElementDescription.class); if (object instanceof DefaultCoverageDescription) { processingLevelCode = ((DefaultCoverageDescription) object).getProcessingLevelCode(); attributeGroups = copyCollection(((DefaultCoverageDescription) object).getAttributeGroups(), DefaultAttributeGroup.class); } } }
/** * 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 DefaultCoverageDescription castOrCopy(final CoverageDescription original) { if (original != null && !(original instanceof MI_CoverageDescription)) { if (!isNullOrEmpty(original.getRangeElementDescriptions())) { return new MI_CoverageDescription(original); } } return DefaultCoverageDescription.castOrCopy(original); } }