jaxp/src/share/classes/javax/xml/stream/XMLEventFactory.java
author ohair
Mon, 14 Apr 2008 14:52:27 -0700
changeset 311 3c14f21bf3f7
parent 6 7f561c08de6b
permissions -rw-r--r--
6484686: The next directory looks like it is no longer part of the build (deploy makefiles) Summary: Getting rid of the _OUTPUTDIR settings. Using BUILD_PARENT_DIRECTORY instead. This solves problems with the "/build/windows-i586*" paths getting mangled on Windows builds (fastdebug builds in particular). Reviewed-by: tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Sun designates this
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * by Sun in the LICENSE file that accompanied this code.
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * accompanied this code).
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 * CA 95054 USA or visit www.sun.com if you need additional information or
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 * have any questions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
 * Copyright (c) 2003 by BEA Systems, Inc. All Rights Reserved.
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
package javax.xml.stream;
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
import javax.xml.stream.events.*;
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
import javax.xml.namespace.NamespaceContext;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
import javax.xml.namespace.QName;
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
import java.util.Iterator;
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 * This interface defines a utility class for creating instances of
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 * XMLEvents
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * @see javax.xml.stream.events.StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 * @see javax.xml.stream.events.EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 * @see javax.xml.stream.events.ProcessingInstruction
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * @see javax.xml.stream.events.Comment
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * @see javax.xml.stream.events.Characters
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 * @see javax.xml.stream.events.StartDocument
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * @see javax.xml.stream.events.EndDocument
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 * @see javax.xml.stream.events.DTD
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 * @since 1.6
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
public abstract class XMLEventFactory {
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
  protected XMLEventFactory(){}
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
   * Create a new instance of the factory
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
  public static XMLEventFactory newInstance()
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
    throws FactoryConfigurationError
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
    return (XMLEventFactory) FactoryFinder.find(
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
      "javax.xml.stream.XMLEventFactory",
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
      "com.sun.xml.internal.stream.events.XMLEventFactoryImpl");
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
   * Create a new instance of the factory
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
   * @param factoryId             Name of the factory to find, same as
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
   *                              a property name
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
   * @param classLoader           classLoader to use
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
   * @return the factory implementation
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
  public static XMLEventFactory newInstance(String factoryId,
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
          ClassLoader classLoader)
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
          throws FactoryConfigurationError {
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
      try {
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
          //do not fallback if given classloader can't find the class, throw exception
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
          return (XMLEventFactory) FactoryFinder.newInstance(factoryId, classLoader, false);
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
      } catch (FactoryFinder.ConfigurationError e) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
          throw new FactoryConfigurationError(e.getException(),
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
                  e.getMessage());
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
      }
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
 /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
   * This method allows setting of the Location on each event that
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
   * is created by this factory.  The values are copied by value into
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
   * the events created by this factory.  To reset the location
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
   * information set the location to null.
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
   * @param location the location to set on each event created
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
  public abstract void setLocation(Location location);
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
   * Create a new Attribute
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
   * @param prefix the prefix of this attribute, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
   * @param namespaceURI the attribute value is set to this value, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
   * @param localName the local name of the XML name of the attribute, localName cannot be null
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
   * @param value the attribute value to set, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
   * @return the Attribute with specified values
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
  public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value);
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
   * Create a new Attribute
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
   * @param localName the local name of the XML name of the attribute, localName cannot be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
   * @param value the attribute value to set, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
   * @return the Attribute with specified values
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
  public abstract Attribute createAttribute(String localName, String value);
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
   * Create a new Attribute
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
   * @param name the qualified name of the attribute, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
   * @param value the attribute value to set, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
   * @return the Attribute with specified values
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
  public abstract Attribute createAttribute(QName name, String value);
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
   * Create a new default Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
   * @param namespaceURI the default namespace uri
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
   * @return the Namespace with the specified value
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
  public abstract Namespace createNamespace(String namespaceURI);
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
   * Create a new Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
   * @param prefix the prefix of this namespace, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
   * @param namespaceUri the attribute value is set to this value, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
   * @return the Namespace with the specified values
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
  public abstract Namespace createNamespace(String prefix, String namespaceUri);
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
   * Create a new StartElement.  Namespaces can be added to this StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
   * by passing in an Iterator that walks over a set of Namespace interfaces.
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
   * Attributes can be added to this StartElement by passing an iterator
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
   * that walks over a set of Attribute interfaces.
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
   * @param name the qualified name of the attribute, may not be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
   * @param attributes an optional unordered set of objects that
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
   * implement Attribute to add to the new StartElement, may be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
   * @param namespaces an optional unordered set of objects that
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
   * implement Namespace to add to the new StartElement, may be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
   * @return an instance of the requested StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
  public abstract StartElement createStartElement(QName name,
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
                                                  Iterator attributes,
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
                                                  Iterator namespaces);
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
   * Create a new StartElement.  This defaults the NamespaceContext to
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
   * an empty NamespaceContext.  Querying this event for its namespaces or
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
   * attributes will result in an empty iterator being returned.
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
   * @param namespaceUri the uri of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
   * @param localName the local name of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
   * @param prefix the prefix of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
   * @return an instance of the requested StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
  public abstract StartElement createStartElement(String prefix,
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
                                                  String namespaceUri,
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
                                                  String localName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
   * Create a new StartElement.  Namespaces can be added to this StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
   * by passing in an Iterator that walks over a set of Namespace interfaces.
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
   * Attributes can be added to this StartElement by passing an iterator
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
   * that walks over a set of Attribute interfaces.
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
   * @param namespaceUri the uri of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
   * @param localName the local name of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
   * @param prefix the prefix of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
   * @param attributes an unordered set of objects that implement
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
   * Attribute to add to the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
   * @param namespaces an unordered set of objects that implement
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
   * Namespace to add to the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
   * @return an instance of the requested StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
  public abstract StartElement createStartElement(String prefix,
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
                                                  String namespaceUri,
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
                                                  String localName,
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
                                                  Iterator attributes,
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
                                                  Iterator namespaces
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
                                                  );
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
   * Create a new StartElement.  Namespaces can be added to this StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
   * by passing in an Iterator that walks over a set of Namespace interfaces.
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
   * Attributes can be added to this StartElement by passing an iterator
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
   * that walks over a set of Attribute interfaces.
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
   * @param namespaceUri the uri of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
   * @param localName the local name of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
   * @param prefix the prefix of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
   * @param attributes an unordered set of objects that implement
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
   * Attribute to add to the new StartElement, may be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
   * @param namespaces an unordered set of objects that implement
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
   * Namespace to add to the new StartElement, may be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
   * @param context the namespace context of this element
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
   * @return an instance of the requested StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
  public abstract StartElement createStartElement(String prefix,
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
                                                  String namespaceUri,
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
                                                  String localName,
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
                                                  Iterator attributes,
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
                                                  Iterator namespaces,
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
                                                  NamespaceContext context
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
                                                  );
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
   * Create a new EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
   * @param name the qualified name of the EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
   * @param namespaces an optional unordered set of objects that
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
   * implement Namespace that have gone out of scope, may be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
   * @return an instance of the requested EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
  public abstract EndElement createEndElement(QName name,
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
                                              Iterator namespaces);
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
   * Create a new EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
   * @param namespaceUri the uri of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
   * @param localName the local name of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
   * @param prefix the prefix of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
   * @return an instance of the requested EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
  public abstract EndElement createEndElement(String prefix,
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
                                              String namespaceUri,
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
                                              String localName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   230
   * Create a new EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   231
   * @param namespaceUri the uri of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   232
   * @param localName the local name of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   233
   * @param prefix the prefix of the QName of the new StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   234
   * @param namespaces an unordered set of objects that implement
7f561c08de6b Initial load
duke
parents:
diff changeset
   235
   * Namespace that have gone out of scope, may be null
7f561c08de6b Initial load
duke
parents:
diff changeset
   236
   * @return an instance of the requested EndElement
7f561c08de6b Initial load
duke
parents:
diff changeset
   237
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   238
  public abstract EndElement createEndElement(String prefix,
7f561c08de6b Initial load
duke
parents:
diff changeset
   239
                                              String namespaceUri,
7f561c08de6b Initial load
duke
parents:
diff changeset
   240
                                              String localName,
7f561c08de6b Initial load
duke
parents:
diff changeset
   241
                                              Iterator namespaces);
7f561c08de6b Initial load
duke
parents:
diff changeset
   242
7f561c08de6b Initial load
duke
parents:
diff changeset
   243
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   244
   * Create a Characters event, this method does not check if the content
7f561c08de6b Initial load
duke
parents:
diff changeset
   245
   * is all whitespace.  To create a space event use #createSpace(String)
7f561c08de6b Initial load
duke
parents:
diff changeset
   246
   * @param content the string to create
7f561c08de6b Initial load
duke
parents:
diff changeset
   247
   * @return a Characters event
7f561c08de6b Initial load
duke
parents:
diff changeset
   248
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   249
  public abstract Characters createCharacters(String content);
7f561c08de6b Initial load
duke
parents:
diff changeset
   250
7f561c08de6b Initial load
duke
parents:
diff changeset
   251
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   252
   * Create a Characters event with the CData flag set to true
7f561c08de6b Initial load
duke
parents:
diff changeset
   253
   * @param content the string to create
7f561c08de6b Initial load
duke
parents:
diff changeset
   254
   * @return a Characters event
7f561c08de6b Initial load
duke
parents:
diff changeset
   255
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   256
  public abstract Characters createCData(String content);
7f561c08de6b Initial load
duke
parents:
diff changeset
   257
7f561c08de6b Initial load
duke
parents:
diff changeset
   258
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   259
   * Create a Characters event with the isSpace flag set to true
7f561c08de6b Initial load
duke
parents:
diff changeset
   260
   * @param content the content of the space to create
7f561c08de6b Initial load
duke
parents:
diff changeset
   261
   * @return a Characters event
7f561c08de6b Initial load
duke
parents:
diff changeset
   262
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   263
  public abstract Characters createSpace(String content);
7f561c08de6b Initial load
duke
parents:
diff changeset
   264
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   265
   * Create an ignorable space
7f561c08de6b Initial load
duke
parents:
diff changeset
   266
   * @param content the space to create
7f561c08de6b Initial load
duke
parents:
diff changeset
   267
   * @return a Characters event
7f561c08de6b Initial load
duke
parents:
diff changeset
   268
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   269
  public abstract Characters createIgnorableSpace(String content);
7f561c08de6b Initial load
duke
parents:
diff changeset
   270
7f561c08de6b Initial load
duke
parents:
diff changeset
   271
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   272
   * Creates a new instance of a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   273
   * @return a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   274
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   275
  public abstract StartDocument createStartDocument();
7f561c08de6b Initial load
duke
parents:
diff changeset
   276
7f561c08de6b Initial load
duke
parents:
diff changeset
   277
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   278
   * Creates a new instance of a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   279
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   280
   * @param encoding the encoding style
7f561c08de6b Initial load
duke
parents:
diff changeset
   281
   * @param version the XML version
7f561c08de6b Initial load
duke
parents:
diff changeset
   282
   * @param standalone the status of standalone may be set to "true" or "false"
7f561c08de6b Initial load
duke
parents:
diff changeset
   283
   * @return a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   284
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   285
  public abstract StartDocument createStartDocument(String encoding,
7f561c08de6b Initial load
duke
parents:
diff changeset
   286
                                                  String version,
7f561c08de6b Initial load
duke
parents:
diff changeset
   287
                                                  boolean standalone);
7f561c08de6b Initial load
duke
parents:
diff changeset
   288
7f561c08de6b Initial load
duke
parents:
diff changeset
   289
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   290
   * Creates a new instance of a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   291
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   292
   * @param encoding the encoding style
7f561c08de6b Initial load
duke
parents:
diff changeset
   293
   * @param version the XML version
7f561c08de6b Initial load
duke
parents:
diff changeset
   294
   * @return a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   295
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   296
  public abstract StartDocument createStartDocument(String encoding,
7f561c08de6b Initial load
duke
parents:
diff changeset
   297
                                                  String version);
7f561c08de6b Initial load
duke
parents:
diff changeset
   298
7f561c08de6b Initial load
duke
parents:
diff changeset
   299
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   300
   * Creates a new instance of a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   301
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   302
   * @param encoding the encoding style
7f561c08de6b Initial load
duke
parents:
diff changeset
   303
   * @return a StartDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   304
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   305
  public abstract StartDocument createStartDocument(String encoding);
7f561c08de6b Initial load
duke
parents:
diff changeset
   306
7f561c08de6b Initial load
duke
parents:
diff changeset
   307
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   308
   * Creates a new instance of an EndDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   309
   * @return an EndDocument event
7f561c08de6b Initial load
duke
parents:
diff changeset
   310
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   311
  public abstract EndDocument createEndDocument();
7f561c08de6b Initial load
duke
parents:
diff changeset
   312
7f561c08de6b Initial load
duke
parents:
diff changeset
   313
  /** Creates a new instance of a EntityReference event
7f561c08de6b Initial load
duke
parents:
diff changeset
   314
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   315
   * @param name The name of the reference
7f561c08de6b Initial load
duke
parents:
diff changeset
   316
   * @param declaration the declaration for the event
7f561c08de6b Initial load
duke
parents:
diff changeset
   317
   * @return an EntityReference event
7f561c08de6b Initial load
duke
parents:
diff changeset
   318
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   319
  public abstract EntityReference createEntityReference(String name,
7f561c08de6b Initial load
duke
parents:
diff changeset
   320
                                                        EntityDeclaration declaration);
7f561c08de6b Initial load
duke
parents:
diff changeset
   321
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   322
   * Create a comment
7f561c08de6b Initial load
duke
parents:
diff changeset
   323
   * @param text The text of the comment
7f561c08de6b Initial load
duke
parents:
diff changeset
   324
   * a Comment event
7f561c08de6b Initial load
duke
parents:
diff changeset
   325
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   326
  public abstract Comment createComment(String text);
7f561c08de6b Initial load
duke
parents:
diff changeset
   327
7f561c08de6b Initial load
duke
parents:
diff changeset
   328
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   329
   * Create a processing instruction
7f561c08de6b Initial load
duke
parents:
diff changeset
   330
   * @param target The target of the processing instruction
7f561c08de6b Initial load
duke
parents:
diff changeset
   331
   * @param data The text of the processing instruction
7f561c08de6b Initial load
duke
parents:
diff changeset
   332
   * @return a ProcessingInstruction event
7f561c08de6b Initial load
duke
parents:
diff changeset
   333
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   334
  public abstract ProcessingInstruction createProcessingInstruction(String target,
7f561c08de6b Initial load
duke
parents:
diff changeset
   335
                                                                   String data);
7f561c08de6b Initial load
duke
parents:
diff changeset
   336
7f561c08de6b Initial load
duke
parents:
diff changeset
   337
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   338
   * Create a document type definition event
7f561c08de6b Initial load
duke
parents:
diff changeset
   339
   * This string contains the entire document type declaration that matches
7f561c08de6b Initial load
duke
parents:
diff changeset
   340
   * the doctypedecl in the XML 1.0 specification
7f561c08de6b Initial load
duke
parents:
diff changeset
   341
   * @param dtd the text of the document type definition
7f561c08de6b Initial load
duke
parents:
diff changeset
   342
   * @return a DTD event
7f561c08de6b Initial load
duke
parents:
diff changeset
   343
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   344
  public abstract DTD createDTD(String dtd);
7f561c08de6b Initial load
duke
parents:
diff changeset
   345
}