Java Doc for XMLFilterImpl.java in  » 6.0-JDK-Core » xml » org » xml » sax » helpers » 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 » org.xml.sax.helpers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xml.sax.helpers.XMLFilterImpl

XMLFilterImpl
public class XMLFilterImpl implements XMLFilter,EntityResolver,DTDHandler,ContentHandler,ErrorHandler(Code)
Base class for deriving an XML filter.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

This class is designed to sit between an org.xml.sax.XMLReaderXMLReader and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.


since:
   SAX 2.0
author:
   David Megginson
version:
   2.0.1 (sax2r2)
See Also:   org.xml.sax.XMLFilter
See Also:   org.xml.sax.XMLReader
See Also:   org.xml.sax.EntityResolver
See Also:   org.xml.sax.DTDHandler
See Also:   org.xml.sax.ContentHandler
See Also:   org.xml.sax.ErrorHandler



Constructor Summary
public  XMLFilterImpl()
     Construct an empty XML filter, with no parent.
public  XMLFilterImpl(XMLReader parent)
     Construct an XML filter with the specified parent.

Method Summary
public  voidcharacters(char ch, int start, int length)
     Filter a character data event.
public  voidendDocument()
     Filter an end document event.
public  voidendElement(String uri, String localName, String qName)
     Filter an end element event.
public  voidendPrefixMapping(String prefix)
     Filter an end Namespace prefix mapping event.
public  voiderror(SAXParseException e)
     Filter an error event.
public  voidfatalError(SAXParseException e)
     Filter a fatal error event.
public  ContentHandlergetContentHandler()
     Get the content event handler.
public  DTDHandlergetDTDHandler()
     Get the current DTD event handler.
public  EntityResolvergetEntityResolver()
     Get the current entity resolver.
public  ErrorHandlergetErrorHandler()
     Get the current error event handler.
public  booleangetFeature(String name)
     Look up the value of a feature.

This will always fail if the parent is null.


Parameters:
  name - The feature name.
public  XMLReadergetParent()
     Get the parent reader.
public  ObjectgetProperty(String name)
     Look up the value of a property.
Parameters:
  name - The property name.
public  voidignorableWhitespace(char ch, int start, int length)
     Filter an ignorable whitespace event.
public  voidnotationDecl(String name, String publicId, String systemId)
     Filter a notation declaration event.
public  voidparse(InputSource input)
     Parse a document.
public  voidparse(String systemId)
     Parse a document.
public  voidprocessingInstruction(String target, String data)
     Filter a processing instruction event.
public  InputSourceresolveEntity(String publicId, String systemId)
     Filter an external entity resolution.
Parameters:
  publicId - The entity's public identifier, or null.
Parameters:
  systemId - The entity's system identifier.
public  voidsetContentHandler(ContentHandler handler)
     Set the content event handler.
public  voidsetDTDHandler(DTDHandler handler)
     Set the DTD event handler.
public  voidsetDocumentLocator(Locator locator)
     Filter a new document locator event.
public  voidsetEntityResolver(EntityResolver resolver)
     Set the entity resolver.
public  voidsetErrorHandler(ErrorHandler handler)
     Set the error event handler.
public  voidsetFeature(String name, boolean value)
     Set the value of a feature.
public  voidsetParent(XMLReader parent)
     Set the parent reader.

This is the org.xml.sax.XMLReader XMLReader from which this filter will obtain its events and to which it will pass its configuration requests.

public  voidsetProperty(String name, Object value)
     Set the value of a property.
public  voidskippedEntity(String name)
     Filter a skipped entity event.
public  voidstartDocument()
     Filter a start document event.
public  voidstartElement(String uri, String localName, String qName, Attributes atts)
     Filter a start element event.
public  voidstartPrefixMapping(String prefix, String uri)
     Filter a start Namespace prefix mapping event.
public  voidunparsedEntityDecl(String name, String publicId, String systemId, String notationName)
     Filter an unparsed entity declaration event.
public  voidwarning(SAXParseException e)
     Filter a warning event.


Constructor Detail
XMLFilterImpl
public XMLFilterImpl()(Code)
Construct an empty XML filter, with no parent.

This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty, unless you use this as a pure event consumer rather than as an XMLReader .


See Also:   org.xml.sax.XMLReader.setFeature
See Also:   org.xml.sax.XMLReader.setProperty
See Also:   XMLFilterImpl.setParent



XMLFilterImpl
public XMLFilterImpl(XMLReader parent)(Code)
Construct an XML filter with the specified parent.
See Also:   XMLFilterImpl.setParent
See Also:   XMLFilterImpl.getParent




Method Detail
characters
public void characters(char ch, int start, int length) throws SAXException(Code)
Filter a character data event.
Parameters:
  ch - An array of characters.
Parameters:
  start - The starting position in the array.
Parameters:
  length - The number of characters to use from the array.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



endDocument
public void endDocument() throws SAXException(Code)
Filter an end document event.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



endElement
public void endElement(String uri, String localName, String qName) throws SAXException(Code)
Filter an end element event.
Parameters:
  uri - The element's Namespace URI, or the empty string.
Parameters:
  localName - The element's local name, or the empty string.
Parameters:
  qName - The element's qualified (prefixed) name, or the emptystring.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException(Code)
Filter an end Namespace prefix mapping event.
Parameters:
  prefix - The Namespace prefix.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



error
public void error(SAXParseException e) throws SAXException(Code)
Filter an error event.
Parameters:
  e - The error as an exception.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



fatalError
public void fatalError(SAXParseException e) throws SAXException(Code)
Filter a fatal error event.
Parameters:
  e - The error as an exception.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



getContentHandler
public ContentHandler getContentHandler()(Code)
Get the content event handler. The current content handler, or null if none was set.



