jaxp/src/share/classes/org/xml/sax/Attributes.java
author kvn
Fri, 20 Jun 2008 11:10:05 -0700
changeset 762 1b26adb5fea1
parent 6 7f561c08de6b
permissions -rw-r--r--
6715633: when matching a memory node the adr_type should not change Summary: verify the adr_type of a mach node was not changed Reviewed-by: rasbold, never
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
 * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
 * have any questions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
// Attributes.java - attribute list with Namespace support
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
// http://www.saxproject.org
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
// Written by David Megginson
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
// NO WARRANTY!  This class is in the public domain.
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
// $Id: Attributes.java,v 1.2 2004/11/03 22:44:51 jsuttor Exp $
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
package org.xml.sax;
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 * Interface for a list of XML attributes.
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * <blockquote>
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 * <em>This module, both source code and documentation, is in the
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * for further information.
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 * </blockquote>
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 * <p>This interface allows access to a list of attributes in
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 * three different ways:</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
 * <ol>
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
 * <li>by attribute index;</li>
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
 * <li>by Namespace-qualified name; or</li>
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
 * <li>by qualified (prefixed) name.</li>
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
 * </ol>
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
 * <p>The list will not contain attributes that were declared
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
 * #IMPLIED but not specified in the start tag.  It will also not
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
 * contain attributes used as Namespace declarations (xmlns*) unless
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
 * the <code>http://xml.org/sax/features/namespace-prefixes</code>
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
 * feature is set to <var>true</var> (it is <var>false</var> by
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
 * default).
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
 * Because SAX2 conforms to the original "Namespaces in XML"
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
 * recommendation, it normally does not
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
 * give namespace declaration attributes a namespace URI.
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
 * </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
 * <p>Some SAX2 parsers may support using an optional feature flag
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
 * (<code>http://xml.org/sax/features/xmlns-uris</code>) to request
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
 * that those attributes be given URIs, conforming to a later
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
 * backwards-incompatible revision of that recommendation.  (The
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
 * attribute's "local name" will be the prefix, or "xmlns" when
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
 * defining a default element namespace.)  For portability, handler
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
 * code should always resolve that conflict, rather than requiring
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
 * parsers that can change the setting of that feature flag.  </p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
 * <p>If the namespace-prefixes feature (see above) is
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
 * <var>false</var>, access by qualified name may not be available; if
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
 * the <code>http://xml.org/sax/features/namespaces</code> feature is
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
 * <var>false</var>, access by Namespace-qualified names may not be
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
 * available.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
 * <p>This interface replaces the now-deprecated SAX1 {@link
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
 * org.xml.sax.AttributeList AttributeList} interface, which does not
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
 * contain Namespace support.  In addition to Namespace support, it
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
 * adds the <var>getIndex</var> methods (below).</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
 * <p>The order of attributes in the list is unspecified, and will
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
 * vary from implementation to implementation.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
 * @since SAX 2.0
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
 * @author David Megginson
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
 * @see org.xml.sax.helpers.AttributesImpl
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
 * @see org.xml.sax.ext.DeclHandler#attributeDecl
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
public interface Attributes
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
{
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
    ////////////////////////////////////////////////////////////////////
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
    // Indexed access.
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
    ////////////////////////////////////////////////////////////////////
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
     * Return the number of attributes in the list.
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
     * <p>Once you know the number of attributes, you can iterate
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
     * through the list.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
     * @return The number of attributes in the list.
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
     * @see #getURI(int)
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
     * @see #getLocalName(int)
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
     * @see #getQName(int)
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
     * @see #getType(int)
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
     * @see #getValue(int)
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
    public abstract int getLength ();
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
     * Look up an attribute's Namespace URI by index.
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
     * @param index The attribute index (zero-based).
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
     * @return The Namespace URI, or the empty string if none
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
     *         is available, or null if the index is out of
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
     *         range.
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
     * @see #getLength
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
    public abstract String getURI (int index);
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
     * Look up an attribute's local name by index.
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
     * @param index The attribute index (zero-based).
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
     * @return The local name, or the empty string if Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
     *         processing is not being performed, or null
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
     *         if the index is out of range.
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
     * @see #getLength
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
    public abstract String getLocalName (int index);
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
     * Look up an attribute's XML qualified (prefixed) name by index.
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
     * @param index The attribute index (zero-based).
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
     * @return The XML qualified name, or the empty string
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
     *         if none is available, or null if the index
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
     *         is out of range.
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
     * @see #getLength
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
    public abstract String getQName (int index);
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
     * Look up an attribute's type by index.
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
     * <p>The attribute type is one of the strings "CDATA", "ID",
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
     * or "NOTATION" (always in upper case).</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
     * <p>If the parser has not read a declaration for the attribute,
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
     * or if the parser does not report attribute types, then it must
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
     * return the value "CDATA" as stated in the XML 1.0 Recommendation
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
     * (clause 3.3.3, "Attribute-Value Normalization").</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
     * <p>For an enumerated attribute that is not a notation, the
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
     * parser will report the type as "NMTOKEN".</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
     * @param index The attribute index (zero-based).
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
     * @return The attribute's type as a string, or null if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
     *         index is out of range.
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
     * @see #getLength
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
    public abstract String getType (int index);
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
     * Look up an attribute's value by index.
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
     * <p>If the attribute value is a list of tokens (IDREFS,
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
     * ENTITIES, or NMTOKENS), the tokens will be concatenated
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
     * into a single string with each token separated by a
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
     * single space.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
     * @param index The attribute index (zero-based).
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
     * @return The attribute's value as a string, or null if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
     *         index is out of range.
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
     * @see #getLength
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
    public abstract String getValue (int index);
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
    ////////////////////////////////////////////////////////////////////
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
    // Name-based query.
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
    ////////////////////////////////////////////////////////////////////
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
     * Look up the index of an attribute by Namespace name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
     * @param uri The Namespace URI, or the empty string if
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
     *        the name has no Namespace URI.
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
     * @param localName The attribute's local name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
     * @return The index of the attribute, or -1 if it does not
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
     *         appear in the list.
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
    public int getIndex (String uri, String localName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
     * Look up the index of an attribute by XML qualified (prefixed) name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
     * @param qName The qualified (prefixed) name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
     * @return The index of the attribute, or -1 if it does not
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
     *         appear in the list.
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
    public int getIndex (String qName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
     * Look up an attribute's type by Namespace name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
     * <p>See {@link #getType(int) getType(int)} for a description
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
     * of the possible types.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
     * @param uri The Namespace URI, or the empty String if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
     *        name has no Namespace URI.
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
     * @param localName The local name of the attribute.
7f561c08de6b Initial load
duke
parents:
diff changeset
   230
     * @return The attribute type as a string, or null if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   231
     *         attribute is not in the list or if Namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   232
     *         processing is not being performed.
7f561c08de6b Initial load
duke
parents:
diff changeset
   233
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   234
    public abstract String getType (String uri, String localName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   235
7f561c08de6b Initial load
duke
parents:
diff changeset
   236
7f561c08de6b Initial load
duke
parents:
diff changeset
   237
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   238
     * Look up an attribute's type by XML qualified (prefixed) name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   239
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   240
     * <p>See {@link #getType(int) getType(int)} for a description
7f561c08de6b Initial load
duke
parents:
diff changeset
   241
     * of the possible types.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   242
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   243
     * @param qName The XML qualified name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   244
     * @return The attribute type as a string, or null if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   245
     *         attribute is not in the list or if qualified names
7f561c08de6b Initial load
duke
parents:
diff changeset
   246
     *         are not available.
7f561c08de6b Initial load
duke
parents:
diff changeset
   247
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   248
    public abstract String getType (String qName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   249
7f561c08de6b Initial load
duke
parents:
diff changeset
   250
7f561c08de6b Initial load
duke
parents:
diff changeset
   251
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   252
     * Look up an attribute's value by Namespace name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   253
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   254
     * <p>See {@link #getValue(int) getValue(int)} for a description
7f561c08de6b Initial load
duke
parents:
diff changeset
   255
     * of the possible values.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   256
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   257
     * @param uri The Namespace URI, or the empty String if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   258
     *        name has no Namespace URI.
7f561c08de6b Initial load
duke
parents:
diff changeset
   259
     * @param localName The local name of the attribute.
7f561c08de6b Initial load
duke
parents:
diff changeset
   260
     * @return The attribute value as a string, or null if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   261
     *         attribute is not in the list.
7f561c08de6b Initial load
duke
parents:
diff changeset
   262
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   263
    public abstract String getValue (String uri, String localName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   264
7f561c08de6b Initial load
duke
parents:
diff changeset
   265
7f561c08de6b Initial load
duke
parents:
diff changeset
   266
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   267
     * Look up an attribute's value by XML qualified (prefixed) name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   268
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   269
     * <p>See {@link #getValue(int) getValue(int)} for a description
7f561c08de6b Initial load
duke
parents:
diff changeset
   270
     * of the possible values.</p>
7f561c08de6b Initial load
duke
parents:
diff changeset
   271
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   272
     * @param qName The XML qualified name.
7f561c08de6b Initial load
duke
parents:
diff changeset
   273
     * @return The attribute value as a string, or null if the
7f561c08de6b Initial load
duke
parents:
diff changeset
   274
     *         attribute is not in the list or if qualified names
7f561c08de6b Initial load
duke
parents:
diff changeset
   275
     *         are not available.
7f561c08de6b Initial load
duke
parents:
diff changeset
   276
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   277
    public abstract String getValue (String qName);
7f561c08de6b Initial load
duke
parents:
diff changeset
   278
7f561c08de6b Initial load
duke
parents:
diff changeset
   279
}
7f561c08de6b Initial load
duke
parents:
diff changeset
   280
7f561c08de6b Initial load
duke
parents:
diff changeset
   281
// end of Attributes.java