Source Code Cross Referenced for NameSpaceInfoDTO.java in  » GIS » GeoServer » org » vfny » geoserver » global » dto » 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.global.dto 
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.global.dto;
006:
007:        /**
008:         * Data Transfer Object for GeoServer NameSpaceInfo information.
009:         *
010:         * <p>
011:         * Represents the portion of a namespace required for the configuration of
012:         * geoserver. Defines namespaces to be used by the datastores.
013:         * </p>
014:         *
015:         * <p>
016:         * Data Transfer object are used to communicate between the GeoServer
017:         * application and its configuration and persistent layers. As such the class
018:         * is final - to allow for its future use as an on-the-wire message.
019:         * </p>
020:         *
021:         * <p>
022:         * Jody here - does this actual defin the namespace used by the GML?
023:         * </p>
024:         *
025:         * <p>
026:         * NameSpaceInfoDTO nsDto = new NameSpaceInfoDTO(); nsDto.setDefault(false);
027:         * nsDto.setPrefix("me"); nsDto.setUri("dzwiers.refraction.net");
028:         * </p>
029:         *
030:         * @author dzwiers, Refractions Research, Inc.
031:         * @version $Id: NameSpaceInfoDTO.java 6326 2007-03-15 18:36:40Z jdeolive $
032:         */
033:        public final class NameSpaceInfoDTO implements  DataTransferObject {
034:            //public static final String PREFIX_DELIMITER = ":";
035:
036:            /** The namespace prefix. */
037:            private String prefix;
038:
039:            /** The URI for this namespace. */
040:            private String uri;
041:
042:            /** Whether this is the default namespace. */
043:            private boolean _default = false;
044:
045:            /**
046:             * NameSpaceConfig constructor.
047:             *
048:             * <p>
049:             * does nothing
050:             * </p>
051:             */
052:            public NameSpaceInfoDTO() {
053:            }
054:
055:            /**
056:             * NameSpaceConfig constructor.
057:             *
058:             * <p>
059:             * Creates a copy of the NameSpaceConfig provided. If the NameSpaceConfig
060:             * provided  is null then default values are used. All the data structures
061:             * are cloned.
062:             * </p>
063:             *
064:             * @param ns The namespace to copy.
065:             *
066:             * @throws NullPointerException DOCUMENT ME!
067:             */
068:            public NameSpaceInfoDTO(NameSpaceInfoDTO ns) {
069:                if (ns == null) {
070:                    throw new NullPointerException();
071:                }
072:
073:                prefix = ns.getPrefix();
074:                uri = ns.getUri();
075:                _default = ns.isDefault();
076:            }
077:
078:            /**
079:             * Implement clone.
080:             *
081:             * <p>
082:             * creates a clone of this object
083:             * </p>
084:             *
085:             * @return A copy of this NameSpaceConfig
086:             *
087:             * @see java.lang.Object#clone()
088:             */
089:            public Object clone() {
090:                return new NameSpaceInfoDTO(this );
091:            }
092:
093:            /**
094:             * Implement equals.
095:             *
096:             * <p>
097:             * recursively tests to determine if the object passed in is a copy of this
098:             * object.
099:             * </p>
100:             *
101:             * @param obj The NameSpaceConfig object to test.
102:             *
103:             * @return true when the object passed is the same as this object.
104:             *
105:             * @see java.lang.Object#equals(java.lang.Object)
106:             */
107:            public boolean equals(Object obj) {
108:                if ((obj == null) || !(obj instanceof  NameSpaceInfoDTO)) {
109:                    return false;
110:                }
111:
112:                NameSpaceInfoDTO ns = (NameSpaceInfoDTO) obj;
113:
114:                return ((prefix == ns.getPrefix()) && ((uri == ns.getUri()) && (_default == ns
115:                        .isDefault())));
116:            }
117:
118:            /**
119:             * Implement hashCode.
120:             *
121:             * @return Service hashcode or 0
122:             *
123:             * @see java.lang.Object#hashCode()
124:             */
125:            public int hashCode() {
126:                int r = 1;
127:
128:                if (prefix != null) {
129:                    r *= prefix.hashCode();
130:                }
131:
132:                if (uri != null) {
133:                    r *= uri.hashCode();
134:                }
135:
136:                return r;
137:            }
138:
139:            /**
140:             * isDefault purpose.
141:             *
142:             * <p>
143:             * Description ...
144:             * </p>
145:             *
146:             * @return
147:             */
148:            public boolean isDefault() {
149:                return _default;
150:            }
151:
152:            /**
153:             * getPrefix purpose.
154:             *
155:             * <p>
156:             * Description ...
157:             * </p>
158:             *
159:             * @return
160:             */
161:            public String getPrefix() {
162:                return prefix;
163:            }
164:
165:            /**
166:             * getUri purpose.
167:             *
168:             * <p>
169:             * Description ...
170:             * </p>
171:             *
172:             * @return
173:             */
174:            public String getUri() {
175:                return uri;
176:            }
177:
178:            /**
179:             * setDdefault purpose.
180:             *
181:             * <p>
182:             * Description ...
183:             * </p>
184:             *
185:             * @param b
186:             */
187:            public void setDefault(boolean b) {
188:                _default = b;
189:            }
190:
191:            /**
192:             * setPrefix purpose.
193:             *
194:             * <p>
195:             * Description ...
196:             * </p>
197:             *
198:             * @param string
199:             */
200:            public void setPrefix(String string) {
201:                prefix = string;
202:            }
203:
204:            /**
205:             * setUri purpose.
206:             *
207:             * <p>
208:             * Description ...
209:             * </p>
210:             *
211:             * @param string
212:             */
213:            public void setUri(String string) {
214:                uri = string;
215:            }
216:
217:            public String toString() {
218:                return "xmlns:" + getPrefix() + "=\"" + getUri()
219:                        + "\", isDefault=" + _default;
220:            }
221:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.