/** * Returns the information about the spatial, vertical and temporal extent of the source data. * This method fetches the values from the {@linkplain #getScope() scope}. * * @return information about the extent of the source data. * * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#getExtents()}. */ @Override @Deprecated @XmlElement(name = "sourceExtent") @Dependencies("getScope") public Collection<Extent> getSourceExtents() { Scope scope = getScope(); if (!(scope instanceof DefaultScope)) { if (isModifiable()) { scope = new DefaultScope(scope); this.scope = scope; } else { return Collections.singleton(scope.getExtent()); } } return ((DefaultScope) scope).getExtents(); }
/** * Returns the information about the spatial, vertical and temporal extent of the source data. * This method fetches the values from the {@linkplain #getScope() scope}. * * @return information about the extent of the source data. * * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#getExtents()}. */ @Override @Deprecated @Dependencies("getScope") @XmlElement(name = "sourceExtent", namespace = LegacyNamespaces.GMD) public Collection<Extent> getSourceExtents() { if (FilterByVersion.LEGACY_METADATA.accept()) { Scope scope = getScope(); if (scope != null) { if (!(scope instanceof DefaultScope)) { if (super.state() != State.FINAL) { scope = new DefaultScope(scope); this.scope = scope; } else { return Collections.singleton(scope.getExtent()); } } return ((DefaultScope) scope).getExtents(); } } 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()); } } }