Source Code Cross Referenced for SimpleSchema.java in  » GIS » GeoTools-2.4.1 » org » geotools » feature » iso » simple » 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 » GeoTools 2.4.1 » org.geotools.feature.iso.simple 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.geotools.feature.iso.simple;
002:
003:        import java.util.Calendar;
004:        import java.util.Collections;
005:        import java.util.Date;
006:
007:        import org.geotools.feature.iso.type.AttributeTypeImpl;
008:        import org.geotools.feature.iso.type.GeometryTypeImpl;
009:        import org.geotools.feature.iso.type.SchemaImpl;
010:        import org.geotools.feature.type.TypeName;
011:        import org.opengis.feature.type.AttributeType;
012:        import org.opengis.feature.type.GeometryType;
013:
014:        import com.vividsolutions.jts.geom.Geometry;
015:        import com.vividsolutions.jts.geom.GeometryCollection;
016:        import com.vividsolutions.jts.geom.LineString;
017:        import com.vividsolutions.jts.geom.LinearRing;
018:        import com.vividsolutions.jts.geom.MultiLineString;
019:        import com.vividsolutions.jts.geom.MultiPoint;
020:        import com.vividsolutions.jts.geom.MultiPolygon;
021:        import com.vividsolutions.jts.geom.Point;
022:        import com.vividsolutions.jts.geom.Polygon;
023:
024:        /**
025:         * Schema containing a simple set of types for import into
026:         * the SimpleFeatureBuilder.
027:         * <p>
028:         * These types represent a good choice for default java bindings, for data
029:         * sources that do not have specific or complicated needs. As such these
030:         * types are made available as static final constants to be inlined in code
031:         * where needed.
032:         * </p>
033:         * When would you not use this class?
034:         * <ul>
035:         * <li><b>For specific mappings:</b> Create a custom Schema when working with GML or where specific XML Schema
036:         *    mappings are useful to track.
037:         * <li><b>For restricted basic types:</b> Create a custom Schema when working with a Data Source that has different
038:         *    needs for "basic" types. Shapefile for example needs a length restriction
039:         *    on its Text type and cannot make use of STRING as provided here.
040:         * </ul>
041:         * 
042:         * @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
043:         */
044:        public class SimpleSchema extends SchemaImpl {
045:
046:            public static final String NAMESPACE = "http://www.geotools.org/simple";
047:            //
048:            // Builtin Java Types
049:            //
050:            /** BOOLEAN to Boolean.class */
051:            public static final AttributeType BOOLEAN = new AttributeTypeImpl(
052:                    new TypeName(NAMESPACE, "boolean"), Boolean.class, false,
053:                    false, Collections.EMPTY_SET, null, null);
054:            /** String to String.class */
055:            public static final AttributeType STRING = new AttributeTypeImpl(
056:                    new TypeName(NAMESPACE, "string"), String.class, false,
057:                    false, Collections.EMPTY_SET, null, null);
058:            //
059:            // Numerics
060:            //
061:            /** NUMBER to Number.class */
062:            public static final AttributeType NUMBER = new AttributeTypeImpl(
063:                    new TypeName(NAMESPACE, "number"), Number.class, false,
064:                    false, Collections.EMPTY_SET, null, null);
065:            /**
066:             * INTEGER to java Integer.class
067:             */
068:            public static final AttributeType INTEGER = new AttributeTypeImpl(
069:                    new TypeName(NAMESPACE, "integer"), Integer.class, false,
070:                    false, Collections.EMPTY_SET, NUMBER, null);
071:            /**
072:             * FLOAT to java Float.class
073:             */
074:            public static final AttributeType FLOAT = new AttributeTypeImpl(
075:                    new TypeName(NAMESPACE, "float"), Float.class, false,
076:                    false, Collections.EMPTY_SET, NUMBER, null);
077:            /** DOUBLE to Double.class */
078:            public static final AttributeType DOUBLE = new AttributeTypeImpl(
079:                    new TypeName(NAMESPACE, "double"), Double.class, false,
080:                    false, Collections.EMPTY_SET, NUMBER, null);
081:            /** LONG to Long.class */
082:            public static final AttributeType LONG = new AttributeTypeImpl(
083:                    new TypeName(NAMESPACE, "long"), Long.class, false, false,
084:                    Collections.EMPTY_SET, NUMBER, null);
085:            /** SHORT to Short.class */
086:            public static final AttributeType SHORT = new AttributeTypeImpl(
087:                    new TypeName(NAMESPACE, "short"), Short.class, false,
088:                    false, Collections.EMPTY_SET, NUMBER, null);
089:            /** BYTE to Byte.class */
090:            public static final AttributeType BYTE = new AttributeTypeImpl(
091:                    new TypeName(NAMESPACE, "byte"), Byte.class, false, false,
092:                    Collections.EMPTY_SET, NUMBER, null);
093:
094:            //
095:            // TEMPORAL
096:            //
097:            /** DATE to Data.class */
098:            public static final AttributeType DATE = new AttributeTypeImpl(
099:                    new TypeName(NAMESPACE, "date"), Date.class, false, false,
100:                    Collections.EMPTY_SET, null, null);
101:            /**
102:             * DATETIME to Calendar.class.
103:             * <p>
104:             * Data and a Time like a timestamp.
105:             */
106:            public static final AttributeType DATETIME = new AttributeTypeImpl(
107:                    new TypeName(NAMESPACE, "datetime"), Calendar.class, false,
108:                    false, Collections.EMPTY_SET, null, null);
109:
110:            //
111:            // Geomtries
112:            //
113:            /** Geometry to Geometry.class */
114:            public static final GeometryType GEOMETRY = new GeometryTypeImpl(
115:                    new TypeName(NAMESPACE, "geometry"), Geometry.class, null,
116:                    false, false, Collections.EMPTY_SET, null, null);
117:            /** POINT (extends GEOMETRY) binds to Point.class */
118:            public static final GeometryType POINT = new GeometryTypeImpl(
119:                    new TypeName(NAMESPACE, "point"), Point.class, null, false,
120:                    false, Collections.EMPTY_SET, GEOMETRY, null);
121:            /** LINESTRING (extends GEOMETRY) binds to LineString.class */
122:            public static final GeometryType LINESTRING = new GeometryTypeImpl(
123:                    new TypeName(NAMESPACE, "linestring"), LineString.class,
124:                    null, false, false, Collections.EMPTY_SET, GEOMETRY, null);
125:            /** LINEARRING (extends GEOMETRY) binds to LinearRing.class */
126:            public static final GeometryType LINEARRING = new GeometryTypeImpl(
127:                    new TypeName(NAMESPACE, "linearring"), LinearRing.class,
128:                    null, false, false, Collections.EMPTY_SET, LINESTRING, null);
129:            /**  POLYGON (extends GEOMETRY) binds to Polygon.class */
130:            public static final GeometryType POLYGON = new GeometryTypeImpl(
131:                    new TypeName(NAMESPACE, "polygon"), Polygon.class, null,
132:                    false, false, Collections.EMPTY_SET, GEOMETRY, null);
133:            /**  MULTIGEOMETRY (extends GEOMETRY) binds to GeometryCollection.class */
134:            public static final GeometryType MULTIGEOMETRY = new GeometryTypeImpl(
135:                    new TypeName(NAMESPACE, "multigeometry"),
136:                    GeometryCollection.class, null, false, false,
137:                    Collections.EMPTY_SET, GEOMETRY, null);
138:
139:            /**  MULTIPOINT (extends MULTIGEOMETRY) binds to MultiPoint.class */
140:            public static final GeometryType MULTIPOINT = new GeometryTypeImpl(
141:                    new TypeName(NAMESPACE, "multipoint"), MultiPoint.class,
142:                    null, false, false, Collections.EMPTY_SET, MULTIGEOMETRY,
143:                    null);
144:
145:            /**  MULTILINESTRING (extends MULTIGEOMETRY) binds to MultiLineString.class */
146:            public static final GeometryType MULTILINESTRING = new GeometryTypeImpl(
147:                    new TypeName(NAMESPACE, "multilinestring"),
148:                    MultiLineString.class, null, false, false,
149:                    Collections.EMPTY_SET, MULTIGEOMETRY, null);
150:
151:            /** MULTIPOLYGON (extends MULTIGEOMETRY) binds to MultiPolygon.class */
152:            public static final GeometryType MULTIPOLYGON = new GeometryTypeImpl(
153:                    new TypeName(NAMESPACE, "multipolygon"),
154:                    MultiPolygon.class, null, false, false,
155:                    Collections.EMPTY_SET, MULTIGEOMETRY, null);
156:
157:            public SimpleSchema() {
158:                super(NAMESPACE);
159:
160:                put(INTEGER.getName(), INTEGER);
161:                put(DOUBLE.getName(), DOUBLE);
162:                put(LONG.getName(), LONG);
163:                put(FLOAT.getName(), FLOAT);
164:                put(SHORT.getName(), SHORT);
165:                put(BYTE.getName(), BYTE);
166:                put(NUMBER.getName(), NUMBER);
167:                put(STRING.getName(), STRING);
168:                put(BOOLEAN.getName(), BOOLEAN);
169:                put(DATE.getName(), DATE);
170:                put(DATETIME.getName(), DATETIME);
171:
172:                put(GEOMETRY.getName(), GEOMETRY);
173:                put(POINT.getName(), POINT);
174:                put(LINESTRING.getName(), LINESTRING);
175:                put(LINEARRING.getName(), LINEARRING);
176:                put(POLYGON.getName(), POLYGON);
177:                put(MULTIGEOMETRY.getName(), MULTIGEOMETRY);
178:                put(MULTIGEOMETRY.getName(), MULTIGEOMETRY);
179:                put(MULTIPOINT.getName(), MULTIPOINT);
180:                put(MULTILINESTRING.getName(), MULTILINESTRING);
181:                put(MULTIPOLYGON.getName(), MULTIPOLYGON);
182:
183:            }
184:
185:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.