use of org.apache.sis.internal.storage.StoreResource in project sis by apache.
the class StoreListeners method getDataStore.
/**
* Returns the data store of the source, or {@code null} if unknown.
*/
private static DataStore getDataStore(StoreListeners m) {
do {
final Resource source = m.source;
if (source instanceof DataStore) {
return (DataStore) source;
}
if (source instanceof StoreResource) {
final DataStore ds = ((StoreResource) source).getOriginator();
if (ds != null)
return ds;
}
m = m.parent;
} while (m != null);
return null;
}
Aggregations