comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/container/DefaultQueryContainer.java @ 132:5a583cff97ea

Implementation of the Datainfrastructure for fetching Data from different DataStores. geo-backend/trunk@12 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 04 Sep 2009 08:11:30 +0000
parents
children ff1b7967e6b9
comparison
equal deleted inserted replaced
131:d8ff739b9f3b 132:5a583cff97ea
1 /**
2 *
3 */
4 package de.intevation.gnv.geobackend.base.query.container;
5
6 import java.util.ArrayList;
7 import java.util.Collection;
8 import java.util.Properties;
9
10 import de.intevation.gnv.geobackend.base.query.container.exception.QueryContainerException;
11
12 /**
13 * Defaultimplementation of an QueryContainer.
14 * All Queries are provided using a Propertiescontainer.
15 * @author Tim Englich <tim.englich@intevation.de>
16 */
17 public class DefaultQueryContainer implements QueryContainer {
18
19 /**
20 * The Properties-Object all Queries are provided in.
21 */
22 private Properties queries = null;
23
24 /**
25 * Constructor
26 */
27 public DefaultQueryContainer() {
28 super();
29 }
30
31 /**
32 * @see de.intevation.gnv.geobackend.base.query.container.QueryContainer#gerQueryIDs()
33 */
34 public Collection<String> gerQueryIDs() throws QueryContainerException {
35 //TODO: Typsicherheit herstellen.
36 Collection returnValue = null;
37 if (this.queries != null){
38 returnValue = this.queries.keySet();
39 }else{
40 returnValue = new ArrayList<String>(0);
41 }
42 return returnValue;
43 }
44
45 /**
46 * @see de.intevation.gnv.geobackend.base.query.container.QueryContainer#getQuery(java.lang.String)
47 */
48 public String getQuery(String queryID) throws QueryContainerException {
49 String returnValue = null;
50 if (this.queries != null){
51 returnValue = this.queries.getProperty(queryID);
52 }
53 return returnValue;
54 }
55
56 /**
57 * @see de.intevation.gnv.geobackend.base.query.container.QueryContainer#initialize(java.util.Properties)
58 */
59 public void initialize(Properties properties) throws QueryContainerException {
60 this.queries = properties;
61 }
62
63 }

http://dive4elements.wald.intevation.org