geronimo-stax-1.2-spec-1.1/0000775000175000017500000000000011703403414014344 5ustar brianbriangeronimo-stax-1.2-spec-1.1/LICENSE.txt0000664000175000017500000002613710613154543016205 0ustar brianbrian Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. geronimo-stax-1.2-spec-1.1/pom.xml0000664000175000017500000000731611607062147015677 0ustar brianbrian 4.0.0 org.apache.geronimo.genesis genesis-java5-flava 2.0 org.apache.geronimo.specs geronimo-stax-api_1.2_spec bundle Apache Geronimo STAX Spec 1.2 1.1 Java STAX Spec API 1.2 http://geronimo.apache.org/maven/${siteId}/${version} apache-website ${site.deploy.url}/maven/${siteId}/${version} specs/${artifactId} scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-stax-api_1.2_spec-1.1 scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-stax-api_1.2_spec-1.1 https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-stax-api_1.2_spec-1.1 org.apache.geronimo.specs geronimo-osgi-locator 1.0 provided org.apache.felix maven-bundle-plugin ${groupId}.${artifactId};singleton=true JSR-137 Streaming API for XML 1.2 Sun Microsystems, Inc. 1.2 javax.xml.stream*;version=1.2,javax.xml.namespace* org.apache.geronimo.osgi.registry.api;resolution:=optional,* org.apache.geronimo.osgi.locator org.apache.geronimo.osgi.locator.Activator geronimo-stax-1.2-spec-1.1/src/0000775000175000017500000000000011703403414015133 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/0000775000175000017500000000000011703403414016057 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/0000775000175000017500000000000011703403414017000 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/0000775000175000017500000000000011703403414020111 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/0000775000175000017500000000000011703403414020711 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/0000775000175000017500000000000011703403414022204 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/FactoryConfigurationError.java0000664000175000017500000000315610574057117030237 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import java.io.Serializable; public class FactoryConfigurationError extends Error implements Serializable { Exception nested; public FactoryConfigurationError() { } public FactoryConfigurationError(Exception e) { nested = e; } public FactoryConfigurationError(Exception e, String msg) { super(msg); nested = e; } public FactoryConfigurationError(java.lang.String msg) { super(msg); } public FactoryConfigurationError(String msg, Exception e) { super(msg); nested = e; } public Exception getException() { return nested; } public String getMessage() { String msg = super.getMessage(); if (msg != null) return msg; if (nested != null) { msg = nested.getMessage(); if (msg == null) msg = nested.getClass().toString(); } return msg; } }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLReporter.java0000664000175000017500000000200610573733234025242 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public interface XMLReporter { void report(String message, String errorType, Object relatedInformation, Location location) throws XMLStreamException; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLStreamReader.java0000664000175000017500000000562210573733234026025 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; public interface XMLStreamReader extends XMLStreamConstants { public void close() throws XMLStreamException; public int getAttributeCount(); public String getAttributeLocalName(int index); public QName getAttributeName(int index); public String getAttributeNamespace(int index); public String getAttributePrefix(int index); public String getAttributeType(int index); public String getAttributeValue(int index); public String getAttributeValue(String namespaceURI, String localName); public String getCharacterEncodingScheme(); public String getElementText() throws XMLStreamException; public String getEncoding(); public int getEventType(); public String getLocalName(); public Location getLocation(); public QName getName(); public NamespaceContext getNamespaceContext(); public int getNamespaceCount(); public String getNamespacePrefix(int index); public String getNamespaceURI(); public String getNamespaceURI(int index); public String getNamespaceURI(String prefix); public String getPIData(); public String getPITarget(); public String getPrefix(); public java.lang.Object getProperty(String name) throws IllegalArgumentException; public String getText(); public char[] getTextCharacters(); public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException; public int getTextLength(); public int getTextStart(); public String getVersion(); public boolean hasName(); public boolean hasNext() throws XMLStreamException; public boolean hasText(); public boolean isAttributeSpecified(int index); public boolean isCharacters(); public boolean isEndElement(); public boolean isStandalone(); public boolean isStartElement(); public boolean isWhiteSpace(); public int next() throws XMLStreamException; public int nextTag() throws XMLStreamException ; public void require(int type, String namespaceURI, String localName) throws XMLStreamException ; public boolean standaloneSet(); } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/FactoryLocator.java0000664000175000017500000001200011350204263025772 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import java.io.InputStream; import java.io.File; import java.io.FileInputStream; import java.util.Properties; import java.io.BufferedReader; import java.io.InputStreamReader; import org.apache.geronimo.osgi.locator.ProviderLocator; /* * Here is the beef on the finding the Factory Class * * 1. Use the javax.xml.stream.XMLInputFactory system property. 2. Use the * properties file "lib/stax.properties" in the JRE directory. This * configuration file is in standard java.util.Properties format and contains * the fully qualified name of the implementation class with the key being the * system property defined above. 3. Use the Services API (as detailed in the * JAR specification), if available, to determine the classname. The Services * API will look for a classname in the file * META-INF/services/javax.xml.stream.XMLInputFactory in jars available to the * runtime. Platform default XMLInputFactory instance. * * If the user provided a classloader we'll use that...if not, we'll assume the * classloader of this class. */ class FactoryLocator { static Object locate(String factoryId) throws FactoryConfigurationError { return locate(factoryId, null); } static Object locate(String factoryId, String altClassName) throws FactoryConfigurationError { return locate(factoryId, altClassName, Thread.currentThread().getContextClassLoader()); } static Object locate(String factoryId, String altClassName, ClassLoader classLoader) throws FactoryConfigurationError { // NOTE: The stax spec uses the following lookup order, which is the reverse from what is specified // most of the APIs: // 1. Use the javax.xml.stream.XMLInputFactory system property. // 2. Use the properties file lib/xml.stream.properties in the JRE directory. This configuration // file is in standard java.util.Properties format and contains the fully qualified name of the // implementation class with the key being the system property defined in step 1. // 3. Use the Services API (as detailed in the JAR specification), if available, to determine the // classname. The Services API looks for a classname in the file META-INF/services/ // javax.xml.stream.XMLInputFactory in jars available to the runtime. // 4. Platform default XMLInputFactory instance. // Use the system property first try { String systemProp = System.getProperty(factoryId); if (systemProp != null) { return newInstance(systemProp, classLoader); } } catch (SecurityException se) { } try { // NOTE: The StAX spec gives this property file name as xml.stream.properties, but the javadoc and the maintenance release // state this is stax.properties. String factoryClassName = ProviderLocator.lookupByJREPropertyFile("lib" + File.separator + "stax.properties", factoryId); if (factoryClassName != null) { return newInstance(factoryClassName, classLoader); } } catch (Exception ex) { } try { // check the META-INF/services definitions, and return it if // we find something. Object service = ProviderLocator.getService(factoryId, FactoryLocator.class, classLoader); if (service != null) { return service; } } catch (Exception ex) { } if (altClassName == null) { throw new FactoryConfigurationError("Unable to locate factory for " + factoryId + ".", null); } return newInstance(altClassName, classLoader); } private static Object newInstance(String className, ClassLoader classLoader) throws FactoryConfigurationError { try { return ProviderLocator.loadClass(className, FactoryLocator.class, classLoader).newInstance(); } catch (ClassNotFoundException x) { throw new FactoryConfigurationError("Requested factory " + className + " cannot be located. Classloader =" + classLoader.toString(), x); } catch (Exception x) { throw new FactoryConfigurationError("Requested factory " + className + " could not be instantiated: " + x, x); } } } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/util/0000775000175000017500000000000011703403414023161 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/util/XMLEventAllocator.java0000664000175000017500000000234010574057117027340 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.util; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.events.XMLEvent; public interface XMLEventAllocator { public XMLEvent allocate(XMLStreamReader reader) throws XMLStreamException; public void allocate(XMLStreamReader reader, XMLEventConsumer consumer) throws XMLStreamException; public XMLEventAllocator newInstance(); } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/util/EventReaderDelegate.java0000664000175000017500000000376710575774654027727 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.util; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; public class EventReaderDelegate implements XMLEventReader { private XMLEventReader reader; public EventReaderDelegate() { } public EventReaderDelegate(XMLEventReader reader) { this.reader = reader; } public void close() throws XMLStreamException { reader.close(); } public String getElementText() throws XMLStreamException { return reader.getElementText(); } public XMLEventReader getParent() { return reader; } public Object getProperty(java.lang.String name) throws IllegalArgumentException { return reader.getProperty(name); } public boolean hasNext() { return reader.hasNext(); } public Object next() { return reader.next(); } public XMLEvent nextEvent() throws XMLStreamException { return reader.nextEvent(); } public XMLEvent nextTag() throws XMLStreamException { return reader.nextTag(); } public XMLEvent peek() throws XMLStreamException { return reader.peek(); } public void remove() { reader.remove(); } public void setParent(XMLEventReader reader) { this.reader = reader; } }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/util/XMLEventConsumer.java0000664000175000017500000000202610573733234027214 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.util; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; public interface XMLEventConsumer { public void add(XMLEvent event) throws XMLStreamException; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/util/StreamReaderDelegate.java0000664000175000017500000001205110574057117030046 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.util; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; public class StreamReaderDelegate implements XMLStreamReader { XMLStreamReader reader; public StreamReaderDelegate() { } public StreamReaderDelegate(XMLStreamReader reader) { this.reader = reader; } public void setParent(XMLStreamReader reader) { this.reader = reader; } public XMLStreamReader getParent() { return reader; } public int next() throws XMLStreamException { return reader.next(); } public int nextTag() throws XMLStreamException { return reader.nextTag(); } public String getElementText() throws XMLStreamException { return reader.getElementText(); } public void require(int type, String namespaceURI, String localName) throws XMLStreamException { reader.require(type, namespaceURI, localName); } public boolean hasNext() throws XMLStreamException { return reader.hasNext(); } public void close() throws XMLStreamException { reader.close(); } public String getNamespaceURI(String prefix) { return reader.getNamespaceURI(prefix); } public NamespaceContext getNamespaceContext() { return reader.getNamespaceContext(); } public boolean isStartElement() { return reader.isStartElement(); } public boolean isEndElement() { return reader.isEndElement(); } public boolean isCharacters() { return reader.isCharacters(); } public boolean isWhiteSpace() { return reader.isWhiteSpace(); } public String getAttributeValue(String namespaceURI, String localName) { return reader.getAttributeValue(namespaceURI, localName); } public int getAttributeCount() { return reader.getAttributeCount(); } public QName getAttributeName(int index) { return reader.getAttributeName(index); } public String getAttributePrefix(int index) { return reader.getAttributePrefix(index); } public String getAttributeNamespace(int index) { return reader.getAttributeNamespace(index); } public String getAttributeLocalName(int index) { return reader.getAttributeLocalName(index); } public String getAttributeType(int index) { return reader.getAttributeType(index); } public String getAttributeValue(int index) { return reader.getAttributeValue(index); } public boolean isAttributeSpecified(int index) { return reader.isAttributeSpecified(index); } public int getNamespaceCount() { return reader.getNamespaceCount(); } public String getNamespacePrefix(int index) { return reader.getNamespacePrefix(index); } public String getNamespaceURI(int index) { return reader.getNamespaceURI(index); } public int getEventType() { return reader.getEventType(); } public String getText() { return reader.getText(); } public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { return reader.getTextCharacters(sourceStart, target, targetStart, length); } public char[] getTextCharacters() { return reader.getTextCharacters(); } public int getTextStart() { return reader.getTextStart(); } public int getTextLength() { return reader.getTextLength(); } public String getEncoding() { return reader.getEncoding(); } public boolean hasText() { return reader.hasText(); } public Location getLocation() { return reader.getLocation(); } public QName getName() { return reader.getName(); } public String getLocalName() { return reader.getLocalName(); } public boolean hasName() { return reader.hasName(); } public String getNamespaceURI() { return reader.getNamespaceURI(); } public String getPrefix() { return reader.getPrefix(); } public String getVersion() { return reader.getVersion(); } public boolean isStandalone() { return reader.isStandalone(); } public boolean standaloneSet() { return reader.standaloneSet(); } public String getCharacterEncodingScheme() { return reader.getCharacterEncodingScheme(); } public String getPITarget() { return reader.getPITarget(); } public String getPIData() { return reader.getPIData(); } public Object getProperty(String name) throws IllegalArgumentException { return reader.getProperty(name); } } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/StreamFilter.java0000664000175000017500000000164710574057117025472 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public interface StreamFilter { public boolean accept(XMLStreamReader reader); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/0000775000175000017500000000000011703403414023510 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/EndDocument.java0000664000175000017500000000161610574057117026576 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface EndDocument extends XMLEvent { }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/Characters.java0000664000175000017500000000201610574057117026443 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface Characters extends XMLEvent { public String getData(); public boolean isCData(); public boolean isIgnorableWhiteSpace(); public boolean isWhiteSpace(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/EndElement.java0000664000175000017500000000201410574057117026402 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; import java.util.Iterator; import javax.xml.namespace.QName; public interface EndElement extends XMLEvent { public QName getName(); public Iterator getNamespaces(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/ProcessingInstruction.java0000664000175000017500000000171710574057117030751 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface ProcessingInstruction extends XMLEvent { public String getData(); public String getTarget(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/NotationDeclaration.java0000664000175000017500000000175610574057117030337 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface NotationDeclaration extends XMLEvent { public String getName(); public String getPublicId(); public String getSystemId(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/StartDocument.java0000664000175000017500000000213510574057117027162 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface StartDocument extends XMLEvent { public boolean encodingSet(); public String getCharacterEncodingScheme(); public String getSystemId(); public String getVersion(); public boolean isStandalone(); public boolean standaloneSet(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/EntityReference.java0000664000175000017500000000173110574057117027462 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface EntityReference extends XMLEvent { public EntityDeclaration getDeclaration(); public String getName(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/Attribute.java0000664000175000017500000000204210574057117026326 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; import javax.xml.namespace.QName; public interface Attribute extends XMLEvent { public String getDTDType(); public QName getName(); public String getValue(); public boolean isSpecified(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/Namespace.java0000664000175000017500000000177610574057117026274 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface Namespace extends Attribute { public String getNamespaceURI(); public String getPrefix(); public boolean isDefaultNamespaceDeclaration(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/StartElement.java0000664000175000017500000000235510574057117027001 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; public interface StartElement extends XMLEvent { public Attribute getAttributeByName(QName name); public Iterator getAttributes(); public QName getName(); public NamespaceContext getNamespaceContext(); public Iterator getNamespaces(); public String getNamespaceURI(String prefix); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/EntityDeclaration.java0000664000175000017500000000212310574057117030005 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface EntityDeclaration extends XMLEvent { public String getBaseURI(); public String getName(); public String getNotationName(); public String getPublicId(); public String getReplacementText(); public String getSystemId(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/XMLEvent.java0000664000175000017500000000324210575666055026040 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; import java.io.Writer; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; public interface XMLEvent extends XMLStreamConstants { public Characters asCharacters(); public EndElement asEndElement(); public StartElement asStartElement(); public int getEventType(); public Location getLocation(); public QName getSchemaType(); public boolean isAttribute(); public boolean isCharacters(); public boolean isEndDocument(); public boolean isEndElement(); public boolean isEntityReference(); public boolean isNamespace(); public boolean isProcessingInstruction(); public boolean isStartDocument(); public boolean isStartElement(); public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException; }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/DTD.java0000664000175000017500000000205110574057117024776 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; import java.util.List; public interface DTD extends XMLEvent { public String getDocumentTypeDeclaration(); public List getEntities(); public List getNotations(); public Object getProcessedDTD(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/events/Comment.java0000664000175000017500000000164410574057117025774 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream.events; public interface Comment extends XMLEvent { public String getText(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLResolver.java0000664000175000017500000000207110573733234025243 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public interface XMLResolver { public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/EventFilter.java0000664000175000017500000000171010574057117025307 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import javax.xml.stream.events.XMLEvent; public interface EventFilter { public boolean accept(XMLEvent event); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLInputFactory.java0000664000175000017500000001336411353160647026077 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import javax.xml.stream.util.XMLEventAllocator; public abstract class XMLInputFactory { public static final java.lang.String ALLOCATOR = "javax.xml.stream.allocator"; public static final java.lang.String IS_COALESCING = "javax.xml.stream.isCoalescing"; public static final java.lang.String IS_NAMESPACE_AWARE = "javax.xml.stream.isNamespaceAware"; public static final java.lang.String IS_REPLACING_ENTITY_REFERENCES = "javax.xml.stream.isReplacingEntityReferences"; public static final java.lang.String IS_SUPPORTING_EXTERNAL_ENTITIES = "javax.xml.stream.isSupportingExternalEntities"; public static final java.lang.String IS_VALIDATING = "javax.xml.stream.isValidating"; public static final java.lang.String REPORTER = "javax.xml.stream.reporter"; public static final java.lang.String RESOLVER = "javax.xml.stream.resolver"; public static final java.lang.String SUPPORT_DTD = "javax.xml.stream.supportDTD"; protected XMLInputFactory() { } public static XMLInputFactory newInstance() throws FactoryConfigurationError { // We'll assume the XMLInputFactory from the RI as a backup. return (XMLInputFactory)FactoryLocator.locate("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory"); } public static XMLInputFactory newFactory() throws FactoryConfigurationError { // We'll assume the XMLInputFactory from the RI as a backup. return (XMLInputFactory)FactoryLocator.locate("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory"); } /** * Create a new XMLInputFactory * * @deprecated to maintain API consistency. All newInstance methods are * replaced with corresponding newFactory methods. The replacement * newFactory(String factoryId, ClassLoader classLoader) * method defines no changes in behavior from this method. */ public static XMLInputFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError { // We'll assume the XMLInputFactory from the RI as a backup. return (XMLInputFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxInputFactory", classLoader); } public static XMLInputFactory newFactory(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError { // We'll assume the XMLInputFactory from the RI as a backup. return (XMLInputFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxInputFactory", classLoader); } public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( javax.xml.transform.Source source) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.io.InputStream stream) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException; public abstract XMLStreamReader createXMLStreamReader( java.lang.String systemId, java.io.Reader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.lang.String systemId, java.io.Reader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( javax.xml.transform.Source source) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.io.InputStream stream) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException; public abstract XMLEventReader createXMLEventReader( java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException; public abstract XMLStreamReader createFilteredReader( XMLStreamReader reader, StreamFilter filter) throws XMLStreamException; public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException; public abstract XMLResolver getXMLResolver(); public abstract void setXMLResolver(XMLResolver resolver); public abstract XMLReporter getXMLReporter(); public abstract void setXMLReporter(XMLReporter reporter); public abstract void setProperty(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException; public abstract java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException; public abstract boolean isPropertySupported(java.lang.String name); public abstract void setEventAllocator(XMLEventAllocator allocator); public abstract XMLEventAllocator getEventAllocator(); } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLStreamException.java0000664000175000017500000000356110613150651026550 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public class XMLStreamException extends Exception { protected Throwable nested; protected Location location; public XMLStreamException() { } public XMLStreamException(java.lang.String msg) { super(msg); } public XMLStreamException(java.lang.Throwable th) { this.nested = th; } public XMLStreamException(java.lang.String msg, java.lang.Throwable th) { super(msg); this.nested = th; } public XMLStreamException(java.lang.String msg, Location location, java.lang.Throwable th) { super("ParseError at [row,col]:[" + location.getLineNumber() + "," + location.getColumnNumber() + "]\n" + "Message: " + msg); this.location = location; this.nested = th; } public XMLStreamException(java.lang.String msg, Location location) { super("ParseError at [row,col]:[" + location.getLineNumber() + "," + location.getColumnNumber() + "]\n" + "Message: " + msg); this.location = location; } public java.lang.Throwable getNestedException() { return nested; } public Location getLocation() { return location; } } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLOutputFactory.java0000664000175000017500000000730011353160647026271 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public abstract class XMLOutputFactory { public static final String IS_REPAIRING_NAMESPACES = "javax.xml.stream.isRepairingNamespaces"; protected XMLOutputFactory() { } public static XMLOutputFactory newInstance() throws FactoryConfigurationError { return (XMLOutputFactory) FactoryLocator.locate("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); } /** * Create a new XMLOutputFactory * * @deprecated This method has been deprecated because * it returns an instance of XMLInputFactory, which is of the * wrong class. Use the new method * newFactory(java.lang.String factoryId,java.lang.ClassLoader classLoader) * instead. */ public static XMLInputFactory newInstance(String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError { return (XMLInputFactory) FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxOutputFactory", classLoader); } /** * Create a new XMLOutputFactory * * This is the replacement for the deprecated newInstance() method */ public static XMLOutputFactory newFactory() throws FactoryConfigurationError { return (XMLOutputFactory) FactoryLocator.locate("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); } /** * Create a new XMLOutputFactory * * This is the replacement for the deprecated newInstance() method */ public static XMLOutputFactory newFactory(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { // essentially the same thing as deprecated newInstance(), but the correct return type. return (XMLOutputFactory) FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxOutputFactory", classLoader); } public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException; public abstract XMLStreamWriter createXMLStreamWriter( java.io.OutputStream stream) throws XMLStreamException; public abstract XMLStreamWriter createXMLStreamWriter( java.io.OutputStream stream, String encoding) throws XMLStreamException; public abstract XMLStreamWriter createXMLStreamWriter( javax.xml.transform.Result result) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter( javax.xml.transform.Result result) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter( java.io.OutputStream stream) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter( java.io.OutputStream stream, String encoding) throws XMLStreamException; public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException; public abstract void setProperty(String name, Object value) throws IllegalArgumentException; public abstract Object getProperty(String name) throws IllegalArgumentException; public abstract boolean isPropertySupported(String name); } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLEventFactory.java0000664000175000017500000001171111353160647026053 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.events.ProcessingInstruction; import javax.xml.namespace.QName; import javax.xml.stream.events.Characters; import javax.xml.stream.events.Comment; import javax.xml.stream.events.DTD; import javax.xml.stream.events.EndElement; import javax.xml.stream.events.EntityDeclaration; import javax.xml.stream.events.Namespace; import javax.xml.stream.events.Attribute; import javax.xml.stream.events.EndDocument; import javax.xml.stream.events.EntityReference; import javax.xml.stream.events.StartDocument; import javax.xml.stream.events.StartElement; public abstract class XMLEventFactory { protected XMLEventFactory() { } public static XMLEventFactory newInstance() throws FactoryConfigurationError { return (XMLEventFactory)FactoryLocator.locate("javax.xml.stream.XMLEventFactory", "com.ctc.wstx.stax.WstxEventFactory"); } public static XMLEventFactory newFactory() throws FactoryConfigurationError { return (XMLEventFactory)FactoryLocator.locate("javax.xml.stream.XMLEventFactory", "com.ctc.wstx.stax.WstxEventFactory"); } /** * Create a new XMLEventFactory * * @deprecated to maintain API consistency. All newInstance methods are * replaced with corresponding newFactory methods. The replacement * newFactory(String factoryId, ClassLoader classLoader) * method defines no changes in behavior from this method. */ public static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { return (XMLEventFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxEventFactory", classLoader); } public static XMLEventFactory newFactory(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { return (XMLEventFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxEventFactory", classLoader); } public abstract void setLocation(Location location); public abstract Attribute createAttribute(QName name, String value); public abstract Attribute createAttribute(String localName, String value); public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value); public abstract Namespace createNamespace(String namespaceUri); public abstract Namespace createNamespace(String prefix, String namespaceUri); public abstract StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces); public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName); public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces); public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context); public abstract EndElement createEndElement(QName name, Iterator namespaces); public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName); public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces); public abstract Characters createCharacters(String content); public abstract Characters createCData(String content); public abstract Characters createSpace(String content); public abstract Characters createIgnorableSpace(String content); public abstract StartDocument createStartDocument(); public abstract StartDocument createStartDocument(String encoding); public abstract StartDocument createStartDocument(String encoding, String version); public abstract StartDocument createStartDocument(String encoding, String version, boolean standalone); public abstract EndDocument createEndDocument(); public abstract EntityReference createEntityReference(String name, EntityDeclaration declaration); public abstract Comment createComment(String text); public abstract ProcessingInstruction createProcessingInstruction( String target, String data); public abstract DTD createDTD(String dtd); } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLEventWriter.java0000664000175000017500000000313610574057117025723 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.events.XMLEvent; import javax.xml.stream.util.XMLEventConsumer; public interface XMLEventWriter extends XMLEventConsumer { public void add(XMLEvent event) throws XMLStreamException; public void add(XMLEventReader reader) throws XMLStreamException; public void close() throws XMLStreamException; public void flush() throws XMLStreamException; public NamespaceContext getNamespaceContext(); public String getPrefix(String uri) throws XMLStreamException; public void setDefaultNamespace(String uri) throws XMLStreamException; public void setNamespaceContext(NamespaceContext context) throws XMLStreamException; public void setPrefix(String prefix, String uri) throws XMLStreamException; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLStreamWriter.java0000664000175000017500000000670710573733234026104 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import javax.xml.namespace.NamespaceContext; public interface XMLStreamWriter { public void close() throws XMLStreamException; public void flush() throws XMLStreamException; public NamespaceContext getNamespaceContext(); public String getPrefix(String uri) throws XMLStreamException; public Object getProperty(String name) throws IllegalArgumentException; public void setDefaultNamespace(String uri) throws XMLStreamException; public void setNamespaceContext(NamespaceContext context) throws XMLStreamException; public void setPrefix(String prefix, String uri) throws XMLStreamException; public void writeAttribute(String localName, String value) throws XMLStreamException; public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException; public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException; public void writeCData(String data) throws XMLStreamException; public void writeCharacters(char[] text, int start, int len) throws XMLStreamException; public void writeCharacters(String text) throws XMLStreamException; public void writeComment(String data) throws XMLStreamException; public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException; public void writeDTD(String dtd) throws XMLStreamException; public void writeEmptyElement(String localName) throws XMLStreamException; public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException; public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException; public void writeEndDocument() throws XMLStreamException; public void writeEndElement() throws XMLStreamException; public void writeEntityRef(String name) throws XMLStreamException; public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException; public void writeProcessingInstruction(String target) throws XMLStreamException; public void writeProcessingInstruction(String target, String data) throws XMLStreamException; public void writeStartDocument() throws XMLStreamException; public void writeStartDocument(String version) throws XMLStreamException; public void writeStartDocument(String encoding, String version) throws XMLStreamException; public void writeStartElement(String localName) throws XMLStreamException; public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException; public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLStreamConstants.java0000664000175000017500000000305610573733234026576 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public interface XMLStreamConstants { public static final int ATTRIBUTE = 10; public static final int CDATA = 12; public static final int CHARACTERS = 4; public static final int COMMENT = 5; public static final int DTD = 11; public static final int END_DOCUMENT = 8; public static final int END_ELEMENT = 2; public static final int ENTITY_DECLARATION = 15; public static final int ENTITY_REFERENCE = 9; public static final int NAMESPACE = 13; public static final int NOTATION_DECLARATION = 14; public static final int PROCESSING_INSTRUCTION = 3; public static final int SPACE = 6; public static final int START_DOCUMENT = 7; public static final int START_ELEMENT = 1; }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/Location.java0000664000175000017500000000202110574057117024624 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; public interface Location { public int getCharacterOffset(); public int getColumnNumber(); public int getLineNumber(); public String getPublicId(); public String getSystemId(); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/stream/XMLEventReader.java0000664000175000017500000000252410574057117025651 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.stream; import java.util.Iterator; import javax.xml.stream.events.XMLEvent; public interface XMLEventReader extends Iterator { public void close() throws XMLStreamException; public String getElementText() throws XMLStreamException; public Object getProperty(java.lang.String name) throws IllegalArgumentException; public boolean hasNext(); public XMLEvent nextEvent() throws XMLStreamException; public XMLEvent nextTag() throws XMLStreamException; public XMLEvent peek() throws XMLStreamException; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/XMLConstants.java0000664000175000017500000000235010574057117024123 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml; public class XMLConstants { public static final java.lang.String DEFAULT_NS_PREFIX = ""; public static final java.lang.String XML_NS_PREFIX = "xml"; public static final java.lang.String XML_NS_URI = "http://www.w3.org/XML/1998/namespace"; public static final java.lang.String XMLNS_ATTRIBUTE = "xmlns"; public static final java.lang.String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/"; } geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/namespace/0000775000175000017500000000000011703403414022645 5ustar brianbriangeronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/namespace/NamespaceContext.java0000664000175000017500000000205510574057117026765 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.namespace; import java.util.Iterator; public interface NamespaceContext { public String getNamespaceURI(String prefix); public String getPrefix(String namespaceURI); public Iterator getPrefixes(String namespaceURI); }geronimo-stax-1.2-spec-1.1/src/main/java/javax/xml/namespace/QName.java0000664000175000017500000001030011353160647024514 0ustar brianbrian/* ** ** Licensed to the Apache Software Foundation (ASF) under one ** or more contributor license agreements. See the NOTICE file ** distributed with this work for additional information ** regarding copyright ownership. The ASF licenses this file ** to you under the Apache License, Version 2.0 (the ** "License"); you may not use this file except in compliance ** with the License. You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. */ package javax.xml.namespace; import java.io.Serializable; import javax.xml.XMLConstants; public class QName implements Serializable { // not specified in the javadoc, but this is what appears to be used. private static final long serialVersionUID = -9120448754896609940L; // the namespace URI of this qualified name private final String namespaceURI; // the local part of the name private final String localPart; // the name prefix string private final String prefix; public QName(String localPart) { // default both the URI and the prefix this("", localPart, XMLConstants.DEFAULT_NS_PREFIX); } public QName(String namespaceURI, String localPart) { // the default prefix is defined in XMLConstants this(namespaceURI, localPart, XMLConstants.DEFAULT_NS_PREFIX); } public QName(String namespaceURI, String localPart, String prefix) { // there is a default in constants as well this.namespaceURI = namespaceURI == null ? "" : namespaceURI; // both the local part and the prefix are required if (localPart == null) { throw new IllegalArgumentException("local part is required when creating a QName"); } this.localPart = localPart; if (prefix == null) { throw new IllegalArgumentException("prefix is required when creating a QName"); } this.prefix = prefix; } public final boolean equals(Object other) { if (other == null || !(other instanceof QName)) { return false; } QName qName = (QName)other; // only the namespace and localPart are considered. the prefix is not used. return namespaceURI.equals(qName.namespaceURI) && localPart.equals(qName.localPart); } public final int hashCode() { // uses both the namespace and localpart as a combined hash. return namespaceURI.hashCode() ^ localPart.hashCode(); } public String getNamespaceURI() { return namespaceURI; } public String getLocalPart() { return localPart; } public String getPrefix() { return prefix; } public String toString() { // if no real URI, this is just the local part, otherwise // use the braces syntax. if (namespaceURI.length() == 0) { return localPart; } else { return "{" + namespaceURI + "}" + localPart; } } public static QName valueOf(String source) { // a name is required if (source == null) { throw new IllegalArgumentException("source QName string is required"); } // if this is a null string or it does not start with '{', treat this // as a local part alone. if (source.length() == 0 || source.charAt(0) != '{') { return new QName(source); } // Namespace URI and local part specified int uriEnd = source.indexOf('}'); if (uriEnd == -1) { throw new IllegalArgumentException("Incorrect QName syntax: " + source); } String uri = source.substring(1, uriEnd); if (uri.length() == 0) { throw new IllegalArgumentException("Null namespace URI in QName value: " + source); } // no prefix possible here, just the URI and the local part return new QName(uri, source.substring(uriEnd + 1)); } } geronimo-stax-1.2-spec-1.1/NOTICE.txt0000664000175000017500000000025310613154543016073 0ustar brianbrianApache Geronimo Copyright 2003-2006 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/).