forked from deegree/deegree3
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deegree#104 - introduces MetadataMerger to manipulate BBox of Layers …
…in the capabilities
- Loading branch information
Showing
9 changed files
with
94 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...in/java/org/deegree/services/wms/controller/capabilities/theme/DefaultMetadataMerger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.deegree.services.wms.controller.capabilities.theme; | ||
|
||
import org.deegree.geometry.metadata.SpatialMetadata; | ||
import org.deegree.layer.metadata.LayerMetadata; | ||
import org.deegree.theme.Theme; | ||
import org.deegree.theme.Themes; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author <a href="mailto:goltz@lat-lon.de">Lyn Goltz </a> | ||
*/ | ||
public class DefaultMetadataMerger implements MetadataMerger { | ||
|
||
@Override | ||
public SpatialMetadata mergeSpatialMetadata( List<Theme> themes ) { | ||
if ( themes.isEmpty() ) | ||
return null; | ||
SpatialMetadata smd = new SpatialMetadata(); | ||
for ( Theme t : themes ) { | ||
for ( org.deegree.layer.Layer l : Themes.getAllLayers( t ) ) { | ||
smd.merge( l.getMetadata().getSpatialMetadata() ); | ||
} | ||
} | ||
return smd; | ||
} | ||
|
||
@Override | ||
public LayerMetadata mergeLayerMetadata( Theme theme ) { | ||
return new LayerMetadataMerger().merge( theme ); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
.../src/main/java/org/deegree/services/wms/controller/capabilities/theme/MetadataMerger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.deegree.services.wms.controller.capabilities.theme; | ||
|
||
import org.deegree.geometry.metadata.SpatialMetadata; | ||
import org.deegree.layer.metadata.LayerMetadata; | ||
import org.deegree.theme.Theme; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author <a href="mailto:goltz@lat-lon.de">Lyn Goltz </a> | ||
*/ | ||
public interface MetadataMerger { | ||
|
||
SpatialMetadata mergeSpatialMetadata( List<Theme> themes ); | ||
|
||
LayerMetadata mergeLayerMetadata( Theme theme ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters