Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for LayerStore in deegree-spring module #153

Merged
merged 1 commit into from
Aug 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deegree-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@
<artifactId>deegree-services-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.deegree</groupId>
<artifactId>deegree-core-layer</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
//$HeadURL$
/*----------------------------------------------------------------------------
This file is part of deegree, http://deegree.org/
Copyright (C) 2013 by:

IDgis bv

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Contact information:

IDgis bv
Boomkamp 16
7461 AX Rijssen
The Netherlands
http://idgis.nl/

lat/lon GmbH
Aennchenstr. 19, 53177 Bonn
Germany
http://lat-lon.de/

Department of Geography, University of Bonn
Prof. Dr. Klaus Greve
Postfach 1147, 53001 Bonn
Germany
http://www.geographie.uni-bonn.de/deegree/

e-mail: info@deegree.org
----------------------------------------------------------------------------*/
package org.deegree.spring.layer;

import java.net.URL;

import org.deegree.layer.persistence.LayerStore;
import org.deegree.layer.persistence.LayerStoreProvider;
import org.deegree.spring.GenericSpringResourceMetadata;
import org.deegree.workspace.ResourceLocation;
import org.deegree.workspace.ResourceMetadata;
import org.deegree.workspace.Workspace;

/**
* SpringLayerStoreProvider enables a bean implementing
* {@link org.deegree.layer.persistence.LayerStore}
* to be used within a deegree workspace.
*
* @author <a href="mailto:reijer.copier@idgis.nl">Reijer Copier</a>
* @author last edited by: $Author$
*
* @version $Revision$, $Date$
*/
public class SpringLayerStoreProvider extends LayerStoreProvider {

private static final String CONFIG_NS = "http://www.deegree.org/spring/layer";

private static final URL CONFIG_SCHEMA = SpringLayerStoreProvider.class.getResource( "/META-INF/schemas/spring/3.4.0/layer.xsd" );

private static final String CONFIG_JAXB_PACKAGE = "org.deegree.spring.layer.jaxb";

@Override
public String getNamespace() {
return CONFIG_NS;
}

@Override
public ResourceMetadata<LayerStore> createFromLocation( Workspace workspace, ResourceLocation<LayerStore> location ) {
return new GenericSpringResourceMetadata<LayerStore>( workspace, location, this, CONFIG_JAXB_PACKAGE,
LayerStore.class );
}

@Override
public URL getSchema() {
return CONFIG_SCHEMA;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.deegree.org/spring/layer"
elementFormDefault="qualified" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:g="http://www.deegree.org/spring/generic"
jaxb:version="2.1">

<import namespace="http://www.deegree.org/spring/generic" schemaLocation="./generic.xsd"/>

<annotation>
<appinfo>
<jaxb:schemaBindings>
<jaxb:package name="org.deegree.spring.layer.jaxb" />
</jaxb:schemaBindings>
</appinfo>
</annotation>

<element name="SpringLayerStore" type="g:SingleBeanRef">
<annotation>
<documentation></documentation>
<appinfo>
<jaxb:class name="SpringLayerStoreProviderConfig" />
</appinfo>
</annotation>
</element>
</schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.deegree.spring.layer.SpringLayerStoreProvider