/** * Returns the denominator of the representative fraction on a source map. * This method fetches the value from the * {@linkplain #getSourceSpatialResolution() source spatial resolution}. * * @return representative fraction on a source map, or {@code null}. * * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#getEquivalentScale()}. */ @Override @Deprecated @XmlElement(name = "scaleDenominator") @Dependencies("getSourceSpatialResolution") public RepresentativeFraction getScaleDenominator() { final Resolution resolution = getSourceSpatialResolution(); return (resolution != null) ? resolution.getEquivalentScale() : null; }
/** * Returns the denominator of the representative fraction on a source map. * This method fetches the value from the * {@linkplain #getSourceSpatialResolution() source spatial resolution}. * * @return representative fraction on a source map, or {@code null}. * * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#getEquivalentScale()}. */ @Override @Deprecated @Dependencies("getSourceSpatialResolution") @XmlElement(name = "scaleDenominator", namespace = LegacyNamespaces.GMD) public RepresentativeFraction getScaleDenominator() { if (FilterByVersion.LEGACY_METADATA.accept()) { final Resolution resolution = getSourceSpatialResolution(); if (resolution != null) { return resolution.getEquivalentScale(); } } return null; }
/** * 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(Source) */ public DefaultSource(final Source object) { super(object); if (object != null) { description = object.getDescription(); sourceReferenceSystem = object.getSourceReferenceSystem(); sourceCitation = object.getSourceCitation(); sourceSteps = copyCollection(object.getSourceSteps(), ProcessStep.class); processedLevel = object.getProcessedLevel(); resolution = object.getResolution(); if (object instanceof DefaultSource) { sourceSpatialResolution = ((DefaultSource) object).getSourceSpatialResolution(); sourceMetadata = copyCollection(((DefaultSource) object).getSourceMetadata(), Citation.class); scope = ((DefaultSource) object).getScope(); } else { setScaleDenominator(object.getScaleDenominator()); setSourceExtents(object.getSourceExtents()); } } }
/** * 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(Source) */ public DefaultSource(final Source object) { super(object); if (object != null) { description = object.getDescription(); sourceReferenceSystem = object.getSourceReferenceSystem(); sourceCitation = object.getSourceCitation(); sourceSteps = copyCollection(object.getSourceSteps(), ProcessStep.class); processedLevel = object.getProcessedLevel(); resolution = object.getResolution(); if (object instanceof DefaultSource) { sourceSpatialResolution = ((DefaultSource) object).getSourceSpatialResolution(); sourceMetadata = copyCollection(((DefaultSource) object).getSourceMetadata(), Citation.class); scope = ((DefaultSource) object).getScope(); } else { setScaleDenominator(object.getScaleDenominator()); setSourceExtents(object.getSourceExtents()); } } }