Source Code Cross Referenced for XMLEvent.java in  » 6.0-JDK-Core » xml » javax » xml » stream » events » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.stream.events 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        package javax.xml.stream.events;
002
003        import java.io.Writer;
004        import javax.xml.namespace.QName;
005
006        /**
007         * This is the base event interface for handling markup events.
008         * Events are value objects that are used to communicate the
009         * XML 1.0 InfoSet to the Application.  Events may be cached 
010         * and referenced after the parse has completed.
011         *
012         * @version 1.0
013         * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
014         * @see javax.xml.stream.XMLEventReader
015         * @see Characters
016         * @see ProcessingInstruction
017         * @see StartElement
018         * @see EndElement
019         * @see StartDocument
020         * @see EndDocument
021         * @see EntityReference
022         * @see EntityDeclaration
023         * @see NotationDeclaration
024         * @since 1.6
025         */
026        public interface XMLEvent extends javax.xml.stream.XMLStreamConstants {
027
028            /**
029             * Returns an integer code for this event.
030             * @see #START_ELEMENT
031             * @see #END_ELEMENT
032             * @see #CHARACTERS
033             * @see #ATTRIBUTE
034             * @see #NAMESPACE
035             * @see #PROCESSING_INSTRUCTION
036             * @see #COMMENT
037             * @see #START_DOCUMENT
038             * @see #END_DOCUMENT
039             * @see #DTD
040             */
041            public int getEventType();
042
043            /**
044             * Return the location of this event.  The Location 
045             * returned from this method is non-volatile and
046             * will retain its information.
047             * @see javax.xml.stream.Location
048             */
049            javax.xml.stream.Location getLocation();
050
051            /**
052             * A utility function to check if this event is a StartElement.
053             * @see StartElement
054             */
055            public boolean isStartElement();
056
057            /**
058             * A utility function to check if this event is an Attribute.
059             * @see Attribute
060             */
061            public boolean isAttribute();
062
063            /**
064             * A utility function to check if this event is a Namespace.
065             * @see Namespace
066             */
067            public boolean isNamespace();
068
069            /**
070             * A utility function to check if this event is a EndElement.
071             * @see EndElement
072             */
073            public boolean isEndElement();
074
075            /**
076             * A utility function to check if this event is an EntityReference.
077             * @see EntityReference
078             */
079            public boolean isEntityReference();
080
081            /**
082             * A utility function to check if this event is a ProcessingInstruction.
083             * @see ProcessingInstruction
084             */
085            public boolean isProcessingInstruction();
086
087            /**
088             * A utility function to check if this event is Characters.
089             * @see Characters
090             */
091            public boolean isCharacters();
092
093            /**
094             * A utility function to check if this event is a StartDocument.
095             * @see StartDocument
096             */
097            public boolean isStartDocument();
098
099            /**
100             * A utility function to check if this event is an EndDocument.
101             * @see EndDocument
102             */
103            public boolean isEndDocument();
104
105            /**
106             * Returns this event as a start element event, may result in
107             * a class cast exception if this event is not a start element.
108             */
109            public StartElement asStartElement();
110
111            /**
112             * Returns this event as an end  element event, may result in
113             * a class cast exception if this event is not a end element.
114             */
115            public EndElement asEndElement();
116
117            /**
118             * Returns this event as Characters, may result in
119             * a class cast exception if this event is not Characters.
120             */
121            public Characters asCharacters();
122
123            /**
124             * This method is provided for implementations to provide
125             * optional type information about the associated event.
126             * It is optional and will return null if no information
127             * is available.
128             */
129            public QName getSchemaType();
130
131            /**
132             * This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
133             * No indentation or whitespace should be outputted.
134             *
135             * Any user defined event type SHALL have this method 
136             * called when being written to on an output stream.
137             * Built in Event types MUST implement this method, 
138             * but implementations MAY choose not call these methods 
139             * for optimizations reasons when writing out built in 
140             * Events to an output stream. 
141             * The output generated MUST be equivalent in terms of the 
142             * infoset expressed.
143             * 
144             * @param writer The writer that will output the data
145             * @throws XMLStreamException if there is a fatal error writing the event
146             */
147            public void writeAsEncodedUnicode(Writer writer)
148                    throws javax.xml.stream.XMLStreamException;
149
150        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.