Java Doc for DataTransferObjectFactory.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 Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.vfny.geoserver.global.dto.DataTransferObjectFactory

DataTransferObjectFactory
public class DataTransferObjectFactory (Code)
Generate Data Transfer Objects from "real" objects in the system.

This class is used to isolate the DTO from the details of generating them. This allows DTO objects to be safely used as a wire protocol with out unrequired dependencies on such things as AttributeType and FeatureType.

This class may choose to opperate as a facade on the services of global.xml?


author:
   jgarnett, Refractions Research, Inc.
author:
   $Author: dmzwiers $ (last modification)
version:
   $Id: DataTransferObjectFactory.java 6893 2007-05-29 09:38:46Z groldan $


Field Summary
public static  MapschemaBaseMap
    


Method Summary
public static  AttributeTypeInfoDTOcreate(String schemaBase, AttributeType attributeType)
     Construct DTO based on provided AttributeType.
public static  AttributeTypeInfoDTOcreate(String schemaBase, String attributeName)
     Construct any of the well-known GML attributeTypes.
public static  FeatureTypeInfoDTOcreate(String dataStoreId, FeatureType schema)
     Construct DTO based on provided schema.
public static  ListgenerateAttributes(FeatureType schema)
     List of attributes DTO information gernated from schema.
public static  ListgenerateRequiredAttributes(String schemaBase)
     List of attribtue DTO information generated from schemaBase.

Please note this is currently only used for display by TypesForm, TypeInfo simply makes use of getRequiredBaseAttributes to select AttributeTypes from the FeatureType schema.

More specifically the values of isNillable, minOccurs and maxOccurs provided by the DataStore may not agree with the results of this function.

public static  ListgetElements(String name, Class type)
     Mappings for name and type, or null if not found.
public static  String[]getRequiredBaseAttributes(String schemaBase)
     Required Attributes for schemaBase.
public static  booleanisManditory(String schemaBase, String attribute)
     Test is attribute is a required attribtue of schemaBase.

Field Detail
schemaBaseMap
public static Map schemaBaseMap(Code)





Method Detail
create
public static AttributeTypeInfoDTO create(String schemaBase, AttributeType attributeType)(Code)
Construct DTO based on provided AttributeType.

GMLUtils is used to provide the mapping from attributeType.getName/attributeType.getType() to an XML type/fragement.


Parameters:
  attributeType - Real geotools2 AttributeType Data Transfer Object for provided attributeType



create
public static AttributeTypeInfoDTO create(String schemaBase, String attributeName)(Code)
Construct any of the well-known GML attributeTypes.

SchemaBase is used to ensure that attribute required by the XMLSchema have a minOccurs of 1.

This method uses NameSpaceTranslatorFactorys for xs and gml in order to provide accurate type information describing the provided attribute


Parameters:
  schemaBase - used to determine manditory attributes
Parameters:
  attributeName - Name of attribute being described DataTransferObject encapsulating attribute information.



create
public static FeatureTypeInfoDTO create(String dataStoreId, FeatureType schema)(Code)
Construct DTO based on provided schema.

GMLUtils is used to provide the mapping to an XML type/fragement for each attribute


Parameters:
  dataStoreId - Used as a backpointer to locate dataStore
Parameters:
  schema - Real geotools2 FeatureType Data Transfer Object for provided schema



generateAttributes
public static List generateAttributes(FeatureType schema)(Code)
List of attributes DTO information gernated from schema.
Parameters:
  schema -



generateRequiredAttributes
public static List generateRequiredAttributes(String schemaBase)(Code)
List of attribtue DTO information generated from schemaBase.

Please note this is currently only used for display by TypesForm, TypeInfo simply makes use of getRequiredBaseAttributes to select AttributeTypes from the FeatureType schema.

More specifically the values of isNillable, minOccurs and maxOccurs provided by the DataStore may not agree with the results of this function. TypeInfo opperatates on the assumption minOccurs=1, maxOccurs=1 and AttributeType.isNillable() is correct.


Parameters:
  schemaBase - SchemaBase List of AttributeTypeInfoDTO representative of schemaBase requiredAttributes



getElements
public static List getElements(String name, Class type)(Code)
Mappings for name and type, or null if not found.

List construction order:

  • Use of property types if name and exact type match one of the gml properties references.
    For name="pointProperty", type=com.vividsolutions.jts.geom.Point maps to: gml:PointPropertyType
  • Search the schema for defined types are checked for an exact match based on type.
    For type=java.lang.String maps to: xs:string
  • A linear seach of the defined types is made making use of isAssignable.
    For type=com.vividsolutions.jts.geom.Geometry maps to: gml:PointType gml:LineStringType gml:LinearRingType gml:BoxType gml:PolygonType gml:GeometryCollectionType gml:MultiPointType gml:MultiLineStringType, gml:MultiPolygonType
  • As a wild assumption we assume xs:string can be used.
    For type=java.net.URL maps to: xs:string

All mappings are consulted using using a linear search. The list is returned in the order of most specific to least specific.

Complete Example: name="pointProperty", class=type=com.vividsolutions.jts.geom.Point

Expected Mapping:

  • gml:PointPropertyType - pointProperty & Point.class match
  • gml:PointType - Point.class match
  • gml:AbstractGeometry - Point instance of Geometry match
  • xs:string - String assumption

Parameters:
  name - attribute name
Parameters:
  type - attribtue type List of NameSpaceElements is returned in the order of most specific to least specific.



getRequiredBaseAttributes
public static String[] getRequiredBaseAttributes(String schemaBase)(Code)
Required Attributes for schemaBase.

This information is a hardcoded representation of what woudl be available if we had actually parsed the GML XMLSchema.


Parameters:
  schemaBase -



isManditory
public static boolean isManditory(String schemaBase, String attribute)(Code)
Test is attribute is a required attribtue of schemaBase. True if attribute is required for schemaBase



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.