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


001:        /*
002:         *    Geotools2 - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2005-2006, GeoTools Project Managment Committee (PMC)
005:         *
006:         *    This library is free software; you can redistribute it and/or
007:         *    modify it under the terms of the GNU Lesser General Public
008:         *    License as published by the Free Software Foundation;
009:         *    version 2.1 of the License.
010:         *
011:         *    This library is distributed in the hope that it will be useful,
012:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         *    Lesser General Public License for more details.
015:         *
016:         */
017:        package org.geotools.data;
018:
019:        import java.util.Set;
020:
021:        import junit.framework.TestCase;
022:
023:        import org.geotools.feature.Name;
024:        import org.geotools.feature.iso.TypeBuilder;
025:        import org.geotools.referencing.CRS;
026:        import org.opengis.feature.type.AttributeType;
027:        import org.opengis.feature.type.ComplexType;
028:        import org.opengis.feature.type.FeatureType;
029:        import org.opengis.feature.type.GeometryType;
030:        import org.opengis.feature.type.TypeFactory;
031:        import org.opengis.referencing.crs.CoordinateReferenceSystem;
032:
033:        import com.vividsolutions.jts.geom.Geometry;
034:        import com.vividsolutions.jts.geom.Point;
035:
036:        /**
037:         * 
038:         * @author Gabriel Roldan, Axios Engineering
039:         * @version $Id: ComplexTestData.java 25814 2007-06-12 12:03:41Z groldan $
040:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/community-schemas/community-schema-ds/src/test/java/org/geotools/data/ComplexTestData.java $
041:         * @since 2.4
042:         */
043:        public abstract class ComplexTestData extends TestCase {
044:
045:            public static final String NSURI = "http://online.socialchange.net.au";
046:
047:            public static final String GML_NSURI = "http://www.opengis.net/gml";
048:
049:            /**
050:             * <pre>
051:             * <code>
052:             *           	 FeatureType[
053:             *           		name = wq_plus
054:             *           	 	identified = true
055:             *           	 	super = Feature
056:             *           	 	abstract = false
057:             *           	 	binding = Feature.class
058:             *           	 	restrictions = EMPTY_SET
059:             *           	 	nillable = false
060:             *           	 	defaultGeometry = #location
061:             *           	 	descriptor = OrderedDescriptor(1, 1)[
062:             *           	 		sequence = List[
063:             *           	 			AttributeDescriptor(1, 1)[
064:             *           	 					type = AttributeType[
065:             *           	 					name = sitename
066:             *           	 					identified = false
067:             *           	 					super = null 
068:             *           	 					abstract = false
069:             *           	 					binding = String.class
070:             *           	 					restrictions = EMPTY_SET
071:             *           	 					nillable = false
072:             *           	 				]
073:             *           	 			],
074:             *           	 			AttributeDescriptor(0, 1)[
075:             *           	 				type = AttributeType[
076:             *           						name = anzlic_no
077:             *           						identified = false
078:             *           						super = null 
079:             *           						abstract = false
080:             *           						binding = String.class
081:             *           						restrictions = EMPTY_SET
082:             *           						nillable = true
083:             *           	 				]
084:             *           	 			],
085:             *           	 			AttributeDescriptor(0, 1)[
086:             *           	 				type = GeometryAttribute[
087:             *           	 					name = location
088:             *           	 					identified = false
089:             *           	 					super = HERE WE NEED TO REFER TO  gml:LocationPropertyType
090:             *           	 					abstract = false
091:             *           	 					binding = Point.class
092:             *           	 					restrictions = EMPTY_SET
093:             *           	 					nillable = true
094:             *           	 				]
095:             *           	 			],
096:             *           	 			AttributeDescriptor (0, Integer.MAX_VALUE)[
097:             *           	 				type = ComplexType[
098:             *           	 					name = measurement
099:             *           	 					identified = true
100:             *           	 					super = null 
101:             *           	 					abstract = false
102:             *           	 					binding = null
103:             *           	 					restrictions = EMPTY_SET
104:             *           	 					nillable = true
105:             *           	 					descriptor = OrderedDescriptor(0, Integer.MAX_VALUE)[
106:             *           	 						AttributeDescriptor(1, 1)[
107:             *           	 							type = AttributeType[
108:             *           	 								name = determinand_description
109:             *           	 								identified = false
110:             *           	 								super = null 
111:             *           	 								abstract = false
112:             *           	 								binding = String.class
113:             *           	 								restrictions = EMPTY_SET
114:             *           	 								nillable = false
115:             *           	 							]
116:             *           	 						],
117:             *           	 						AttributeDescriptor(1, 1)[
118:             *           	 							type = AttributeType[
119:             *           	 								name = result
120:             *           	 								identified = false
121:             *           	 								super = null 
122:             *           	 								abstract = false
123:             *           	 								binding = String.class
124:             *           	 								restrictions = EMPTY_SET
125:             *           	 								nillable = false
126:             *           	 							]
127:             *           	 						]
128:             *           	 					]//OrderedDescriptor
129:             *           	 				] //ComplexType
130:             *           	 			], //measurement
131:             *           	 			AttributeDescriptor(0, 1)[
132:             *           	 				type = AttributeType[
133:             *           	 					name = project_no
134:             *           	 					identified = false
135:             *           	 					super = null 
136:             *           	 					abstract = false
137:             *           	 					binding = String.class
138:             *           	 					restrictions = EMPTY_SET
139:             *           	 					nillable = false
140:             *           	 				]
141:             *           	 			]
142:             *           	 		]
143:             *           	 	]
144:             *           	 ]	 
145:             * </code>
146:             * </pre>
147:             * 
148:             * @param typeFactory
149:             * @param descFactory
150:             * @return
151:             */
152:            public static FeatureType createExample01MultiValuedComplexProperty(
153:                    TypeFactory typeFactory) {
154:                FeatureType wqPlusType;
155:
156:                TypeBuilder builder = new TypeBuilder(typeFactory);
157:                builder.setNamespaceURI(NSURI);
158:
159:                builder.setName("sitename");
160:                builder.setBinding(String.class);
161:                AttributeType SITENAME = builder.attribute();
162:
163:                builder.setName("anzlic_noType");
164:                builder.setBinding(String.class);
165:                AttributeType ANZLIC_NO = builder.attribute();
166:
167:                builder.setName("locationType");
168:                builder.setBinding(Point.class);
169:                GeometryType LOCATION = builder.geometry();
170:
171:                // build complex attribute
172:                AttributeType MEASUREMENT = createMeasurementType(typeFactory);
173:
174:                builder.setName("project_noType");
175:                builder.setBinding(String.class);
176:                AttributeType PROJECT_NO = builder.attribute();
177:
178:                builder.setName("wq_plus");
179:
180:                builder.cardinality(1, 1);
181:                builder.addAttribute("sitename", SITENAME);
182:
183:                builder.cardinality(0, 1);
184:                builder.addAttribute("anzlic_no", ANZLIC_NO);
185:
186:                builder.cardinality(0, 1);
187:                builder.addAttribute("location", LOCATION);
188:
189:                builder.cardinality(0, Integer.MAX_VALUE);
190:                builder.addAttribute("measurement", MEASUREMENT);
191:
192:                builder.cardinality(0, 1);
193:                builder.addAttribute("project_no", PROJECT_NO);
194:
195:                wqPlusType = builder.feature();
196:
197:                return wqPlusType;
198:            }
199:
200:            /**
201:             * A feature type that has various multi-valued properties.
202:             * <p>
203:             * Multi valued properties: meassurement(0:unbounded),
204:             * sitename(1:unbounded).
205:             * 
206:             * <pre>
207:             * <code>
208:             * </code>
209:             * </pre>
210:             * 
211:             * </p>
212:             * 
213:             * @param typeFactory
214:             * @param descFactory
215:             * @return
216:             */
217:            public static FeatureType createExample02MultipleMultivalued(
218:                    TypeFactory typeFactory) {
219:
220:                TypeBuilder builder = new TypeBuilder(typeFactory);
221:                builder.setNamespaceURI(NSURI);
222:
223:                AttributeType measurement = createMeasurementType(typeFactory);
224:                AttributeType the_geom = builder.name("the_geom").bind(
225:                        Geometry.class).attribute();
226:                AttributeType sitename = builder.name("sitename").bind(
227:                        String.class).attribute();
228:
229:                builder.cardinality(0, Integer.MAX_VALUE);
230:                builder.addAttribute("measurement", measurement);
231:
232:                builder.cardinality(1, 1);
233:                builder.addAttribute("the_geom", the_geom);
234:
235:                builder.nillable(true);
236:                builder.cardinality(1, Integer.MAX_VALUE);
237:                builder.addAttribute("sitename", sitename);
238:
239:                builder.setName("wq_plus");
240:                FeatureType wqPlusType = builder.feature();
241:                return wqPlusType;
242:            }
243:
244:            /**
245:             * A feature may have multiple geometries
246:             * 
247:             * <pre><code>
248:             *    	 &lt;xs:complexType name=&quot;measurement_Type&quot;&gt;
249:             *    	 &lt;xs:sequence&gt;
250:             *    	 &lt;xs:element name=&quot;determinand_description&quot; type=&quot;xs:string&quot;/&gt;
251:             *    	 &lt;xs:element name=&quot;result&quot; type=&quot;xs:string&quot;/&gt;
252:             *    	 &lt;/xs:sequence&gt;            
253:             *    	 &lt;xs:attribute ref=&quot;gml:id&quot; use=&quot;optional&quot;/&gt;
254:             *    	 &lt;/xs:complexType&gt; 
255:             *    	 
256:             *    	 &lt;xs:complexType name=&quot;wq_plus_Type&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
257:             *    	 &lt;xs:complexContent&gt;
258:             *    	 &lt;xs:extension base=&quot;gml:AbstractFeatureType&quot;&gt;
259:             *    	 &lt;xs:sequence&gt;
260:             *    	 &lt;xs:element name=&quot;measurement&quot; maxOccurs=&quot;unbounded&quot; type=&quot;sco:measurement_Type&quot;/&gt;
261:             *    	 
262:             *    	 &lt;xs:element name=&quot;location&quot; type=&quot;gml:LocationPropertyType&quot;/&gt;
263:             *    	 &lt;xs:element name=&quot;nearestSlimePit&quot; type=&quot;gml:PointPropertyType&quot;/&gt; 
264:             *    	 &lt;xs:element name=&quot;sitename&quot; maxOccurs=&quot;unbounded&quot; nillable=&quot;false&quot; type=&quot;xs:string&quot; /&gt;
265:             *    	 &lt;/xs:sequence&gt;
266:             *    	 &lt;/xs:extension&gt;
267:             *    	 &lt;/xs:complexContent&gt;
268:             *    	 &lt;/xs:complexType&gt;
269:             *    	 
270:             *    	 &lt;xs:element name='wq_plus' type='sco:wq_plus_Type' substitutionGroup=&quot;gml:_Feature&quot; /&gt;
271:             * </code></pre>
272:             * 
273:             * @param typeFactory
274:             * @param descFactory
275:             * @return
276:             */
277:            public static FeatureType createExample03MultipleGeometries(
278:                    TypeFactory typeFactory) {
279:                TypeBuilder builder = new TypeBuilder(typeFactory);
280:                builder.setNamespaceURI(NSURI);
281:
282:                AttributeType measurement = createMeasurementType(typeFactory);
283:
284:                AttributeType gmlLocationAssociation = createGmlLocation(typeFactory);
285:
286:                AttributeType gmlPointAssociation = createGmlPoint(typeFactory);
287:
288:                builder.setName("wq_plus");
289:                builder.cardinality(0, Integer.MAX_VALUE);
290:                builder.addAttribute("measurement", measurement);
291:
292:                builder.cardinality(1, 1);
293:                builder.nillable(true);
294:                builder.addAttribute("location", gmlLocationAssociation);
295:
296:                builder.cardinality(1, 1);
297:                builder.nillable(true);
298:                builder.addAttribute("nearestSlimePit", gmlPointAssociation);
299:
300:                builder.cardinality(1, Integer.MAX_VALUE);
301:                builder.addAttribute("sitename", String.class);
302:
303:                // use the second geometry attribute as the default one just for testing
304:                builder.defaultGeometry("nearestSlimePit");
305:
306:                FeatureType wqPlusType = builder.feature();
307:
308:                return wqPlusType;
309:            }
310:
311:            /**
312:             * 
313:             * @param typeFactory
314:             * @param descFactory
315:             * @return
316:             */
317:            public static FeatureType createExample04Type(
318:                    TypeFactory typeFactory) {
319:                TypeBuilder builder = new TypeBuilder(typeFactory);
320:                builder.setNamespaceURI(NSURI);
321:
322:                builder.cardinality(1, Integer.MAX_VALUE);
323:                builder.addAttribute("name", String.class);
324:
325:                builder.setName(GML_NSURI);
326:                builder.cardinality(1, Integer.MAX_VALUE);
327:                builder.addAttribute("name", String.class);
328:
329:                builder.setNamespaceURI(NSURI);
330:                builder.setName("wq_plus");
331:
332:                FeatureType wqPlusType = builder.feature();
333:                return wqPlusType;
334:            }
335:
336:            /**
337:             * Creates a FeatureType for the Road
338:             * 
339:             * <pre><code>
340:             *      	 &lt;xs:element name=&quot;roadRef&quot; type=&quot;sco:RoadPropertyType&quot;/&gt;
341:             *      	 &lt;xs:element name=&quot;junctionRef&quot; type=&quot;sco:JunctionPropertyType&quot;/&gt;
342:             *      
343:             *      	 &lt;xs:complexType name=&quot;RoadPropertyType&quot;&gt;
344:             *      	 &lt;xs:annotation&gt;
345:             *      	 &lt;xs:documentation&gt;Container for a road - follow gml:AssociationType pattern.&lt;/xs:documentation&gt;
346:             *      	 &lt;/xs:annotation&gt;
347:             *      	 &lt;xs:sequence minOccurs=&quot;0&quot;&gt;
348:             *      	 &lt;xs:element ref=&quot;sco:Road&quot; /&gt;
349:             *      	 &lt;/xs:sequence&gt;
350:             *      	 &lt;xs:attributeGroup ref=&quot;gml:AssociationAttributeGroup&quot; /&gt;
351:             *      	 &lt;/xs:complexType&gt;
352:             *      
353:             *      	 &lt;xs:complexType name=&quot;JunctionPropertyType&quot;&gt;
354:             *      	 &lt;xs:annotation&gt;
355:             *      	 &lt;xs:documentation&gt;Container for a junction - follow gml:AssociationType pattern.&lt;/xs:documentation&gt;
356:             *      	 &lt;/xs:annotation&gt;
357:             *      	 &lt;xs:sequence minOccurs=&quot;0&quot;&gt;
358:             *      	 &lt;xs:element ref=&quot;sco:Junction&quot; /&gt;
359:             *      	 &lt;/xs:sequence&gt;
360:             *      	 &lt;xs:attributeGroup ref=&quot;gml:AssociationAttributeGroup&quot; /&gt;
361:             *      	 &lt;/xs:complexType&gt;
362:             *      
363:             *      	 &lt;xs:complexType name=&quot;RoadType&quot;&gt;
364:             *      	 &lt;xs:complexContent&gt;
365:             *      	 &lt;xs:extension base=&quot;gml:AbstractFeatureType&quot;&gt;
366:             *      	 &lt;xs:sequence&gt;
367:             *      	 &lt;xs:element name=&quot;geom&quot; type=&quot;gml:CurvePropertyType&quot; minOccurs=&quot;0&quot; /&gt;
368:             *      	 &lt;xs:element ref=&quot;sco:junctionRef&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; /&gt;
369:             *      	 &lt;/xs:sequence&gt;
370:             *      	 &lt;/xs:extension&gt;
371:             *      	 &lt;/xs:complexContent&gt;
372:             *      	 &lt;/xs:complexType&gt;
373:             *      
374:             *      	 &lt;xs:complexType name=&quot;JunctionType&quot;&gt;
375:             *      	 &lt;xs:complexContent&gt;
376:             *      	 &lt;xs:extension base=&quot;gml:AbstractFeatureType&quot;&gt;
377:             *      	 &lt;xs:sequence&gt;
378:             *      	 &lt;xs:element ref=&quot;sco:roadRef&quot; /&gt;
379:             *      	 &lt;xs:element name=&quot;direction&quot; type=&quot;xs:int&quot; /&gt;
380:             *      	 &lt;/xs:sequence&gt;
381:             *      	 &lt;/xs:extension&gt;
382:             *      	 &lt;/xs:complexContent&gt;
383:             *      	 &lt;/xs:complexType&gt;
384:             *      
385:             *      	 &lt;xs:element name='Junction' type='sco:JunctionType' substitutionGroup=&quot;gml:_Feature&quot; /&gt;
386:             *      	 &lt;xs:element name='Road' type='sco:RoadType' substitutionGroup=&quot;gml:_Feature&quot; /&gt;
387:             *      
388:             * </code></pre>
389:             * 
390:             */
391:            /*
392:             * public static FeatureType createExample05RoadType(TypeFactory
393:             * typeFactory, DescriptorFactory descFactory) { List<Descriptor>
394:             * roadContents = new ArrayList<Descriptor>();
395:             * 
396:             * //create association type to reference junction GenericName
397:             * junctionTypeName = new GenericName(NSURI, "Junction"); AttributeType
398:             * junctionReference = typeFactory.createAssociationType(junctionTypeName);
399:             * 
400:             * List<Descriptor> junctionRefContents = new ArrayList<Descriptor>();
401:             * junctionRefContents.add(descFactory.node(junctionReference, 1, 1));
402:             * 
403:             * Descriptor junctionPropertySchema =
404:             * descFactory.ordered(junctionRefContents, 0, 1); ComplexType junctionRef =
405:             * typeFactory.createType(new GenericName("functionRef"),
406:             * junctionPropertySchema);
407:             * 
408:             * 
409:             * //create junction type List<Descriptor> junctionContents = new ArrayList<Descriptor>();
410:             * 
411:             * FeatureType roadType = typeFactory.createFeatureType(new
412:             * GenericName(NSURI), roadSchema, null);
413:             * 
414:             * List<Descriptor>roadRefContents = new ArrayList<Descriptor>();
415:             * 
416:             * roadRefContents.add(descFactory.node(RoadType, 1, 1)); Descriptor
417:             * roadRefDesc = descFactory.ordered(roadRefContents, 0, 1); ComplexType
418:             * roadRef = typeFactory.createType(new GenericName(NSURI, "roadRef"),
419:             * roadRefDesc); AttributeType direction = typeFactory.createType(new
420:             * GenericName(NSURI, "direction"), Integer.class);
421:             * junctionContents.add(descFactory.node(direction, 1, 1)); }
422:             */
423:
424:            public static FeatureType createExample05JunctionType(
425:                    TypeFactory typeFactory) {
426:                return null;
427:            }
428:
429:            public static ComplexType createMeasurementType(
430:                    TypeFactory typeFactory) {
431:                TypeBuilder builder = new TypeBuilder(typeFactory);
432:                builder.setNamespaceURI(NSURI);
433:
434:                builder.setName("determinand_description");
435:                builder.setBinding(String.class);
436:                AttributeType detdesc = builder.attribute();
437:
438:                builder.setName("result");
439:                builder.setBinding(String.class);
440:
441:                AttributeType result = builder.attribute();
442:
443:                builder.setName("measurementType");
444:                builder.cardinality(1, 1);
445:                builder.addAttribute("determinand_description", detdesc);
446:                builder.addAttribute("result", result);
447:
448:                ComplexType measurement = builder.complex();
449:
450:                return measurement;
451:            }
452:
453:            /**
454:             * Creates a representation of a gml:LocationPropertyType association. This
455:             * would be better done by obtaining the type from a registry, so we can
456:             * have GML2TypeRegistry, GML3TypeRegistry, DefaultTypeRegistry, etc.
457:             * 
458:             * @return
459:             */
460:            public static AttributeType createGmlLocation(
461:                    TypeFactory typeFactory) {
462:                TypeBuilder builder = new TypeBuilder(typeFactory);
463:                builder.setNamespaceURI(GML_NSURI);
464:                builder.setName("LocationPropertyType");
465:                builder.setBinding(Point.class);
466:
467:                AttributeType type = builder.geometry();
468:
469:                return type;
470:            }
471:
472:            /**
473:             * Creates a representation of a gml:PointPropertyType association as an
474:             * AttributeType. This would be better done by obtaining the type from a
475:             * registry, so we can have GML2TypeRegistry, GML3TypeRegistry,
476:             * DefaultTypeRegistry, etc.
477:             * 
478:             * @return
479:             */
480:            public static AttributeType createGmlPoint(TypeFactory typeFactory) {
481:                TypeBuilder builder = new TypeBuilder(typeFactory);
482:                builder.setNamespaceURI(GML_NSURI);
483:
484:                builder.setName("PointPropertyType");
485:                CoordinateReferenceSystem fakeCrs = null;
486:                try {
487:                    fakeCrs = CRS.decode("EPSG:4326");
488:                } catch (Exception e) {
489:                    e.printStackTrace();
490:                    throw new RuntimeException(e);
491:                }
492:                builder.setCRS(fakeCrs);
493:                builder.setBinding(Point.class);
494:
495:                GeometryType type = builder.geometry();
496:                return type;
497:            }
498:
499:            /**
500:             * Asserts the corresponding properties of <code>type</code> for equality
501:             * with the provided parameter values
502:             * 
503:             * @param type
504:             * @param name
505:             * @param binding
506:             * @param restrictions
507:             * @param identified
508:             * @param _abstract
509:             * @param superType
510:             * @param nillable
511:             */
512:            public static void checkType(AttributeType type, Name name,
513:                    Class binding, Set/* <Filter> */restrictions,
514:                    boolean identified, boolean _abstract,
515:                    AttributeType superType) {
516:
517:                assertNotNull(type);
518:                assertEquals(name, type.getName());
519:                assertEquals(binding, type.getBinding());
520:                assertNotNull(type.getRestrictions());
521:                assertEquals(restrictions, type.getRestrictions());
522:                assertEquals(identified, type.isIdentified());
523:                assertEquals(_abstract, type.isAbstract());
524:                assertEquals(superType, type.getSuper());
525:            }
526:
527:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.