Source Code Cross Referenced for NameSpaceConfig.java in  » GIS » GeoServer » org » vfny » geoserver » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoServer » org.vfny.geoserver.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
002:         * This code is licensed under the GPL 2.0 license, availible at the root
003:         * application directory.
004:         */
005:        package org.vfny.geoserver.config;
006:
007:        import org.vfny.geoserver.global.dto.NameSpaceInfoDTO;
008:
009:        /**
010:         * NameSpaceConfig purpose.
011:         *
012:         * <p>
013:         * Represents the portion of a namespace required for the configuration of
014:         * geoserver. Defines namespaces to be used by the datastores.
015:         * </p>
016:         *
017:         * <p></p>
018:         *
019:         * @author dzwiers, Refractions Research, Inc.
020:         * @version $Id: NameSpaceConfig.java 6326 2007-03-15 18:36:40Z jdeolive $
021:         */
022:        public class NameSpaceConfig {
023:            //public static final String PREFIX_DELIMITER = ":";
024:
025:            /** The namespace prefix. */
026:            private String prefix;
027:
028:            /** The URI for this namespace. */
029:            private String uri;
030:
031:            /** Whether this is the default namespace. */
032:            private boolean _default;
033:
034:            /**
035:             * NameSpaceConfig constructor.
036:             *
037:             * <p>
038:             * Creates a NameSpaceConfig to represent an instance with default data.
039:             * </p>
040:             *
041:             * @see defaultSettings()
042:             */
043:            public NameSpaceConfig() {
044:                prefix = "";
045:                uri = "";
046:                _default = false;
047:            }
048:
049:            /**
050:             * NameSpaceConfig constructor.
051:             *
052:             * <p>
053:             * Creates a copy of the NameSpaceConfig provided. If the NameSpaceConfig
054:             * provided  is null then default values are used. All the data structures
055:             * are cloned.
056:             * </p>
057:             *
058:             * @param ns The namespace to copy.
059:             *
060:             * @throws NullPointerException DOCUMENT ME!
061:             */
062:            public NameSpaceConfig(NameSpaceInfoDTO ns) {
063:                if (ns == null) {
064:                    throw new NullPointerException("");
065:                }
066:
067:                prefix = ns.getPrefix();
068:                uri = ns.getUri();
069:                _default = ns.isDefault();
070:            }
071:
072:            /**
073:             * Implement loadDTO.
074:             *
075:             * <p>
076:             * Imports the data contained in the NameSpaceInfoDTO object provided.
077:             * </p>
078:             *
079:             * @param dto An NameSpaceInfoDTO object
080:             *
081:             * @throws NullPointerException DOCUMENT ME!
082:             *
083:             * @see org.vfny.geoserver.config.DataStructure#loadDTO(java.lang.Object)
084:             */
085:            public void update(NameSpaceInfoDTO dto) {
086:                if (dto == null) {
087:                    throw new NullPointerException(
088:                            "NameSpace Data Transfer Object required");
089:                }
090:
091:                NameSpaceInfoDTO ns = (NameSpaceInfoDTO) dto;
092:                prefix = ns.getPrefix();
093:                uri = ns.getUri();
094:                _default = ns.isDefault();
095:            }
096:
097:            /**
098:             * Implement toDTO.
099:             *
100:             * <p>
101:             * Creates a DTO representation of this Object as a NameSpaceInfoDTO
102:             * </p>
103:             *
104:             * @return a NameSpaceInfoDTO which representts the data in this class.
105:             *
106:             * @see org.vfny.geoserver.config.DataStructure#toDTO()
107:             */
108:            public NameSpaceInfoDTO toDTO() {
109:                NameSpaceInfoDTO nsDto = new NameSpaceInfoDTO();
110:                nsDto.setDefault(_default);
111:                nsDto.setPrefix(prefix);
112:                nsDto.setUri(uri);
113:
114:                return nsDto;
115:            }
116:
117:            /**
118:             * isDefault purpose.
119:             *
120:             * <p>
121:             * Description ...
122:             * </p>
123:             *
124:             * @return
125:             */
126:            public boolean isDefault() {
127:                return _default;
128:            }
129:
130:            /**
131:             * getPrefix purpose.
132:             *
133:             * <p>
134:             * Description ...
135:             * </p>
136:             *
137:             * @return
138:             */
139:            public String getPrefix() {
140:                return prefix;
141:            }
142:
143:            /**
144:             * getUri purpose.
145:             *
146:             * <p>
147:             * Description ...
148:             * </p>
149:             *
150:             * @return
151:             */
152:            public String getUri() {
153:                return uri;
154:            }
155:
156:            /**
157:             * setDdefault purpose.
158:             *
159:             * <p>
160:             * Description ...
161:             * </p>
162:             *
163:             * @param b
164:             */
165:            public void setDefault(boolean b) {
166:                _default = b;
167:            }
168:
169:            /**
170:             * setPrefix purpose.
171:             *
172:             * <p>
173:             * Description ...
174:             * </p>
175:             *
176:             * @param string
177:             */
178:            public void setPrefix(String string) {
179:                prefix = string;
180:            }
181:
182:            /**
183:             * setUri purpose.
184:             *
185:             * <p>
186:             * Description ...
187:             * </p>
188:             *
189:             * @param string
190:             */
191:            public void setUri(String string) {
192:                uri = string;
193:            }
194:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.