286N/A * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A/** Factory Implementation for XMLInputFactory. 286N/A * @author Neeraj Bajaj Sun Microsystems 286N/A * @author K.Venugopal Sun Microsystems 286N/A//xxx: Should we be reusing the XMLInputSource object 286N/A //List of supported properties and default values. 286N/A //Maintain a reference to last reader instantiated. 286N/A //no reader reuse by default 286N/A /** Creates a new instance of ZephryParserFactory */ 286N/A * @throws XMLStreamException 286N/A //delegate everything to XMLStreamReader 286N/A //delegate everything to XMLStreamReader 286N/A //delegate everything to XMLStreamReader 286N/A //delegate everything to XMLStreamReader 286N/A //delegate everything to XMLStreamReader 286N/A //delegate everything to XMLStreamReader 286N/A /** Create a new XMLEventReader from an XMLStreamReader. After being used 286N/A * to construct the XMLEventReader instance returned from this method 286N/A * the XMLStreamReader must not be used. 286N/A * @param reader the XMLStreamReader to read from (may not be modified) 286N/A * @return a new XMLEventReader 286N/A * @throws XMLStreamException 286N/A //xxx: what do we do now -- instance is passed from the application 286N/A //probably we should check if the state is at the start document, 286N/A //eventreader call to next() should return START_DOCUMENT and 286N/A //then delegate every call to underlying streamReader 286N/A //return (XMLResolver)fPropertyManager.getProperty(XMLInputFactory.RESOLVER); 286N/A /** Create a filtered event reader that wraps the filter around the event reader 286N/A * @param reader the event reader to wrap 286N/A * @param filter the filter to apply to the event reader 286N/A * @throws XMLStreamException 286N/A /** Create a filtered reader that wraps the filter around the reader 286N/A * @param reader the reader to filter 286N/A * @param filter the filter to apply to the reader 286N/A * @throws XMLStreamException 286N/A * @param name The name of the property (may not be null) 286N/A * @return The value of the property 286N/A * @throws IllegalArgumentException if the property is not supported 286N/A /** Query the set of fProperties that this factory supports. 286N/A * @param name The name of the property (may not be null) 286N/A * @return true if the property is supported and false otherwise 286N/A /** Set a user defined event allocator for events 286N/A * @param allocator the user defined allocator 286N/A /** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation 286N/A * is not required to support every setting of every property in the specification and may use IllegalArgumentException 286N/A * to signal that an unsupported property may not be set with the specified value. 286N/A * @param name The name of the property (may not be null) 286N/A * @param value The value of the property 286N/A * @throws java.lang.IllegalArgumentException if the property is not supported 286N/A }
else{
//for any other property set the flag 286N/A //REVISIT: Even in this case instance can be reused, by passing PropertyManager 286N/A //1. if the temp reader is null -- create the instance and return 286N/A //if factory is configured to reuse the instance & this instance can be reused 286N/A //& the setProperty() hasn't been called 286N/A //we can make setInputSource() call reset() and this way there wont be two function calls 286N/A //just return the new instance.. note that we are not setting fTempReader to the newly created instance 286N/A "XMLStreamReader or XMLEventReader from a " +