jaxp/src/share/classes/javax/xml/stream/XMLOutputFactory.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
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
import javax.xml.transform.Result;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
 * Defines an abstract implementation of a factory for
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 * getting XMLEventWriters and XMLStreamWriters.
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * The following table defines the standard properties of this specification.
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * Each property varies in the level of support required by each implementation.
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 * The level of support required is described in the 'Required' column.
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 *     <table border="2" rules="all" cellpadding="4">
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 *     <thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 *      <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 *        <th align="center" colspan="2">
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 *          Configuration parameters
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 *        </th>
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 *      </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
 *    </thead>
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
 *    <tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
 *      <tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
 *        <th>Property Name</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
 *        <th>Behavior</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
 *        <th>Return type</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
 *        <th>Default Value</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
 *        <th>Required</th>
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
 *              </tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
 *         <tr><td>javax.xml.stream.isRepairingNamespaces</td><td>defaults prefixes on the output side</td><td>Boolean</td><td>False</td><td>Yes</td></tr>
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
 *      </tbody>
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
 *   </table>
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
 * <p>The following paragraphs describe the namespace and prefix repair algorithm:</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
 * <p>The property can be set with the following code line:
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
 * <code>setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));</code></p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
 * <p>This property specifies that the writer default namespace prefix declarations.
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
 * The default value is false. </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
 * <p>If a writer isRepairingNamespaces it will create a namespace declaration
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
 * on the current StartElement for
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
 * any attribute that does not
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
 * currently have a namespace declaration in scope.  If the StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
 * has a uri but no prefix specified a prefix will be assigned, if the prefix
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
 * has not been declared in a parent of the current StartElement it will be declared
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
 * on the current StartElement.  If the defaultNamespace is bound and in scope
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
 * and the default namespace matches the URI of the attribute or StartElement
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
 * QName no prefix will be assigned.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
 * <p>If an element or attribute name has a prefix, but is not
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
 * bound to any namespace URI, then the prefix will be removed
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
 * during serialization.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
 * <p>If element and/or attribute names in the same start or
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
 * empty-element tag are bound to different namespace URIs and
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
 * are using the same prefix then the element or the first
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
 * occurring attribute retains the original prefix and the
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
 * following attributes have their prefixes replaced with a
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
 * new prefix that is bound to the namespace URIs of those
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
 * attributes. </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
 * <p>If an element or attribute name uses a prefix that is
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
 * bound to a different URI than that inherited from the
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
 * namespace context of the parent of that element and there
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
 * is no namespace declaration in the context of the current
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
 * element then such a namespace declaration is added. </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
 * <p>If an element or attribute name is bound to a prefix and
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
 * there is a namespace declaration that binds that prefix
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
 * to a different URI then that namespace declaration is
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
 * either removed if the correct mapping is inherited from
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
 * the parent context of that element, or changed to the
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
 * namespace URI of the element or attribute using that prefix.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
 * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
 * @see XMLInputFactory
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
 * @see XMLEventWriter
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
 * @see XMLStreamWriter
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
 * @since 1.6
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
public abstract class XMLOutputFactory {
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
   * Property used to set prefix defaulting on the output side
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
  public static final String IS_REPAIRING_NAMESPACES=
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
    "javax.xml.stream.isRepairingNamespaces";
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
  protected XMLOutputFactory(){}
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 instance of the factory.
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
  public static XMLOutputFactory newInstance()
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
    throws FactoryConfigurationError
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
  {
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
    return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory",
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
                                                 "com.sun.xml.internal.stream.XMLOutputFactoryImpl");
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
   * Create a new instance of the factory.
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
   * @param factoryId             Name of the factory to find, same as
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
   *                              a property name
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
   * @param classLoader           classLoader to use
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
   * @return the factory implementation
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
  public static XMLInputFactory newInstance(String factoryId,
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
          ClassLoader classLoader)
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
          throws FactoryConfigurationError {
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
      try {
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
          //do not fallback if given classloader can't find the class, throw exception
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
          return (XMLInputFactory) FactoryFinder.newInstance(factoryId, classLoader, false);
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
      } catch (FactoryFinder.ConfigurationError e) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
          throw new FactoryConfigurationError(e.getException(),
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
                  e.getMessage());
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
      }
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
  }
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 XMLStreamWriter that writes to a writer
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
   * @param stream the writer to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
  public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
   * Create a new XMLStreamWriter that writes to a stream
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
   * @param stream the stream to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
  public abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
   * Create a new XMLStreamWriter that writes to a stream
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
   * @param stream the stream to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
   * @param encoding the encoding to use
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
  public abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream,
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
                                         String encoding) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
   * Create a new XMLStreamWriter that writes to a JAXP result.  This method is optional.
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
   * @param result the result to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
   * @throws UnsupportedOperationException if this method is not
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
   * supported by this XMLOutputFactory
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
  public abstract XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
   * Create a new XMLEventWriter that writes to a JAXP result.  This method is optional.
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
   * @param result the result to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
   * @throws UnsupportedOperationException if this method is not
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
   * supported by this XMLOutputFactory
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
  public abstract XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
   * Create a new XMLEventWriter that writes to a stream
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
   * @param stream the stream to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
  public abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
   * Create a new XMLEventWriter that writes to a stream
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
   * @param stream the stream to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
   * @param encoding the encoding to use
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
  public abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream,
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
                                                     String encoding) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
   * Create a new XMLEventWriter that writes to a writer
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
   * @param stream the stream to write to
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
   * @throws XMLStreamException
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
  public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
   * Allows the user to set specific features/properties on the underlying implementation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
   * @param name The name of the property
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
   * @param value The value of the property
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
   * @throws java.lang.IllegalArgumentException if the property is not supported
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
  public abstract void setProperty(java.lang.String name,
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
                                    Object value)
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
    throws IllegalArgumentException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
   * Get a feature/property on the underlying implementation
7f561c08de6b Initial load
duke
parents:
diff changeset
   230
   * @param name The name of the property
7f561c08de6b Initial load
duke
parents:
diff changeset
   231
   * @return The value of the property
7f561c08de6b Initial load
duke
parents:
diff changeset
   232
   * @throws java.lang.IllegalArgumentException if the property is not supported
7f561c08de6b Initial load
duke
parents:
diff changeset
   233
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   234
  public abstract Object getProperty(java.lang.String name)
7f561c08de6b Initial load
duke
parents:
diff changeset
   235
    throws IllegalArgumentException;
7f561c08de6b Initial load
duke
parents:
diff changeset
   236
7f561c08de6b Initial load
duke
parents:
diff changeset
   237
  /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   238
   * Query the set of properties that this factory supports.
7f561c08de6b Initial load
duke
parents:
diff changeset
   239
   *
7f561c08de6b Initial load
duke
parents:
diff changeset
   240
   * @param name The name of the property (may not be null)
7f561c08de6b Initial load
duke
parents:
diff changeset
   241
   * @return true if the property is supported and false otherwise
7f561c08de6b Initial load
duke
parents:
diff changeset
   242
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   243
  public abstract boolean isPropertySupported(String name);
7f561c08de6b Initial load
duke
parents:
diff changeset
   244
}