use of org.geotoolkit.storage.event.ModelEvent in project geotoolkit by Geomatys.
the class MockTiledGridCoverageResource method removeTileMatrixSet.
@Override
public void removeTileMatrixSet(String identifier) throws DataStoreException {
ArgumentChecks.ensureNonNull("identifier", identifier);
final Iterator<TileMatrixSet> it = tileMatrixSets.iterator();
while (it.hasNext()) {
final TileMatrixSet tms = it.next();
if (identifier.equalsIgnoreCase(tms.getIdentifier())) {
tileMatrixSets.remove(tms);
localEvents.add(new MockEvent(EventType.TILE_MATRIX_SET_REMOVED, tms));
listeners.fire(new ModelEvent(this), StoreEvent.class);
return;
}
}
throw new DataStoreException("Identifier " + identifier + " not found in models.");
}
use of org.geotoolkit.storage.event.ModelEvent in project geotoolkit by Geomatys.
the class AggregatedCoverageResource method eraseCaches.
private void eraseCaches() {
cachedGridGeometry = null;
for (VirtualBand vb : bands) {
vb.cachedSampleDimension = null;
}
tree = null;
listeners.fire(new ModelEvent(this), ModelEvent.class);
listeners.fire(new ContentEvent(this), ContentEvent.class);
photographic = false;
homogeneous = false;
}
use of org.geotoolkit.storage.event.ModelEvent in project geotoolkit by Geomatys.
the class InMemoryTiledGridCoverageResource method createTileMatrixSet.
/**
* {@inheritDoc }.
*/
@Override
public TileMatrixSet createTileMatrixSet(TileMatrixSet template) throws DataStoreException {
final TileMatrixSet p = (TileMatrixSet) template;
final InMemoryTileMatrixSet py = new InMemoryTileMatrixSet(UUID.randomUUID().toString(), p.getCoordinateReferenceSystem());
py.setBuildPhase(true);
TileMatrices.copyStructure(p, py);
py.setBuildPhase(false);
tileMatrixSets.add(py);
listeners.fire(new ModelEvent(this), StoreEvent.class);
return py;
}
use of org.geotoolkit.storage.event.ModelEvent in project geotoolkit by Geomatys.
the class InMemoryTiledGridCoverageResource method removeTileMatrixSet.
@Override
public void removeTileMatrixSet(String identifier) throws DataStoreException {
ArgumentChecks.ensureNonNull("identifier", identifier);
final Iterator<TileMatrixSet> it = tileMatrixSets.iterator();
while (it.hasNext()) {
final TileMatrixSet tms = it.next();
if (identifier.equalsIgnoreCase(tms.getIdentifier())) {
tileMatrixSets.remove(tms);
listeners.fire(new ModelEvent(this), StoreEvent.class);
return;
}
}
throw new DataStoreException("Identifier " + identifier + " not found in models.");
}
use of org.geotoolkit.storage.event.ModelEvent in project geotoolkit by Geomatys.
the class MockTiledGridCoverageResource method createTileMatrixSet.
/**
* {@inheritDoc }.
*/
@Override
public TileMatrixSet createTileMatrixSet(TileMatrixSet template) throws DataStoreException {
final InMemoryTileMatrixSet py = new InMemoryTileMatrixSet(UUID.randomUUID().toString(), template.getCoordinateReferenceSystem());
py.setBuildPhase(true);
localEvents.add(new MockEvent(EventType.TILE_MATRIX_SET_CREATED, py));
TileMatrices.copyStructure(template, py);
py.setBuildPhase(false);
tileMatrixSets.add(py);
listeners.fire(new ModelEvent(this), StoreEvent.class);
return py;
}
Aggregations