Java Doc for ElementProcessor.java in  » Web-Framework » cocoon » org » apache » cocoon » components » elementprocessor » 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 » Web Framework » cocoon » org.apache.cocoon.components.elementprocessor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.components.elementprocessor.ElementProcessor

ElementProcessor
public interface ElementProcessor extends org.apache.avalon.framework.component.Component(Code)
The ElementProcessor interface defines behavior for classes that can handle a particular XML element's content.
The life cycle of an ElementProcessor instance is:
  1. Creation
  2. Initialization via a call to initialize
  3. Acquisition of element data via calls to acceptCharacters and acceptWhitespaceCharacters
  4. Completion of processing via a call to endProcessing
In response to a startElement event, the POIFSSerializer creates an ElementProcessor, delegating the act of creation to an ElementProcessorFactory, and then initializes the ElementProcessor. In response to subsequent characters and ignorableWhitespace events, the POIFSSerializer will pass data to the ElementProcessor via the acceptCharacters or acceptWhitespaceCharacters methods. Finally, in response to an endElement event, the POIFSSerializer calls the ElementProcessor's endProcessing method.
author:
   Marc Johnson (marc_johnson27591@hotmail.com)
version:
   CVS $Id: ElementProcessor.java 433543 2006-08-22 06:22:54Z crossley $


Field Summary
 StringROLE
    


Method Summary
public  voidacceptCharacters(char[] data)
     The data provided in this method call comes from the corresponding XML element's contents.
public  voidacceptWhitespaceCharacters(char[] data)
     The data provided in this method call comes from the corresponding XML element's contents.
public  voidendProcessing()
     This is the last method call executed by the POIFSSerializer.
public  voidinitialize(Attribute[] attributes, ElementProcessor parent)
     The implementation should walk the array of attributes and perform appropriate actions based on that data.

Field Detail
ROLE
String ROLE(Code)





Method Detail
acceptCharacters
public void acceptCharacters(char[] data)(Code)
The data provided in this method call comes from the corresponding XML element's contents. The array is guaranteed not to be null and will never be empty.
The POIFSSerializer will make 0 to many calls to this method; all such calls will occur after the initialize method is called and before the endProcessing method is called.
Calls to this method may be interleaved with calls to acceptWhitespaceCharacters. All calls to acceptCharacters and acceptWhitespaceCharacters are guaranteed to be in the same order as their data is in the element.
Parameters:
  data - the character data



acceptWhitespaceCharacters
public void acceptWhitespaceCharacters(char[] data)(Code)
The data provided in this method call comes from the corresponding XML element's contents. The array is guaranteed not to be null and will never be empty.
The POIFSSerializer will make 0 to many calls to this method; all such calls will occur after the initialize method is called and before the endProcessing method is called.
Calls to this method may be interleaved with calls to acceptCharacters. All calls to acceptCharacters and acceptWhitespaceCharacters are guaranteed to be in the same order as their data is in the element.
Parameters:
  data - the whitespace characters



endProcessing
public void endProcessing() throws IOException(Code)
This is the last method call executed by the POIFSSerializer. When this method is called, the ElementProcessor should finish its work and perform its final interactions with its parent ElementProcessor.
If the implementation cached the parent ElementProcessor reference, when the initialize method was called, it should null out that reference.
exception:
  IOException -



initialize
public void initialize(Attribute[] attributes, ElementProcessor parent) throws IOException(Code)
The implementation should walk the array of attributes and perform appropriate actions based on that data. The array of attributes is guaranteed never to be null, but it can be empty. An implementation can expect code like this to work without throwing runtime exceptions:
for (int k = 0; k < attributes.length; k++)
{
    Attribute attr = attributes[ k ];
    // process attribute
}

NOTE: if the XML DTD or schema includes IMPLIED attributes for an element, those attributes are not included in the Attribute array - they're not in the data provided in the startElement call. The constructor for the ElementProcessor should set those implied attributes itself, and allow them to be overridden if the XML source provided explicit values for them.
The parent ElementProcessor is a reference to the ElementProcessor whose corresponding XML element contains this ElementProcessor's corresponding XML element. It will not be null unless this ElementProcessor's corresponding XML element is the top-level element in the XML document. Whether this ElementProcessor needs to establish a containment relationship with its parent or not, and whether it needs to do so at the beginning, middle, or end of its life cycle, are private matters left to the discretion of the individual ElementProcessor implementation. If the ElementProcessor needs to interact with its parent ElementProcessor, but is not ready to do so when the initialize method is called, it must cache the reference to its parent.

Parameters:
  attributes - the array of Attribute instances; may beempty, will never be null
Parameters:
  parent - the parent ElementProcessor; may be null
exception:
  IOException - if anything goes wrong



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