286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 2001, 2002,2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * Represents a parser configuration. The parser configuration maintains 286N/A * a table of recognized features and properties, assembles components 286N/A * for the parsing pipeline, and is responsible for initiating parsing 286N/A * By separating the configuration of a parser from the specific parser 286N/A * instance, applications can create new configurations and re-use the 286N/A * existing parser components and external API generators (e.g. the 286N/A * DOMParser and SAXParser). 286N/A * The internals of any specific parser configuration instance are hidden. 286N/A * Therefore, each configuration may implement the parsing mechanism any 286N/A * way necessary. However, the parser configuration should follow these 286N/A * Call the <code>reset</code> method on each component before parsing. 286N/A * This is only required if the configuration is re-using existing 286N/A * components that conform to the <code>XMLComponent</code> interface. 286N/A * If the configuration uses all custom parts, then it is free to 286N/A * implement everything as it sees fit as long as it follows the 286N/A * Call the <code>setFeature</code> and <code>setProperty</code> method 286N/A * on each component during parsing to propagate features and properties 286N/A * that have changed. This is only required if the configuration is 286N/A * re-using existing components that conform to the <code>XMLComponent</code> 286N/A * interface. If the configuration uses all custom parts, then it is free 286N/A * to implement everything as it sees fit as long as it follows the other 286N/A * Pass the same unique String references for all symbols that are 286N/A * propagated to the registered handlers. Symbols include, but may not 286N/A * be limited to, the names of elements and attributes (including their 286N/A * uri, prefix, and localpart). This is suggested but not an absolute 286N/A * must. However, the standard parser components may require access to 286N/A * the same symbol table for creation of unique symbol references to be 286N/A * propagated in the XNI pipeline. 286N/A * @author Arnaud Le Hors, IBM 286N/A * @author Andy Clark, IBM 286N/A // XMLParserConfiguration methods 286N/A * Parse an XML document. 286N/A * The parser can use this method to instruct this configuration 286N/A * to begin parsing an XML document from any valid input source 286N/A * (a character stream, a byte stream, or a URI). 286N/A * Parsers may not invoke this method while a parse is in progress. 286N/A * Once a parse is complete, the parser may then parse another XML 286N/A * This method is synchronous: it will not return until parsing 286N/A * has ended. If a client application wants to terminate 286N/A * parsing early, it should throw an exception. 286N/A * When this method returns, all characters streams and byte streams 286N/A * opened by the parser are closed. 286N/A * @param inputSource The input source for the top-level of the 286N/A * @exception XNIException Any XNI exception, possibly wrapping 286N/A * @exception IOException An IO exception from the parser, possibly 286N/A * from a byte stream or character stream 286N/A * supplied by the parser. 286N/A // generic configuration 286N/A * Allows a parser to add parser specific features to be recognized 286N/A * and managed by the parser configuration. 286N/A * @param featureIds An array of the additional feature identifiers 286N/A * Sets the state of a feature. This method is called by the parser 286N/A * and gets propagated to components in this parser configuration. 286N/A * @param featureId The feature identifier. 286N/A * @param state The state of the feature. 286N/A * @throws XMLConfigurationException Thrown if there is a configuration 286N/A * Returns the state of a feature. 286N/A * @param featureId The feature identifier. 286N/A * @throws XMLConfigurationException Thrown if there is a configuration 286N/A * Allows a parser to add parser specific properties to be recognized 286N/A * and managed by the parser configuration. 286N/A * @param propertyIds An array of the additional property identifiers 286N/A * Sets the value of a property. This method is called by the parser 286N/A * and gets propagated to components in this parser configuration. 286N/A * @param propertyId The property identifier. 286N/A * @param value The value of the property. 286N/A * @throws XMLConfigurationException Thrown if there is a configuration 286N/A * Returns the value of a property. 286N/A * @param propertyId The property identifier. 286N/A * @throws XMLConfigurationException Thrown if there is a configuration 286N/A * Sets the error handler. 286N/A * @param errorHandler The error resolver. 286N/A /** Returns the registered error handler. */ 286N/A * Sets the document handler to receive information about the document. 286N/A * @param documentHandler The document handler. 286N/A /** Returns the registered document handler. */ 286N/A * Sets the DTD handler. 286N/A * @param dtdHandler The DTD handler. 286N/A /** Returns the registered DTD handler. */ 286N/A * Sets the DTD content model handler. 286N/A * @param dtdContentModelHandler The DTD content model handler. 286N/A /** Returns the registered DTD content model handler. */ 286N/A * Sets the entity resolver. 286N/A * @param entityResolver The new entity resolver. 286N/A /** Returns the registered entity resolver. */ 286N/A * Set the locale to use for messages. 286N/A * @param locale The locale object to use for localization of messages. 286N/A * @exception XNIException Thrown if the parser does not support the 286N/A /** Returns the locale. */ 286N/A}
// interface XMLParserConfiguration