Source Code Cross Referenced for NameSpaceElement.java in  » GIS » GeoServer » org » geoserver » wfs » xml » 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.geoserver.wfs.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on Feb 5, 2004
003:         *
004:         * To change the template for this generated file go to
005:         * Window - Preferences - Java - Code Generation - Code and Comments
006:         */
007:        package org.geoserver.wfs.xml;
008:
009:        /**
010:         * NameSpaceElement purpose.
011:         * <p>
012:         * NameSpaceElement sub classes will represent a particular element
013:         * found within a particular namespace. Most of the methods below
014:         * should return constants to improve performance.
015:         * </p>
016:         *
017:         * @author dzwiers, Refractions Research, Inc.
018:         * @author $Author: dmzwiers $ (last modification)
019:         * @version $Id: NameSpaceElement.java 6177 2007-02-19 10:11:27Z aaime $
020:         */
021:        public abstract class NameSpaceElement {
022:            /** the namespace prefix to use for qualification*/
023:            protected final String prefix;
024:
025:            /**
026:             * NameSpaceElement constructor.
027:             * <p>
028:             * Creates an instance of this NameSpaceElement.
029:             * </p>
030:             * <p>
031:             * The prefix is to be used for the qualification routines.
032:             * If the prefix passed is null, then qualified names will be
033:             * null unless they have a prefix specified.
034:             * </p>
035:             * @param prefix The prefix to use for qualification.
036:             */
037:            public NameSpaceElement(String prefix) {
038:                this .prefix = prefix;
039:            }
040:
041:            /**
042:             * NameSpaceElement constructor.
043:             * <p>
044:             * Creates an instance of this NameSpaceElement.
045:             * </p>
046:             * <p>
047:             * The prefix is to be used for the qualification routines is set to null.
048:             * the qualified names of the elements will be null
049:             * </p>
050:             */
051:            public NameSpaceElement() {
052:                this .prefix = null;
053:            }
054:
055:            /**
056:             * getTypeDefName purpose.
057:             * <p>
058:             * This will return the name of the definition of the element.
059:             * This method is useful when defining a new type and wish to
060:             * extend an existing defined type, such as
061:             * <code>gml:AbstractFeatureType</code>.
062:             * </p>
063:             * <p>
064:             * <code>
065:             * <xs:complexType name="Lines_Type">
066:             *   <xs:complexContent>
067:             *     <xs:extension base="gml:AbstractFeatureType">
068:             *      <xs:sequence>
069:             *        <xs:element name="id" type="xs:string"/>
070:             *      <xs:element ref="gml:lineStringProperty" minOccurs="0"/>
071:             *     </xs:sequence>
072:             *    </xs:extension>
073:             *   </xs:complexContent>
074:             * </xs:complexType>
075:             * </code>
076:             * </p>
077:             * @return The type def. name, for the above example AbstractFeatureType.
078:             */
079:            public abstract String getTypeDefName();
080:
081:            /**
082:             * getTypeDefName purpose.
083:             * <p>
084:             * This will return the name of the element.
085:             * This method is useful when defining a new element and wish to
086:             * extend an existing element, such as <code>xs:string</code>.
087:             * </p>
088:             * <p>
089:             * <code>
090:             * <xs:element name="id" type="xs:string"/>
091:             * <xs:element ref="gml:lineStringProperty" minOccurs="0"/>
092:             * </code>
093:             * </p>
094:             * @return The element name, for the above example string or lineStringProperty.
095:             */
096:            public abstract String getTypeRefName();
097:
098:            /**
099:             * getQualifiedTypeDefName purpose.
100:             * <p>
101:             * Returns a qualified type definition name <code>prefix:definition name</code>.
102:             * </p>
103:             * @return the name if the default prefix is non null, null otherwise
104:             * @see getTypeDefName()
105:             */
106:            public abstract String getQualifiedTypeDefName();
107:
108:            /**
109:             * getQualifiedTypeRefName purpose.
110:             * <p>
111:             * Returns a qualified type reference name <code>prefix:reference name</code>.
112:             * </p>
113:             * @return the name if the default prefix is non null, null otherwise
114:             * @see getTypeRefName()
115:             */
116:            public abstract String getQualifiedTypeRefName();
117:
118:            /**
119:             * getQualifiedTypeDefName purpose.
120:             * <p>
121:             * Returns a qualified type definition name <code>prefix:definition name</code> with the specified prefix.
122:             * </p>
123:             * @param prefix The prefix to use for qualification.
124:             * @return the name if either the specified or default prefix is non null, null otherwise
125:             * @see getTypeDefName()
126:             */
127:            public abstract String getQualifiedTypeDefName(String prefix);
128:
129:            /**
130:             * getQualifiedTypeRefName purpose.
131:             * <p>
132:             * Returns a qualified type reference name <code>prefix:reference name</code> with the specified prefix.
133:             * </p>
134:             * @param prefix The prefix to use for qualification.
135:             * @return the name if either the specified or default prefix is non null, null otherwise
136:             * @see getTypeRefName()
137:             */
138:            public abstract String getQualifiedTypeRefName(String prefix);
139:
140:            /**
141:             * getJavaClass purpose.
142:             * <p>
143:             * Returns an instance of the Class object which would best represent this element.
144:             * </p>
145:             * <p>
146:             * for example an element of type xs:int would return <code>Integer.class</code>.
147:             * </p>
148:             * @return Class instance of the Class object which would best represent this element.
149:             */
150:            public abstract Class getJavaClass();
151:
152:            /**
153:             * This is a bit of a hack, so that GeoServer can generate with the best
154:             * (default) xml mappings for each Java class.  This should be implemented
155:             * the other way around, with a nice lookup table to get the one and only
156:             * default.  But this is far easier to implement, as we just add this
157:             * method set to true for the namespace element classes we like best.  If
158:             * for some reason we set two NSE's that map to the same java class to true
159:             * then things will behave randomly, which is why this is a bit of a hack.
160:             * Apologies, it's late, and I need to finish my docs.
161:             */
162:            public boolean isDefault() {
163:                return false;
164:            }
165:
166:            /* (non-Javadoc)
167:             * @see java.lang.Object#toString()
168:             */
169:            public String toString() {
170:                return getQualifiedTypeDefName(prefix);
171:            }
172:
173:            public abstract boolean isAbstract();
174:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.