001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/portal/standard/wfs/configuration/DigitizerClientConfiguration.java $
002    /*----------------    FILE HEADER  ------------------------------------------
003    
004     This file is part of deegree.
005     Copyright (C) 2001-2006 by:
006     Department of Geography, University of Bonn
007     http://www.giub.uni-bonn.de/deegree/
008     lat/lon GmbH
009     http://www.lat-lon.de
010    
011     This library is free software; you can redistribute it and/or
012     modify it under the terms of the GNU Lesser General Public
013     License as published by the Free Software Foundation; either
014     version 2.1 of the License, or (at your option) any later version.
015    
016     This library is distributed in the hope that it will be useful,
017     but WITHOUT ANY WARRANTY; without even the implied warranty of
018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019     Lesser General Public License for more details.
020    
021     You should have received a copy of the GNU Lesser General Public
022     License along with this library; if not, write to the Free Software
023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024    
025     Contact:
026    
027     Andreas Poth
028     lat/lon GmbH
029     Aennchenstr. 19
030     53177 Bonn
031     Germany
032     E-Mail: poth@lat-lon.de
033    
034     Prof. Dr. Klaus Greve
035     Department of Geography
036     University of Bonn
037     Meckenheimer Allee 166
038     53115 Bonn
039     Germany
040     E-Mail: greve@giub.uni-bonn.de
041     
042     ---------------------------------------------------------------------------*/
043    
044    package org.deegree.portal.standard.wfs.configuration;
045    
046    import java.util.HashMap;
047    import java.util.Map;
048    
049    import org.deegree.datatypes.QualifiedName;
050    
051    /**
052     * TODO describe function and usage of the class here.
053     * 
054     * @author <a href="mailto:mays@lat-lon.de">Judit Mays</a>
055     * @author last edited by: $Author: jmays $
056     * 
057     * @version $Revision: 6868 $, $Date: 2007-05-07 17:44:28 +0200 (Mo, 07 Mai 2007) $
058     */
059    public class DigitizerClientConfiguration {
060    
061        protected Map<QualifiedName, String> featureTypeToAddressMap;
062    
063        protected Map<QualifiedName, String> featureTypeToFormTemplateMap;
064    
065        protected Map<QualifiedName, String> featureTypeToInsertTemplateMap;
066    
067        protected Map<QualifiedName, String> featureTypeToUpdateTemplateMap;
068    
069        protected Map<QualifiedName, String> featureTypeToDeleteTemplateMap;
070    
071        /**
072         * create a new DigitizeClientConfiguration object
073         */
074        public DigitizerClientConfiguration() {
075            featureTypeToAddressMap = new HashMap<QualifiedName, String>( 5 );
076            featureTypeToFormTemplateMap = new HashMap<QualifiedName, String>( 5 );
077            featureTypeToInsertTemplateMap = new HashMap<QualifiedName, String>( 5 );
078            featureTypeToUpdateTemplateMap = new HashMap<QualifiedName, String>( 5 );
079            featureTypeToDeleteTemplateMap = new HashMap<QualifiedName, String>( 5 );
080        }
081    
082        /**
083         * @param featureType
084         *            as qualified name
085         * @param wfsAddress
086         */
087        public void addFeatureTypeAddress( QualifiedName featureType, String wfsAddress ) {
088            this.featureTypeToAddressMap.put( featureType, wfsAddress );
089        }
090    
091        /**
092         * @param featureType
093         *            as qualified name
094         * @param formTemplate
095         */
096        public void addFeatureTypeFormTemplate( QualifiedName featureType, String formTemplate ) {
097            this.featureTypeToFormTemplateMap.put( featureType, formTemplate );
098    
099        }
100    
101        /**
102         * @param featureType
103         *            as qualified name
104         * @param insertTemplate
105         */
106        public void addFeatureTypeInsertTemplate( QualifiedName featureType, String insertTemplate ) {
107            this.featureTypeToInsertTemplateMap.put( featureType, insertTemplate );
108    
109        }
110    
111        /**
112         * @param featureType
113         *            as qualified name
114         * @param updateTemplate
115         */
116        public void addFeatureTypeUpdateTemplate( QualifiedName featureType, String updateTemplate ) {
117            this.featureTypeToUpdateTemplateMap.put( featureType, updateTemplate );
118    
119        }
120    
121        /**
122         * @param featureType
123         *            as qualified name
124         * @param deleteTemplate
125         */
126        public void addFeatureTypeDeleteTemplate( QualifiedName featureType, String deleteTemplate ) {
127            this.featureTypeToDeleteTemplateMap.put( featureType, deleteTemplate );
128    
129        }
130    
131        /**
132         * @param featureType
133         *            the name of the featureType
134         * @return Returns the wfs address for a given featureType. May be null, if the passed
135         *         featureType is unknown.
136         */
137        public String getFeatureTypeAddress( QualifiedName featureType ) {
138            return featureTypeToAddressMap.get( featureType );
139        }
140    
141        /**
142         * @param featureType
143         *            the name of the featureType
144         * @return Returns the form template for a given featureType. May be null, if the passed
145         *         featureType is unknown.
146         */
147        public String getFeatureTypeFormTemplate( QualifiedName featureType ) {
148            return featureTypeToFormTemplateMap.get( featureType );
149        }
150    
151        /**
152         * @param featureType
153         *            the name of the featureType
154         * @return Returns the insert template for a given featureType. May be null, if the passed
155         *         featureType is unknown.
156         */
157        public String getFeatureTypeInsertTemplate( QualifiedName featureType ) {
158            return featureTypeToInsertTemplateMap.get( featureType );
159        }
160    
161        /**
162         * @param featureType
163         *            the name of the featureType
164         * @return Returns the update template for a given featureType. May be null, if the passed
165         *         featureType is unknown.
166         */
167        public String getFeatureTypeUpdateTemplate( QualifiedName featureType ) {
168            return featureTypeToUpdateTemplateMap.get( featureType );
169        }
170    
171        /**
172         * @param featureType
173         *            the name of the featureType
174         * @return Returns the delete template for a given featureType. May be null, if the passed
175         *         featureType is unknown.
176         */
177        public String getFeatureTypeDeleteTemplate( QualifiedName featureType ) {
178            return featureTypeToDeleteTemplateMap.get( featureType );
179        }
180    
181        /**
182         * @return Returns the featureTypeToAddressMap.
183         */
184        public Map getFeatureTypeToAddressMap() {
185            return featureTypeToAddressMap;
186        }
187    
188        /**
189         * @return Returns the featureTypeToFormTemplateMap.
190         */
191        public Map getFeatureTypeToFormTemplateMap() {
192            return featureTypeToFormTemplateMap;
193        }
194    
195        /**
196         * @return Returns the featureTypeToInsertTemplateMap.
197         */
198        public Map getFeatureTypeToInsertTemplateMap() {
199            return featureTypeToInsertTemplateMap;
200        }
201    
202        /**
203         * @return Returns the featureTypeToInsertTemplateMap.
204         */
205        public Map getFeatureTypeToUpdateTemplateMap() {
206            return featureTypeToUpdateTemplateMap;
207        }
208    
209    }