use of org.apache.sis.metadata.iso.maintenance.DefaultScope in project sis by apache.
the class DefaultSource method setSourceExtents.
/**
* Information about the spatial, vertical and temporal extent of the source data.
* This method stores the values in the {@linkplain #setScope(Scope) scope}.
*
* @param newValues the new source extents.
*
* @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#setExtents(Collection)}.
*/
@Deprecated
public void setSourceExtents(final Collection<? extends Extent> newValues) {
checkWritePermission();
Scope scope = this.scope;
if (!(scope instanceof DefaultScope)) {
scope = new DefaultScope(scope);
setScope(scope);
}
((DefaultScope) scope).setExtents(newValues);
}
use of org.apache.sis.metadata.iso.maintenance.DefaultScope in project sis by apache.
the class DefaultSource method getSourceExtents.
/**
* 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 instanceof DefaultScope)) {
if (isModifiable()) {
scope = new DefaultScope(scope);
this.scope = scope;
} else {
return Collections.singleton(scope.getExtent());
}
}
}
return null;
}
Aggregations