APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.dtm.ref

public Class IncrementalSAXSource_Xerces

extends Object
implements IncrementalSAXSource
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource
Imports
com.sun.org.apache.xalan.internal.utils.ObjectFactory, com.sun.org.apache.xerces.internal.parsers.SAXParser, com.sun.org.apache.xml.internal.res.XMLErrorResources, .XMLMessages, java.io.IOException, java.lang.reflect.Constructor, .Method, org.xml.sax.InputSource, .SAXException, .XMLReader

IncrementalSAXSource_Xerces takes advantage of the fact that Xerces1 incremental mode is already a coroutine of sorts, and just wraps our IncrementalSAXSource API around it.

Usage example: See main().

Status: Passes simple main() unit-test. NEEDS JAVADOC.

Field Summary

Modifier and TypeField and Description
pack-priv Constructor<?>
pack-priv Method
pack-priv Method
pack-priv Method
pack-priv Method
pack-priv Method
pack-priv SAXParser
fIncrementalParser

References Deprecated SAXParser is deprecated or references (maybe indirectly) at least one deprecated element.
private boolean
pack-priv Method
pack-priv Method
pack-priv Object
pack-priv Method
pack-priv Method
private static final Object[]
private static final Object[]

Constructor Summary

AccessConstructor and Description
public
IncrementalSAXSource_Xerces()

Create a IncrementalSAXSource_Xerces, and create a SAXParser to go with it.

public
IncrementalSAXSource_Xerces(SAXParser parser)
References Deprecated SAXParser is deprecated or references (maybe indirectly) at least one deprecated element.

Create a IncrementalSAXSource_Xerces wrapped around an existing SAXParser.

Method Summary

Modifier and TypeMethod and Description
public static void
_main(String[] args)
Deprecated

Simple unit test.

public static IncrementalSAXSource
public static IncrementalSAXSource
createIncrementalSAXSource(SAXParser parser)
References Deprecated SAXParser is deprecated or references (maybe indirectly) at least one deprecated element.

public Object

Returns:

Boolean.TRUE if the CoroutineParser believes more data may be available for further parsing. Boolean.FALSE if parsing ran to completion. Exception if the parser objected for some reason.
deliverMoreNodes
(boolean
If true, tells the incremental parser to generate another chunk of output. If false, tells the parser that we're satisfied and it can terminate parsing of this document.
parsemore
)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.deliverMoreNodes.

deliverMoreNodes() is a simple API which tells the coroutine parser that we need more nodes.

private boolean
private boolean
public void
setContentHandler(ContentHandler handler)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setContentHandler.

Register a SAX-style content handler for us to output to

public void
setDTDHandler(DTDHandler handler)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setDTDHandler.

Register a SAX-style DTD handler for us to output to

public void
setLexicalHandler(LexicalHandler handler)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setLexicalHandler.

Register a SAX-style lexical handler for us to output to

public void
startParse(InputSource source)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.startParse.

startParse() is a simple API which tells the IncrementalSAXSource to begin reading a document.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fConfigInputSourceCtorback to summary
pack-priv Constructor<?> fConfigInputSourceCtor
fConfigParseback to summary
pack-priv Method fConfigParse
fConfigSetByteStreamback to summary
pack-priv Method fConfigSetByteStream
fConfigSetCharStreamback to summary
pack-priv Method fConfigSetCharStream
fConfigSetEncodingback to summary
pack-priv Method fConfigSetEncoding
fConfigSetInputback to summary
pack-priv Method fConfigSetInput
fIncrementalParserback to summary
pack-priv SAXParser fIncrementalParser

References Deprecated

SAXParser is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

fParseInProgressback to summary
private boolean fParseInProgress
fParseSomeback to summary
pack-priv Method fParseSome
fParseSomeSetupback to summary
pack-priv Method fParseSomeSetup
fPullParserConfigback to summary
pack-priv Object fPullParserConfig
fResetback to summary
pack-priv Method fReset
fSetInputSourceback to summary
pack-priv Method fSetInputSource
noparmsback to summary
private static final Object[] noparms
parmsfalseback to summary
private static final Object[] parmsfalse

Constructor Detail

IncrementalSAXSource_Xercesback to summary
public IncrementalSAXSource_Xerces() throws NoSuchMethodException

Create a IncrementalSAXSource_Xerces, and create a SAXParser to go with it. Xerces2 incremental parsing is only supported if this constructor is used, due to limitations in the Xerces2 API (as of Beta 3). If you don't like that restriction, tell the Xerces folks that there should be a simpler way to request incremental SAX parsing.

IncrementalSAXSource_Xercesback to summary
public IncrementalSAXSource_Xerces(SAXParser parser) throws NoSuchMethodException

References Deprecated

SAXParser is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create a IncrementalSAXSource_Xerces wrapped around an existing SAXParser. Currently this works only for recent releases of Xerces-1. Xerces-2 incremental is currently possible only if we are allowed to create the parser instance, due to limitations in the API exposed by Xerces-2 Beta 3; see the no-args constructor for that code.

Exceptions
NoSuchMethodException:
if the SAXParser class doesn't support the Xerces incremental parse operations. In that case, caller should fall back upon the IncrementalSAXSource_Filter approach.

Method Detail

_mainback to summary
public static void _main(String[] args)

Deprecated

Simple unit test. Attempt coroutine parsing of document indicated by first argument (as a URI), report progress.

Annotations
@Deprecated
createIncrementalSAXSourceback to summary
public static IncrementalSAXSource createIncrementalSAXSource()
createIncrementalSAXSourceback to summary
public static IncrementalSAXSource createIncrementalSAXSource(SAXParser parser)

References Deprecated

SAXParser is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

deliverMoreNodesback to summary
public Object deliverMoreNodes(boolean parsemore)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.deliverMoreNodes.

deliverMoreNodes() is a simple API which tells the coroutine parser that we need more nodes. This is intended to be called from one of our partner routines, and serves to encapsulate the details of how incremental parsing has been achieved.

Parameters
parsemore:boolean

If true, tells the incremental parser to generate another chunk of output. If false, tells the parser that we're satisfied and it can terminate parsing of this document.

Returns:Object

Boolean.TRUE if the CoroutineParser believes more data may be available for further parsing. Boolean.FALSE if parsing ran to completion. Exception if the parser objected for some reason.

parseSomeback to summary
private boolean parseSome() throws SAXException, IOException, IllegalAccessException, InvocationTargetException
parseSomeSetupback to summary
private boolean parseSomeSetup(InputSource source) throws SAXException, IOException, IllegalAccessException, InvocationTargetException, InstantiationException
setContentHandlerback to summary
public void setContentHandler(ContentHandler handler)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setContentHandler.

Doc from com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setContentHandler.

Register a SAX-style content handler for us to output to

setDTDHandlerback to summary
public void setDTDHandler(DTDHandler handler)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setDTDHandler.

Doc from com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setDTDHandler.

Register a SAX-style DTD handler for us to output to

setLexicalHandlerback to summary
public void setLexicalHandler(LexicalHandler handler)

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setLexicalHandler.

Doc from com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.setLexicalHandler.

Register a SAX-style lexical handler for us to output to

startParseback to summary
public void startParse(InputSource source) throws SAXException

Implements com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource.startParse.

startParse() is a simple API which tells the IncrementalSAXSource to begin reading a document.

Exceptions
SAXException:
is parse thread is already in progress or parsing can not be started.