Mercurial > dive4elements > gnv-client
changeset 597:cf38b983d1f3
Added the Implementation of the MetaDataService which will deliver FIS and Parameters that match to Mapservices, Region and Layers that were sent to the Service.
gnv-artifacts/trunk@653 c6561f87-3c4e-4783-a992-168aeb5c3f6f
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Mon Feb 01 14:20:11 2010 +0000 +++ b/gnv-artifacts/ChangeLog Mon Feb 01 14:52:05 2010 +0000 @@ -1,5 +1,53 @@ 2010-02-01 Tim Englich <tim.englich@intevation.de> + * doc/conf/conf.xml: + Added the Configuration-node for the MetaDataService into the Configuration + of the GNV-Artifact-Restserver. + At tis Moment it is only useful to use the DummyMetaDataService. + + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultLayer.java: + Defaultimplementation of the Interface Layer. + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/Layer.java: + Interfacedefinition for Objects that represents Layer and GroupLayer that + where parsed from the XML-Document which was sent to the MetaDataService + + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultMapService.java: + Defaultimplementation of the Interface MapService. + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/MapService.java: + Interfacedefinition for Objects that represents Mapservices that where + parsed from the XML-Document which was sent to the MetaDataService. + + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultParameter.java: + Defaultimplementation of the Interface Parameter. + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/Parameter.java: + Interfacedefinition for representing an Parameter which belongs to an FIS. + + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultFIS.java: + Defaultimplementation of the Interface FIS. + * src/main/java/de/intevation/gnv/artifacts/services/requestobjects/FIS.java: + Interfacedefinition for representing an FIS which will be used as an + ResultValue of the MetaDataService-Processing. + + * src/main/java/de/intevation/gnv/artifacts/services/MetaDataServiceException.java: + Exceptionclass for classifiing Exception which occurs during the processing + of an MetaDataService-Call. + + * src/main/java/de/intevation/gnv/artifacts/services/DummyMetaDataService.java: + DummyClass of an MetaDataService. This Class can be use to simulate an + MetaDataService-Call until the required Metadata for the prossessing are + available in the Database-Backend. + This Class only returns the given Mapservices as an FIS and the Layer + as an Parameter to a given FIS. + + * src/main/java/de/intevation/gnv/artifacts/services/MetaDataService.java: + This Class is an Implementation of the de.intevation.artifacts.Service + Interface. This Service should provide Informations which FIS are available + for given Mapservices an which FIS are intersecting a given Region + These Informations are required according to definition of the MapViewer + Interface. + +2010-02-01 Tim Englich <tim.englich@intevation.de> + * src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java (createArtifactWithFactory): Fixed Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
--- a/gnv-artifacts/doc/conf/conf.xml Mon Feb 01 14:20:11 2010 +0000 +++ b/gnv-artifacts/doc/conf/conf.xml Mon Feb 01 14:52:05 2010 +0000 @@ -35,6 +35,12 @@ <artifact-factory name="fis_currentmeter" description="Factory to create an artifact to be used with the FIS Modeldata" ttl="3600000" artifact="de.intevation.artifactdatabase.ProxyArtifact">de.intevation.gnv.artifacts.GNVProductArtifactFactory</artifact-factory> </artifact-factories> + <service-factories> + <service-factory + name="metadata" + service="de.intevation.gnv.artifacts.services.DummyMetaDataService" + description="This is the Service for getting Metadata from the GNV-Artuifact-Services">de.intevation.artifactdatabase.DefaultServiceFactory</service-factory> + </service-factories> </factories> <!-- Artifacts which represent one FIS. Each FIS can have several Products
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/DummyMetaDataService.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,93 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + +import org.apache.log4j.Logger; + +import com.vividsolutions.jts.geom.Geometry; + +import de.intevation.gnv.artifacts.services.requestobjects.DefaultFIS; +import de.intevation.gnv.artifacts.services.requestobjects.DefaultParameter; +import de.intevation.gnv.artifacts.services.requestobjects.FIS; +import de.intevation.gnv.artifacts.services.requestobjects.Layer; +import de.intevation.gnv.artifacts.services.requestobjects.MapService; +import de.intevation.gnv.artifacts.services.requestobjects.Parameter; + +/** + * Dummy of the MetaDataWebservice to simulate an answering Service + * until the Databasebackend will serve the required Data. + * bb + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class DummyMetaDataService extends MetaDataService{ + + /** + * the logger, used to log exceptions and additionally information + */ + private static Logger log = Logger.getLogger(DummyMetaDataService.class); + /** + * The UID of this Class. + */ + private static final long serialVersionUID = 4712607258043392650L; + + /** + * Constructor + */ + public DummyMetaDataService() { + super(); + } + + /** + * @see de.intevation.gnv.artifacts.services.MetaDataService#getFIS(java.util.Collection) + */ + @Override + protected Collection<FIS> getFIS(Collection<MapService> mapServices) + throws MetaDataServiceException { + log.debug("DummyMetaDataService.getFIS ==> MapServices"); + Collection<FIS> returnValue = null; + if (mapServices != null && !mapServices.isEmpty()){ + returnValue = new ArrayList<FIS>(mapServices.size()); + Iterator<MapService> mit = mapServices.iterator(); + while(mit.hasNext()){ + MapService mapService = mit.next(); + Collection<Layer> layer = mapService.getLayer(); + Collection<Parameter> parameter = + new ArrayList<Parameter>(layer.size()); + if (layer != null){ + Iterator<Layer> layerIt = layer.iterator(); + while (layerIt.hasNext()){ + Layer tmpLayer = layerIt.next(); + if (!tmpLayer.isGroupLayer()){ + parameter.add(new DefaultParameter(tmpLayer.getID(), + tmpLayer.getName())); + } + } + } + returnValue.add(new DefaultFIS(mapService.getID(),parameter)); + } + } + return returnValue; + } + + /** + * @see de.intevation.gnv.artifacts.services.MetaDataService#getFIS(com.vividsolutions.jts.geom.Geometry) + */ + @Override + protected Collection<FIS> getFIS(Geometry g) + throws MetaDataServiceException { + log.debug("DummyMetaDataService.getFIS ==> Geometry"); + Collection<FIS> returnValue = null; + if (g != null){ + returnValue = new ArrayList<FIS>(2); + returnValue.add(new DefaultFIS("fis_modeldata")); + returnValue.add(new DefaultFIS("fis_marnet")); + } + return returnValue; + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/MetaDataService.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,343 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + +import javax.xml.xpath.XPathConstants; + +import org.apache.log4j.Logger; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKTReader; + +import de.intevation.artifactdatabase.DefaultService; +import de.intevation.artifactdatabase.XMLUtils; +import de.intevation.artifacts.ArtifactNamespaceContext; +import de.intevation.artifacts.CallMeta; +import de.intevation.artifacts.ServiceFactory; +import de.intevation.gnv.artifacts.services.requestobjects.DefaultFIS; +import de.intevation.gnv.artifacts.services.requestobjects.DefaultLayer; +import de.intevation.gnv.artifacts.services.requestobjects.DefaultMapService; +import de.intevation.gnv.artifacts.services.requestobjects.FIS; +import de.intevation.gnv.artifacts.services.requestobjects.Layer; +import de.intevation.gnv.artifacts.services.requestobjects.MapService; +import de.intevation.gnv.artifacts.services.requestobjects.Parameter; +import de.intevation.gnv.geobackend.base.Result; +import de.intevation.gnv.geobackend.base.query.QueryExecutor; +import de.intevation.gnv.geobackend.base.query.QueryExecutorFactory; +import de.intevation.gnv.geobackend.base.query.exception.QueryException; +import de.intevation.gnv.utils.ArtifactXMLUtilities; + +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class MetaDataService extends DefaultService { + + /** + * the logger, used to log exceptions and additionally information + */ + private static Logger log = Logger.getLogger(MetaDataService.class); + + + private final static String FIS_REGION_QUERY_ID = "fis_region"; + private final static String MAPSERVICES_HAS_FIS_QUERY_ID = + "mapservices_has_fis"; + + private static String ATTRIBUTE_ID = "id"; + private static String ATTRIBUTE_NAME = "name"; + private static String ATTRIBUTE_TYPE = "type"; + private static String ATTRIBUTE_URL = "url"; + private static String ATTRIBUTE_GROUPLAYER = "isgrouplayer"; + private static String ATTRIBUTE_PARENTID = "parentid"; + private static String ATTRIBUTE_SRS = "srs"; + + + private static String XPATH_LOACTION_NODE = "art:GetMetaData/art:location"; + private static String XPATH_MAPSERVICES_NODESET = "art:GetMetaData/" + + "art:mapservices/" + + "art:mapservice"; + private static String XPATH_LAYER_NODESET = "art:layer"; + + /** + * The UID of this Class. + */ + private static final long serialVersionUID = -8446483887497236372L; + + /** + * Constructor + */ + public MetaDataService() { + super(); + } + + /** + * @see de.intevation.artifactdatabase.DefaultService#process(org.w3c.dom.Document, java.lang.Object, de.intevation.artifacts.CallMeta) + */ + @Override + public Document process(Document data, Object globalContext, + CallMeta callMeta) { + log.debug("MetaDataService.process"); + Document document = null; + try { + Geometry g = this.parseGeometry(data); + Collection<MapService> mapServices = this.parseMapServices(data); + Collection<FIS> resultFIS = this.unionFIS(this.getFIS(g), + this.getFIS(mapServices)); + document = XMLUtils.newDocument(); + this.writeFIS2Document(document, resultFIS); + } catch (MetaDataServiceException e) { + log.error(e,e); + document = new ArtifactXMLUtilities() + .createExceptionReport(e.getMessage(), document); + } + return document; + } + + private Geometry parseGeometry(Document data) + throws MetaDataServiceException{ + log.debug("MetaDataService.parseGeometry"); + + Element locationNode = (Element) XMLUtils.xpath( + data, + XPATH_LOACTION_NODE, + XPathConstants.NODE, + ArtifactNamespaceContext.INSTANCE + ); + Geometry returnValue = null; + if (locationNode != null) { + String srs = locationNode.getAttribute(ATTRIBUTE_SRS); + // TODO: use SRS to transform the Geometry to target-System. + String geometryValue = locationNode.getTextContent(); + if (geometryValue != null){ + try { + returnValue = new WKTReader().read(geometryValue); + } catch (ParseException e) { + log.error(e,e); + throw new MetaDataServiceException("The given Geometry" + + "String is not a " + + "valid WKT."); + } + } + } + return returnValue; + } + + private Collection<MapService> parseMapServices(Document data){ + log.debug("MetaDataService.parseMapServices"); + + NodeList mapServices = (NodeList) XMLUtils.xpath(data, + XPATH_MAPSERVICES_NODESET, + XPathConstants.NODESET, + ArtifactNamespaceContext.INSTANCE); + Collection<MapService> returnValue = null; + if (mapServices != null){ + returnValue = new ArrayList<MapService>(mapServices.getLength()); + for (int i = 0; i < mapServices.getLength(); i++){ + Element mapServiceNode = (Element)mapServices.item(i); + String id = mapServiceNode.getAttribute(ATTRIBUTE_ID); + String type = mapServiceNode.getAttribute(ATTRIBUTE_TYPE); + String url = mapServiceNode.getAttribute(ATTRIBUTE_URL); + Collection<Layer> layer = null; + + NodeList layerNodes = (NodeList) XMLUtils.xpath(mapServiceNode, + XPATH_LAYER_NODESET, + XPathConstants.NODESET, + ArtifactNamespaceContext.INSTANCE); + if (layerNodes != null){ + layer = new ArrayList<Layer>(layerNodes.getLength()); + for (int j = 0; j < layerNodes.getLength(); j++){ + Element layerNode = (Element)layerNodes.item(j); + String layerId = layerNode.getAttribute(ATTRIBUTE_ID); + String layerName = layerNode.getAttribute(ATTRIBUTE_NAME); + boolean isGroupLayer = + Boolean.parseBoolean(layerNode + .getAttribute( + ATTRIBUTE_GROUPLAYER)); + String parentId = layerNode + .getAttribute(ATTRIBUTE_PARENTID); + + layer.add(new DefaultLayer(layerId, + layerName, + isGroupLayer, + parentId)); + } + } + MapService mapService = new DefaultMapService(id, layer, + type, url); + returnValue.add(mapService); + + } + } + return returnValue; + } + + private Collection<FIS> unionFIS(Collection<FIS> fromGeometry, + Collection<FIS> fromMapservices){ + log.debug("MetaDataService.unionFIS"); + Collection<FIS> returnValue = null; + if (fromGeometry == null || fromGeometry.isEmpty()){ + returnValue = fromMapservices; + }else if (fromMapservices == null || fromMapservices.isEmpty()){ + returnValue = fromGeometry; + }else{ + + returnValue = new ArrayList<FIS>(); + Iterator<FIS> it = fromMapservices.iterator(); + while (it.hasNext()){ + FIS fis = it.next(); + if (fromGeometry.contains(fis)){ + returnValue.add(fis); + } + } + } + return returnValue; + } + + /** + * Puts the retrieved FIS into the given XML-Document. + * @param document the Document where the FIS should be put in. + * @param fis the retrieved FIS which should be written into + * the XML-Document. + */ + private void writeFIS2Document(Document document, Collection<FIS> fis){ + + if (fis != null){ + Iterator<FIS> it = fis.iterator(); + XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( + document, + ArtifactNamespaceContext.NAMESPACE_URI, + ArtifactNamespaceContext.NAMESPACE_PREFIX + ); + Node rootNode = creator.create("result"); + document.appendChild(rootNode); + + Node factoriesNode = creator.create("factories"); + rootNode.appendChild(factoriesNode); + while (it.hasNext()){ + FIS tmpFIS = it.next(); + Element fisNode = creator.create("factory"); + fisNode.setAttribute("art:name",tmpFIS.getID()); + + Collection<Parameter> parameter = tmpFIS.getParameter(); + + if(parameter != null){ + Iterator<Parameter> pit = parameter.iterator(); + while (pit.hasNext()){ + Parameter p = pit.next(); + Element parameterNode = creator.create("parameter"); + parameterNode.setAttribute(ATTRIBUTE_ID, p.getID()); + parameterNode.setAttribute(ATTRIBUTE_NAME, p.getName()); + fisNode.appendChild(parameterNode); + } + } + factoriesNode.appendChild(fisNode); + } + } + } + + /** + * Returns all FIS which Areas is intersected by this given Geometry + * @param g the Geometry which should be used to determine the FIS. + * @return all FIS which Areas is intersected by this given Geometry + */ + protected Collection<FIS> getFIS(Geometry g) + throws MetaDataServiceException{ + log.debug("MetaDataService.getFIS ==> Geometry"); + Collection<FIS> resultValue = null; + if (g != null){ + try { + QueryExecutor queryExecutor = QueryExecutorFactory + .getInstance() + .getQueryExecutor(); + Collection<Result> result = queryExecutor.executeQuery(FIS_REGION_QUERY_ID, + new String[]{g.toString()}); + + if (result != null){ + resultValue = new ArrayList<FIS>(result.size()); + Iterator<Result> it = result.iterator(); + while (it.hasNext()){ + Result value = it.next(); + String fis_id = value.getString(0); + resultValue.add(new DefaultFIS(fis_id)); + } + } + } catch (QueryException e) { + log.error(e,e); + throw new MetaDataServiceException("Cannot Query FIS from DB."); + } + } + return resultValue; + } + + /** + * Returns all FIS which were represented by the given Mapservices + * @param mapServices the Mapservices which should determine the FIS. + * @return all FIS which where represented my the given Mapservices. + */ + protected Collection<FIS> getFIS(Collection<MapService> mapServices) + throws MetaDataServiceException{ + log.debug("MetaDataService.getFIS ==> MapServices"); + Collection<FIS> resultValue = null; + if (mapServices != null && !mapServices.isEmpty()){ + try { + + String mapServiceNames = ""; + Iterator<MapService> mit = mapServices.iterator(); + while(mit.hasNext()){ + if (mapServiceNames.length() > 0){ + mapServiceNames += " , "; + } + mapServiceNames += "\""+mit.next().getID()+"\""; + } + + QueryExecutor queryExecutor = QueryExecutorFactory + .getInstance() + .getQueryExecutor(); + Collection<Result> result = queryExecutor.executeQuery( + MAPSERVICES_HAS_FIS_QUERY_ID, + new String[]{mapServiceNames}); + if (result != null){ + resultValue = new ArrayList<FIS>(result.size()); + Iterator<Result> it = result.iterator(); + while (it.hasNext()){ + Result value = it.next(); + String fis_id = value.getString(0); + + // TODO: QUERY PARAMS + // FIRST LOOK IF ONE MAPSERVICE REPRESENTS ONLY ONE PARAM + // IF FALSE LOOK IF THE GIVEN LAYERs TO AN MAPSERVICE + // REPRESENTS DIFFERENT PARAMS + Collection<Parameter> parameter = null; + resultValue.add(new DefaultFIS(fis_id, parameter)); + } + } + } catch (QueryException e) { + log.error(e,e); + throw new MetaDataServiceException("Cannot Query FIS from DB."); + } + + } + return resultValue; + } + + /** + * @see de.intevation.artifactdatabase.DefaultService#setup(de.intevation.artifacts.ServiceFactory, java.lang.Object) + */ + @Override + public void setup(ServiceFactory factory, Object globalContext) { + log.debug("MetaDataService.setup"); + super.setup(factory, globalContext); + // TODO: Perhaps it is necessary to init the QueryIds here. + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/MetaDataServiceException.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,48 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services; +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class MetaDataServiceException extends Exception { + + /** + * The UID of this Class + */ + private static final long serialVersionUID = -7489185270678994565L; + + /** + * Constructor + */ + public MetaDataServiceException() { + super(); + } + + /** + * Constructor + * @param arg0 + */ + public MetaDataServiceException(String arg0) { + super(arg0); + } + + /** + * Constructor + * @param arg0 + */ + public MetaDataServiceException(Throwable arg0) { + super(arg0); + } + + /** + * Constructor + * @param arg0 + * @param arg1 + */ + public MetaDataServiceException(String arg0, Throwable arg1) { + super(arg0, arg1); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultFIS.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,56 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; + +import java.util.Collection; + +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class DefaultFIS implements FIS { + + + private String id = null; + + private Collection<Parameter> parameter = null; + + public DefaultFIS(String id){ + super(); + this.id = id; + } + /** + * Constructor + * @param id + * @param parameter + */ + public DefaultFIS(String id, Collection<Parameter> parameter) { + this(id); + this.parameter = parameter; + } + + /** + * @see de.intevation.gnv.artifacts.services.requestobjects.FIS#getID() + */ + public String getID() { + return this.id; + } + + /** + * @see de.intevation.gnv.artifacts.services.requestobjects.FIS#getParameter() + */ + public Collection<Parameter> getParameter() { + return this.parameter; + } + + @Override + public boolean equals(Object arg0) { + boolean returnValue = false; + if (arg0 instanceof FIS){ + returnValue = this.id.equals(((FIS)arg0).getID()); + } + return returnValue; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultLayer.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,67 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class DefaultLayer implements Layer { + + + private String id = null; + + private String name = null; + + private boolean groupLayer = false; + + private String parentId = null; + /** + * Constructor + */ + public DefaultLayer(String id,String name, + boolean groupLayer,String parentId) { + this.id = id; + this.name = name; + this.groupLayer = groupLayer; + this.parentId = parentId; + } + + + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.Layer#getID() + */ + public String getID() { + return this.id; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.Layer#getName() + */ + public String getName() { + return this.name; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.Layer#isGroupLayer() + */ + public boolean isGroupLayer() { + return this.groupLayer; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.Layer#parentID() + */ + public String parentID() { + return this.parentId; + } + + @Override + public String toString() { + return "ID: "+ this.id + " Name: "+this.name+ + " IsGroupLayer: "+this.groupLayer+ + " ParentID: "+this.parentId; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultMapService.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,63 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; + +import java.util.Collection; + +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class DefaultMapService implements MapService { + + private String id = null; + + + + private Collection<Layer> layer = null; + + private String type = null; + + private String url = null; + /** + * Constructor + */ + public DefaultMapService(String id, Collection<Layer> layer, + String type, String url) { + super(); + this.id = id; + this.layer = layer; + this.type = type; + this.url = url; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.MapService#getID() + */ + public String getID() { + return this.id; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.MapService#getLayer() + */ + public Collection<Layer> getLayer() { + return this.layer; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.MapService#getType() + */ + public String getType() { + return this.type; + } + + /** + * @see de.intevation.gnv.artifactdatabase.objects.map.MapService#getURL() + */ + public String getURL() { + return this.url; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/DefaultParameter.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,41 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public class DefaultParameter implements Parameter { + + + private String id = null; + + private String name = null; + + /** + * Constructor + * @param id + * @param name + */ + public DefaultParameter(String id, String name) { + super(); + this.id = id; + this.name = name; + } + + /** + * @see de.intevation.gnv.artifacts.services.requestobjects.Parameter#getID() + */ + public String getID() { + return this.id; + } + + /** + * @see de.intevation.gnv.artifacts.services.requestobjects.Parameter#getName() + */ + public String getName() { + return this.name; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/FIS.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,17 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; + +import java.util.Collection; + +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public interface FIS { + + String getID(); + Collection<Parameter> getParameter(); + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/Layer.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,16 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public interface Layer { + + String getName(); + String getID(); + boolean isGroupLayer(); + String parentID(); + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/MapService.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,23 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; + +import java.util.Collection; + +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public interface MapService { + + + String getID(); + + String getURL(); + + String getType(); + + Collection<Layer> getLayer(); + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/services/requestobjects/Parameter.java Mon Feb 01 14:52:05 2010 +0000 @@ -0,0 +1,14 @@ +/** + * + */ +package de.intevation.gnv.artifacts.services.requestobjects; +/** + * @author Tim Englich <tim.englich@intevation.de> + * + */ +public interface Parameter { + + String getName(); + String getID (); + +}