jaxp/src/javax/xml/stream/XMLEventFactory.java
author duke
Wed, 05 Jul 2017 18:58:01 +0200
changeset 17815 b72ae39e1329
parent 17264 3aff554ad461
child 20581 65d17ea72da3
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     1
/*
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     3
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     9
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    14
 * accompanied this code).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    15
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    19
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    22
 * questions.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    23
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    24
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    25
/*
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    26
 * Copyright (c) 2009, 2013, by Oracle Corporation. All Rights Reserved.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    27
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    28
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    29
package javax.xml.stream;
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    30
import java.util.Iterator;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    31
import javax.xml.namespace.NamespaceContext;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    32
import javax.xml.namespace.QName;
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    33
import javax.xml.stream.events.*;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    34
/**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    35
 * This interface defines a utility class for creating instances of
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    36
 * XMLEvents
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    37
 * @version 1.2
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    38
 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    39
 * @see javax.xml.stream.events.StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    40
 * @see javax.xml.stream.events.EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    41
 * @see javax.xml.stream.events.ProcessingInstruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    42
 * @see javax.xml.stream.events.Comment
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    43
 * @see javax.xml.stream.events.Characters
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    44
 * @see javax.xml.stream.events.StartDocument
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    45
 * @see javax.xml.stream.events.EndDocument
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    46
 * @see javax.xml.stream.events.DTD
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    47
 * @since 1.6
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    48
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    49
public abstract class XMLEventFactory {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    50
  protected XMLEventFactory(){}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    51
13624
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    52
    static final String JAXPFACTORYID = "javax.xml.stream.XMLEventFactory";
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    53
    static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    54
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    55
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    56
  /**
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    57
   * Creates a new instance of the factory in exactly the same manner as the
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    58
   * {@link #newFactory()} method.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    59
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    60
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    61
  public static XMLEventFactory newInstance()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    62
    throws FactoryConfigurationError
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    63
  {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    64
    return FactoryFinder.find(XMLEventFactory.class, DEFAULIMPL);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    65
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    66
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    67
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    68
   * Create a new instance of the factory.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    69
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    70
   * This static method creates a new factory instance.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    71
   * This method uses the following ordered lookup procedure to determine
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    72
   * the XMLEventFactory implementation class to load:
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    73
   * </p>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    74
   * <ul>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    75
   * <li>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    76
   *   Use the javax.xml.stream.XMLEventFactory system property.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    77
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    78
   * <li>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    79
   *   Use the properties file "lib/stax.properties" in the JRE directory.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    80
   *     This configuration file is in standard java.util.Properties format
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    81
   *     and contains the fully qualified name of the implementation class
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    82
   *     with the key being the system property defined above.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    83
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    84
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    85
   *   Use the service-provider loading facilities, defined by the
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    86
   *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    87
   *   implementation of the service.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    88
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    89
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    90
   *   Otherwise, the system-default implementation is returned.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    91
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    92
   * </ul>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    93
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    94
   *   Once an application has obtained a reference to a XMLEventFactory it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    95
   *   can use the factory to configure and obtain stream instances.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    96
   * </p>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    97
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    98
   *   Note that this is a new method that replaces the deprecated newInstance() method.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    99
   *     No changes in behavior are defined by this replacement method relative to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   100
   *     the deprecated method.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   101
   * </p>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   102
   * @throws FactoryConfigurationError in case of {@linkplain
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   103
   *   java.util.ServiceConfigurationError service configuration error} or if
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   104
   *   the implementation is not available or cannot be instantiated.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   105
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   106
  public static XMLEventFactory newFactory()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   107
    throws FactoryConfigurationError
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   108
  {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   109
    return FactoryFinder.find(XMLEventFactory.class, DEFAULIMPL);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   110
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   111
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   112
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   113
   * Create a new instance of the factory
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   114
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   115
   * @param factoryId             Name of the factory to find, same as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   116
   *                              a property name
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   117
   * @param classLoader           classLoader to use
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   118
   * @return the factory implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   119
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   120
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   121
   * @deprecated  This method has been deprecated to maintain API consistency.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   122
   *              All newInstance methods have been replaced with corresponding
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   123
   *              newFactory methods. The replacement {@link
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   124
   *              #newFactory(java.lang.String, java.lang.ClassLoader)}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   125
   *              method defines no changes in behavior.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   126
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   127
  public static XMLEventFactory newInstance(String factoryId,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   128
          ClassLoader classLoader)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   129
          throws FactoryConfigurationError {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   130
      //do not fallback if given classloader can't find the class, throw exception
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   131
      return FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   132
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   133
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   134
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   135
   * Create a new instance of the factory.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   136
   * If the classLoader argument is null, then the ContextClassLoader is used.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   137
   * <p>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   138
   * This method uses the following ordered lookup procedure to determine
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   139
   * the XMLEventFactory implementation class to load:
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   140
   * </p>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   141
   * <ul>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   142
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   143
   *   Use the value of the system property identified by {@code factoryId}.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   144
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   145
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   146
   *   Use the properties file "lib/stax.properties" in the JRE directory.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   147
   *     This configuration file is in standard java.util.Properties format
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   148
   *     and contains the fully qualified name of the implementation class
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   149
   *     with the key being the given {@code factoryId}.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   150
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   151
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   152
   *   If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   153
   *   use the service-provider loading facilities, defined by the
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   154
   *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   155
   *   implementation of the service.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   156
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   157
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   158
   *   Otherwise, throws a {@link FactoryConfigurationError}.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   159
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   160
   * </ul>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   161
   *
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   162
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   163
   * Note that this is a new method that replaces the deprecated
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   164
   *   {@link #newInstance(java.lang.String, java.lang.ClassLoader)
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   165
   *   newInstance(String factoryId, ClassLoader classLoader)} method.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   166
   * No changes in behavior are defined by this replacement method relative
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   167
   * to the deprecated method.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   168
   * </p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   169
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   170
   * @param factoryId             Name of the factory to find, same as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   171
   *                              a property name
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   172
   * @param classLoader           classLoader to use
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   173
   * @return the factory implementation
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   174
   * @throws FactoryConfigurationError in case of {@linkplain
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   175
   *   java.util.ServiceConfigurationError service configuration error} or if
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   176
   *   the implementation is not available or cannot be instantiated.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   177
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   178
  public static XMLEventFactory newFactory(String factoryId,
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   179
                                           ClassLoader classLoader)
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   180
          throws FactoryConfigurationError {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   181
      //do not fallback if given classloader can't find the class, throw exception
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   182
      return FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   183
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   184
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   185
 /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   186
   * This method allows setting of the Location on each event that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   187
   * is created by this factory.  The values are copied by value into
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   188
   * the events created by this factory.  To reset the location
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   189
   * information set the location to null.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   190
   * @param location the location to set on each event created
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   191
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   192
  public abstract void setLocation(Location location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   193
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   194
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   195
   * Create a new Attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   196
   * @param prefix the prefix of this attribute, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   197
   * @param namespaceURI the attribute value is set to this value, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   198
   * @param localName the local name of the XML name of the attribute, localName cannot be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   199
   * @param value the attribute value to set, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   200
   * @return the Attribute with specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   201
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   202
  public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   203
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   204
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   205
   * Create a new Attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   206
   * @param localName the local name of the XML name of the attribute, localName cannot be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   207
   * @param value the attribute value to set, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   208
   * @return the Attribute with specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   209
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   210
  public abstract Attribute createAttribute(String localName, String value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   211
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   212
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   213
   * Create a new Attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   214
   * @param name the qualified name of the attribute, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   215
   * @param value the attribute value to set, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   216
   * @return the Attribute with specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   217
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   218
  public abstract Attribute createAttribute(QName name, String value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   219
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   220
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   221
   * Create a new default Namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   222
   * @param namespaceURI the default namespace uri
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   223
   * @return the Namespace with the specified value
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   224
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   225
  public abstract Namespace createNamespace(String namespaceURI);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   226
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   227
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   228
   * Create a new Namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   229
   * @param prefix the prefix of this namespace, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   230
   * @param namespaceUri the attribute value is set to this value, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   231
   * @return the Namespace with the specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   232
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   233
  public abstract Namespace createNamespace(String prefix, String namespaceUri);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   234
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   235
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   236
   * Create a new StartElement.  Namespaces can be added to this StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   237
   * by passing in an Iterator that walks over a set of Namespace interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   238
   * Attributes can be added to this StartElement by passing an iterator
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   239
   * that walks over a set of Attribute interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   240
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   241
   * @param name the qualified name of the attribute, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   242
   * @param attributes an optional unordered set of objects that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   243
   * implement Attribute to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   244
   * @param namespaces an optional unordered set of objects that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   245
   * implement Namespace to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   246
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   247
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   248
  public abstract StartElement createStartElement(QName name,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   249
                                                  Iterator attributes,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   250
                                                  Iterator namespaces);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   251
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   252
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   253
   * Create a new StartElement.  This defaults the NamespaceContext to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   254
   * an empty NamespaceContext.  Querying this event for its namespaces or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   255
   * attributes will result in an empty iterator being returned.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   256
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   257
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   258
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   259
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   260
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   261
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   262
  public abstract StartElement createStartElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   263
                                                  String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   264
                                                  String localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   265
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   266
   * Create a new StartElement.  Namespaces can be added to this StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   267
   * by passing in an Iterator that walks over a set of Namespace interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   268
   * Attributes can be added to this StartElement by passing an iterator
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   269
   * that walks over a set of Attribute interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   270
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   271
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   272
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   273
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   274
   * @param attributes an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   275
   * Attribute to add to the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   276
   * @param namespaces an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   277
   * Namespace to add to the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   278
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   279
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   280
  public abstract StartElement createStartElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   281
                                                  String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   282
                                                  String localName,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   283
                                                  Iterator attributes,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   284
                                                  Iterator namespaces
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   285
                                                  );
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   286
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   287
   * Create a new StartElement.  Namespaces can be added to this StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   288
   * by passing in an Iterator that walks over a set of Namespace interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   289
   * Attributes can be added to this StartElement by passing an iterator
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   290
   * that walks over a set of Attribute interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   291
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   292
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   293
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   294
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   295
   * @param attributes an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   296
   * Attribute to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   297
   * @param namespaces an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   298
   * Namespace to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   299
   * @param context the namespace context of this element
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   300
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   301
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   302
  public abstract StartElement createStartElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   303
                                                  String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   304
                                                  String localName,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   305
                                                  Iterator attributes,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   306
                                                  Iterator namespaces,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   307
                                                  NamespaceContext context
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   308
                                                  );
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   309
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   310
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   311
   * Create a new EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   312
   * @param name the qualified name of the EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   313
   * @param namespaces an optional unordered set of objects that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   314
   * implement Namespace that have gone out of scope, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   315
   * @return an instance of the requested EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   316
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   317
  public abstract EndElement createEndElement(QName name,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   318
                                              Iterator namespaces);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   319
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   320
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   321
   * Create a new EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   322
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   323
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   324
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   325
   * @return an instance of the requested EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   326
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   327
  public abstract EndElement createEndElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   328
                                              String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   329
                                              String localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   330
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   331
   * Create a new EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   332
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   333
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   334
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   335
   * @param namespaces an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   336
   * Namespace that have gone out of scope, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   337
   * @return an instance of the requested EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   338
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   339
  public abstract EndElement createEndElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   340
                                              String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   341
                                              String localName,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   342
                                              Iterator namespaces);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   343
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   344
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   345
   * Create a Characters event, this method does not check if the content
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   346
   * is all whitespace.  To create a space event use #createSpace(String)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   347
   * @param content the string to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   348
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   349
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   350
  public abstract Characters createCharacters(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   351
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   352
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   353
   * Create a Characters event with the CData flag set to true
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   354
   * @param content the string to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   355
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   356
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   357
  public abstract Characters createCData(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   358
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   359
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   360
   * Create a Characters event with the isSpace flag set to true
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   361
   * @param content the content of the space to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   362
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   363
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   364
  public abstract Characters createSpace(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   365
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   366
   * Create an ignorable space
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   367
   * @param content the space to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   368
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   369
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   370
  public abstract Characters createIgnorableSpace(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   371
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   372
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   373
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   374
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   375
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   376
  public abstract StartDocument createStartDocument();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   377
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   378
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   379
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   380
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   381
   * @param encoding the encoding style
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   382
   * @param version the XML version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   383
   * @param standalone the status of standalone may be set to "true" or "false"
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   384
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   385
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   386
  public abstract StartDocument createStartDocument(String encoding,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   387
                                                  String version,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   388
                                                  boolean standalone);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   389
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   390
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   391
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   392
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   393
   * @param encoding the encoding style
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   394
   * @param version the XML version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   395
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   396
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   397
  public abstract StartDocument createStartDocument(String encoding,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   398
                                                  String version);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   399
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   400
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   401
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   402
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   403
   * @param encoding the encoding style
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   404
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   405
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   406
  public abstract StartDocument createStartDocument(String encoding);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   407
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   408
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   409
   * Creates a new instance of an EndDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   410
   * @return an EndDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   411
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   412
  public abstract EndDocument createEndDocument();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   413
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   414
  /** Creates a new instance of a EntityReference event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   415
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   416
   * @param name The name of the reference
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   417
   * @param declaration the declaration for the event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   418
   * @return an EntityReference event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   419
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   420
  public abstract EntityReference createEntityReference(String name,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   421
                                                        EntityDeclaration declaration);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   422
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   423
   * Create a comment
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   424
   * @param text The text of the comment
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   425
   * a Comment event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   426
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   427
  public abstract Comment createComment(String text);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   428
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   429
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   430
   * Create a processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   431
   * @param target The target of the processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   432
   * @param data The text of the processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   433
   * @return a ProcessingInstruction event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   434
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   435
  public abstract ProcessingInstruction createProcessingInstruction(String target,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   436
                                                                   String data);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   437
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   438
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   439
   * Create a document type definition event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   440
   * This string contains the entire document type declaration that matches
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   441
   * the doctypedecl in the XML 1.0 specification
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   442
   * @param dtd the text of the document type definition
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   443
   * @return a DTD event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   444
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   445
  public abstract DTD createDTD(String dtd);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   446
}