Java Doc for ComplexBinding.java in  » GIS » GeoTools-2.4.1 » org » geotools » 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 » GeoTools 2.4.1 » org.geotools.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.xml.ComplexBinding

All known Subclasses:   org.geotools.xml.AbstractComplexBinding,
ComplexBinding
public interface ComplexBinding extends Binding(Code)
A strategy for parsing elements in an instance document which are of complex type.

Complex types contain child elements, and attributes. A complex strategy has the ability to


author:
   Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net





Method Summary
 Elementencode(Object object, Document document, Element value)
     Performs the encoding of the object into its xml representation.

Complex objects are encoded as elements in a document.

 ListgetProperties(Object object)
     Returns a list of properties of the specified object.

The return list contains a set of QName , Object tuples, each as a two element object array.

This method should only be implemented in the case where the encoder can not determine what the properties of the object are from the schema.

An example would be an object which corresponds to an element in the schema which has a the type xs:anyType.

 ObjectgetProperty(Object object, QName name)
     Returns a property of a particular object which corresponds to the specified name.

This method should just return null in the event that the object being encoded is an leaf in its object model.

For multi-values properties ( maxOccurs > 0 ), this method may return an instance of java.util.Collection , java.util.Iterator , or an array.


Parameters:
  object - The object being encoded.
Parameters:
  name - The name of the property to obtain.
 voidinitializeChildContext(ElementInstance childInstance, Node node, MutablePicoContainer context)
     Initializes the context for a child element.

This method is called on the leading edge of a child element.

 Objectparse(ElementInstance instance, Node node, Object value)
     Parses a complex element from an instance document into an object representation.

This method is called when the trailing edge of the associated element is reached.


Parameters:
  instance - The element being parsed.
Parameters:
  node - The node in the parse tree representing the element beingparsed.
Parameters:
  value - The result of the parse from another strategy in the typehierarchy.



Method Detail
encode
Element encode(Object object, Document document, Element value) throws Exception(Code)
Performs the encoding of the object into its xml representation.

Complex objects are encoded as elements in a document. The value parameter is the encoded element, created by the parent binding. For the first binding in the execution chain this is just an empty element ( no children or attributes ). The binding has the choice to return value or to create a new element to return.

This method may choose to create child elements and attributes for the element. Or as an alternative return the object values for these contructs in ComplexBinding.getProperty(Object,QName) .


Parameters:
  object - The object being encoded.
Parameters:
  document - The document containing the encoded element.
Parameters:
  value - The object as encoded by the parent binding. The element for the objcet being encoded, or null



getProperties
List getProperties(Object object) throws Exception(Code)
Returns a list of properties of the specified object.

The return list contains a set of QName , Object tuples, each as a two element object array.

This method should only be implemented in the case where the encoder can not determine what the properties of the object are from the schema.

An example would be an object which corresponds to an element in the schema which has a the type xs:anyType. Since the content of this type can be anything the schema has no way to determine what the properties are. So in this case this method must specify the properties manually as a set of name, object tuples.

In the case of a multi-valued property, this method must return a tuple for each instance of the property, and not a list, iterator, or array containing all of the instances.


Parameters:
  object - the object being encoded. A list of the properties for the object.



getProperty
Object getProperty(Object object, QName name) throws Exception(Code)
Returns a property of a particular object which corresponds to the specified name.

This method should just return null in the event that the object being encoded is an leaf in its object model.

For multi-values properties ( maxOccurs > 0 ), this method may return an instance of java.util.Collection , java.util.Iterator , or an array.


Parameters:
  object - The object being encoded.
Parameters:
  name - The name of the property to obtain. The value of the property, or null.



initializeChildContext
void initializeChildContext(ElementInstance childInstance, Node node, MutablePicoContainer context)(Code)
Initializes the context for a child element.

This method is called on the leading edge of a child element. It is used to create context for the binding of a child element. It is important to note that each time this method is called, the node parse tree will contain different, ie child nodes for those previous elements parsed.


Parameters:
  childinstance - The child element instance
Parameters:
  node - The parse node for the parent element.
Parameters:
  context - the context in which the child element will be parsed.



parse
Object parse(ElementInstance instance, Node node, Object value) throws Exception(Code)
Parses a complex element from an instance document into an object representation.

This method is called when the trailing edge of the associated element is reached.


Parameters:
  instance - The element being parsed.
Parameters:
  node - The node in the parse tree representing the element beingparsed.
Parameters:
  value - The result of the parse from another strategy in the typehierarchy. Could be null if this is the first strategy being executed. The parsed object, or null if the component could not be parsed.
throws:
  Exception - Strategy objects should not attempt to handle any exceptions.



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