getDTDHandler
public DTDHandler getDTDHandler()(Code)
Get the current DTD event handler. The current DTD handler, or null if none was set.



getEntityResolver
public EntityResolver getEntityResolver()(Code)
Get the current entity resolver. The current entity resolver, or null if none was set.



getErrorHandler
public ErrorHandler getErrorHandler()(Code)
Get the current error event handler. The current error handler, or null if none was set.



getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Look up the value of a feature.

This will always fail if the parent is null.


Parameters:
  name - The feature name. The current value of the feature.
exception:
  org.xml.sax.SAXNotRecognizedException - If the featurevalue can't be assigned or retrieved from the parent.
exception:
  org.xml.sax.SAXNotSupportedException - When theparent recognizes the feature name but cannot determine its value at this time.



getParent
public XMLReader getParent()(Code)
Get the parent reader. The parent XML reader, or null if none is set.
See Also:   XMLFilterImpl.setParent



getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Look up the value of a property.
Parameters:
  name - The property name. The current value of the property.
exception:
  org.xml.sax.SAXNotRecognizedException - If the propertyvalue can't be assigned or retrieved from the parent.
exception:
  org.xml.sax.SAXNotSupportedException - When theparent recognizes the property name but cannot determine its value at this time.



ignorableWhitespace
public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)
Filter an ignorable whitespace event.
Parameters:
  ch - An array of characters.
Parameters:
  start - The starting position in the array.
Parameters:
  length - The number of characters to use from the array.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



notationDecl
public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)
Filter a notation declaration event.
Parameters:
  name - The notation name.
Parameters:
  publicId - The notation's public identifier, or null.
Parameters:
  systemId - The notation's system identifier, or null.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



parse
public void parse(InputSource input) throws SAXException, IOException(Code)
Parse a document.
Parameters:
  input - The input source for the document entity.
exception:
  org.xml.sax.SAXException - Any SAX exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



parse
public void parse(String systemId) throws SAXException, IOException(Code)
Parse a document.
Parameters:
  systemId - The system identifier as a fully-qualified URI.
exception:
  org.xml.sax.SAXException - Any SAX exception, possiblywrapping another exception.
exception:
  java.io.IOException - An IO exception from the parser,possibly from a byte stream or character streamsupplied by the application.



processingInstruction
public void processingInstruction(String target, String data) throws SAXException(Code)
Filter a processing instruction event.
Parameters:
  target - The processing instruction target.
Parameters:
  data - The text following the target.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException(Code)
Filter an external entity resolution.
Parameters:
  publicId - The entity's public identifier, or null.
Parameters:
  systemId - The entity's system identifier. A new InputSource or null for the default.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.
exception:
  java.io.IOException - The client may throw anI/O-related exception while obtaining thenew InputSource.



setContentHandler
public void setContentHandler(ContentHandler handler)(Code)
Set the content event handler.
Parameters:
  handler - the new content handler



setDTDHandler
public void setDTDHandler(DTDHandler handler)(Code)
Set the DTD event handler.
Parameters:
  handler - the new DTD handler



setDocumentLocator
public void setDocumentLocator(Locator locator)(Code)
Filter a new document locator event.
Parameters:
  locator - The document locator.



setEntityResolver
public void setEntityResolver(EntityResolver resolver)(Code)
Set the entity resolver.
Parameters:
  resolver - The new entity resolver.



setErrorHandler
public void setErrorHandler(ErrorHandler handler)(Code)
Set the error event handler.
Parameters:
  handler - the new error handler



setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Set the value of a feature.

This will always fail if the parent is null.


Parameters:
  name - The feature name.
Parameters:
  value - The requested feature value.
exception:
  org.xml.sax.SAXNotRecognizedException - If the featurevalue can't be assigned or retrieved from the parent.
exception:
  org.xml.sax.SAXNotSupportedException - When theparent recognizes the feature name but cannot set the requested value.



setParent
public void setParent(XMLReader parent)(Code)
Set the parent reader.

This is the org.xml.sax.XMLReader XMLReader from which this filter will obtain its events and to which it will pass its configuration requests. The parent may itself be another filter.

If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.


Parameters:
  parent - The parent XML reader.
See Also:   XMLFilterImpl.getParent



setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Set the value of a property.

This will always fail if the parent is null.


Parameters:
  name - The property name.
Parameters:
  value - The requested property value.
exception:
  org.xml.sax.SAXNotRecognizedException - If the propertyvalue can't be assigned or retrieved from the parent.
exception:
  org.xml.sax.SAXNotSupportedException - When theparent recognizes the property name but cannot set the requested value.



skippedEntity
public void skippedEntity(String name) throws SAXException(Code)
Filter a skipped entity event.
Parameters:
  name - The name of the skipped entity.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



startDocument
public void startDocument() throws SAXException(Code)
Filter a start document event.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException(Code)
Filter a start element event.
Parameters:
  uri - The element's Namespace URI, or the empty string.
Parameters:
  localName - The element's local name, or the empty string.
Parameters:
  qName - The element's qualified (prefixed) name, or the emptystring.
Parameters:
  atts - The element's attributes.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)
Filter a start Namespace prefix mapping event.
Parameters:
  prefix - The Namespace prefix.
Parameters:
  uri - The Namespace URI.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)
Filter an unparsed entity declaration event.
Parameters:
  name - The entity name.
Parameters:
  publicId - The entity's public identifier, or null.
Parameters:
  systemId - The entity's system identifier, or null.
Parameters:
  notationName - The name of the associated notation.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



warning
public void warning(SAXParseException e) throws SAXException(Code)
Filter a warning event.
Parameters:
  e - The warning as an exception.
exception:
  org.xml.sax.SAXException - The client may throwan exception during processing.



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.