jdk/src/share/classes/javax/imageio/metadata/IIOMetadataFormat.java
author yan
Fri, 15 Aug 2014 13:02:46 +0400
changeset 26350 3fb50df97199
parent 23010 6dadb192ad81
permissions -rw-r--r--
8054878: javadoc issues in javax.imageio Summary: Fix javadoc missing @exception issues in javax.imageio Reviewed-by: prr Contributed-by: prhinduja@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21278
diff changeset
     2
 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2375
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2375
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2375
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2375
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2375
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.imageio.metadata;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.Locale;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import javax.imageio.ImageTypeSpecifier;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * An object describing the structure of metadata documents returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * from <code>IIOMetadata.getAsTree</code> and passed to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * <code>IIOMetadata.setFromTree</code> and <code>mergeTree</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * Document structures are described by a set of constraints on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * type and number of child elements that may belong to a given parent
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * element type, the names, types, and values of attributes that may
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * belong to an element, and the type and values of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * <code>Object</code> reference that may be stored at a node.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * <p> N.B: classes that implement this interface should contain a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * method declared as <code>public static getInstance()</code> which
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
    43
 * returns an instance of the class.  Commonly, an implementation will
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * construct only a single instance and cache it for future
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * invocations of <code>getInstance</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <p> The structures that may be described by this class are a subset
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * of those expressible using XML document type definitions (DTDs),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * with the addition of some basic information on the datatypes of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * attributes and the ability to store an <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * reference within a node.  In the future, XML Schemas could be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * to represent these structures, and many others.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * <p> The differences between
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * <code>IIOMetadataFormat</code>-described structures and DTDs are as
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * follows:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * <li> Elements may not contain text or mix text with embedded
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * tags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * <li> The children of an element must conform to one of a few simple
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * patterns, described in the documentation for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <code>CHILD_*</code> constants;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * <li> The in-memory representation of an elements may contain a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * reference to an <code>Object</code>.  There is no provision for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * representing such objects textually.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
public interface IIOMetadataFormat {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    // Child policies
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * A constant returned by <code>getChildPolicy</code> to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * that an element may not have any children.  In other words, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * is required to be a leaf node.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    int CHILD_POLICY_EMPTY = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * A constant returned by <code>getChildPolicy</code> to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * that an element must have a single instance of each of its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     * legal child elements, in order.  In DTD terms, the contents of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * the element are defined by a sequence <code>a,b,c,d,...</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    int CHILD_POLICY_ALL = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * A constant returned by <code>getChildPolicy</code> to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * that an element must have zero or one instance of each of its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     * legal child elements, in order.  In DTD terms, the contents of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * the element are defined by a sequence
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * <code>a?,b?,c?,d?,...</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    int CHILD_POLICY_SOME = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * A constant returned by <code>getChildPolicy</code> to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * that an element must have zero or one children, selected from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * among its legal child elements.  In DTD terms, the contents of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * the element are defined by a selection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * <code>a|b|c|d|...</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    int CHILD_POLICY_CHOICE = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * A constant returned by <code>getChildPolicy</code> to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     * that an element must have a sequence of instances of any of its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * legal child elements.  In DTD terms, the contents of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * element are defined by a sequence <code>(a|b|c|d|...)*</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    int CHILD_POLICY_SEQUENCE = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * A constant returned by <code>getChildPolicy</code> to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * that an element must have zero or more instances of its unique
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * legal child element.  In DTD terms, the contents of the element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * are defined by a starred expression <code>a*</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    int CHILD_POLICY_REPEAT = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * The largest valid <code>CHILD_POLICY_*</code> constant,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * to be used for range checks.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    int CHILD_POLICY_MAX = CHILD_POLICY_REPEAT;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     * A constant returned by <code>getObjectValueType</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * indicate the absence of a user object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    int VALUE_NONE = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * or user object may be set a single, arbitrary value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    int VALUE_ARBITRARY = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * or user object may be set a range of values.  Both the minimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * and maximum values of the range are exclusive.  It is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * recommended that ranges of integers be inclusive on both ends,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * and that exclusive ranges be used only for floating-point data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * @see #VALUE_RANGE_MIN_MAX_INCLUSIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    int VALUE_RANGE = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * A value that may be or'ed with <code>VALUE_RANGE</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * obtain <code>VALUE_RANGE_MIN_INCLUSIVE</code>, and with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * <code>VALUE_RANGE_MAX_INCLUSIVE</code> to obtain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * <code>VALUE_RANGE_MIN_MAX_INCLUSIVE</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * <p> Similarly, the value may be and'ed with the value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * <code>getAttributeValueType</code>or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * <code>getObjectValueType</code> to determine if the minimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * value of the range is inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    int VALUE_RANGE_MIN_INCLUSIVE_MASK = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * A value that may be or'ed with <code>VALUE_RANGE</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * obtain <code>VALUE_RANGE_MAX_INCLUSIVE</code>, and with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * <code>VALUE_RANGE_MIN_INCLUSIVE</code> to obtain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * <code>VALUE_RANGE_MIN_MAX_INCLUSIVE</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * <p> Similarly, the value may be and'ed with the value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * <code>getAttributeValueType</code>or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * <code>getObjectValueType</code> to determine if the maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * value of the range is inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
    int VALUE_RANGE_MAX_INCLUSIVE_MASK = 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     * or user object may be set to a range of values.  The minimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * (but not the maximum) value of the range is inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    int VALUE_RANGE_MIN_INCLUSIVE = VALUE_RANGE |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        VALUE_RANGE_MIN_INCLUSIVE_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     * or user object may be set to a range of values.  The maximum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     * (but not the minimum) value of the range is inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    int VALUE_RANGE_MAX_INCLUSIVE = VALUE_RANGE |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        VALUE_RANGE_MAX_INCLUSIVE_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     * or user object may be set a range of values.  Both the minimum
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * and maximum values of the range are inclusive.  It is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * recommended that ranges of integers be inclusive on both ends,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * and that exclusive ranges be used only for floating-point data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    int VALUE_RANGE_MIN_MAX_INCLUSIVE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        VALUE_RANGE |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        VALUE_RANGE_MIN_INCLUSIVE_MASK |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        VALUE_RANGE_MAX_INCLUSIVE_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * or user object may be set one of a number of enumerated values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * In the case of attributes, these values are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     * <code>String</code>s; for objects, they are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * <code>Object</code>s implementing a given class or interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * <p> Attribute values of type <code>DATATYPE_BOOLEAN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * should be marked as enumerations.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    int VALUE_ENUMERATION = 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * A constant returned by <code>getAttributeValueType</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * <code>getObjectValueType</code> to indicate that the attribute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     * or user object may be set to a list or array of values.  In the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * case of attributes, the list will consist of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * whitespace-separated values within a <code>String</code>; for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * objects, an array will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    int VALUE_LIST = 32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * A constant returned by <code>getAttributeDataType</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     * indicating that the value of an attribute is a general Unicode
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     * string.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    int DATATYPE_STRING = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * A constant returned by <code>getAttributeDataType</code>
2375
bb4dd76ca2c9 5082756: Image I/O plug-ins set metadata boolean attributes to "true" or "false"
bae
parents: 2
diff changeset
   245
     * indicating that the value of an attribute is one of the boolean
bb4dd76ca2c9 5082756: Image I/O plug-ins set metadata boolean attributes to "true" or "false"
bae
parents: 2
diff changeset
   246
     * values 'true' or 'false'.
bb4dd76ca2c9 5082756: Image I/O plug-ins set metadata boolean attributes to "true" or "false"
bae
parents: 2
diff changeset
   247
     * Attribute values of type DATATYPE_BOOLEAN should be marked as
bb4dd76ca2c9 5082756: Image I/O plug-ins set metadata boolean attributes to "true" or "false"
bae
parents: 2
diff changeset
   248
     * enumerations, and the permitted values should be the string
bb4dd76ca2c9 5082756: Image I/O plug-ins set metadata boolean attributes to "true" or "false"
bae
parents: 2
diff changeset
   249
     * literal values "TRUE" or "FALSE", although a plugin may also
bb4dd76ca2c9 5082756: Image I/O plug-ins set metadata boolean attributes to "true" or "false"
bae
parents: 2
diff changeset
   250
     * recognise lower or mixed case equivalents.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
    int DATATYPE_BOOLEAN = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     * A constant returned by <code>getAttributeDataType</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * indicating that the value of an attribute is a string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * representation of an integer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    int DATATYPE_INTEGER = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * A constant returned by <code>getAttributeDataType</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * indicating that the value of an attribute is a string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * representation of a decimal floating-point number.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    int DATATYPE_FLOAT = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * A constant returned by <code>getAttributeDataType</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     * indicating that the value of an attribute is a string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     * representation of a double-precision decimal floating-point
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     * number.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
    int DATATYPE_DOUBLE = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    // Root
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
     * Returns the name of the root element of the format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
     * @return a <code>String</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
    String getRootName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    // Multiplicity
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
     * Returns <code>true</code> if the element (and the subtree below
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     * it) is allowed to appear in a metadata document for an image of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     * the given type, defined by an <code>ImageTypeSpecifier</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     * For example, a metadata document format might contain an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * element that describes the primary colors of the image, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * would not be allowed when writing a grayscale image.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * @param imageType an <code>ImageTypeSpecifier</code> indicating
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * the type of the image that will be associated with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     * metadata.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
     * @return <code>true</code> if the node is meaningful for images
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * of the given type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
    boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     * Returns the minimum number of children of the named element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     * with child policy <code>CHILD_POLICY_REPEAT</code>.  For
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     * example, an element representing color primary information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * might be required to have at least 3 children, one for each
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   310
     * primary.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
     * @return an <code>int</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     * @exception IllegalArgumentException if the named element does
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     * not have a child policy of <code>CHILD_POLICY_REPEAT</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
    int getElementMinChildren(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     * Returns the maximum number of children of the named element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
     * with child policy <code>CHILD_POLICY_REPEAT</code>.  For
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * example, an element representing an entry in an 8-bit color
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
     * palette might be allowed to repeat up to 256 times.  A value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     * <code>Integer.MAX_VALUE</code> may be used to specify that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
     * there is no upper bound.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * @return an <code>int</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     * @exception IllegalArgumentException if the named element does
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     * not have a child policy of <code>CHILD_POLICY_REPEAT</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
    int getElementMaxChildren(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
     * Returns a <code>String</code> containing a description of the
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   346
     * named element, or <code>null</code>.  The description will be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
     * localized for the supplied <code>Locale</code> if possible.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
     * <p> If <code>locale</code> is <code>null</code>, the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
     * default <code>Locale</code> returned by <code>Locale.getLocale</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
     * will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
     * @param elementName the name of the element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
     * @param locale the <code>Locale</code> for which localization
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
     * will be attempted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
     * @return the element description.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
     * is <code>null</code>, or is not a legal element name for this format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
    String getElementDescription(String elementName, Locale locale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
    // Children
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     * Returns one of the constants starting with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * <code>CHILD_POLICY_</code>, indicating the legal pattern of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     * children for the named element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
     * @return one of the <code>CHILD_POLICY_*</code> constants.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
    int getChildPolicy(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
     * Returns an array of <code>String</code>s indicating the names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
     * of the element which are allowed to be children of the named
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
     * element, in the order in which they should appear.  If the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
     * element cannot have children, <code>null</code> is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
     * @return an array of <code>String</code>s, or null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
    String[] getChildNames(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
    // Attributes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     * Returns an array of <code>String</code>s listing the names of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
     * the attributes that may be associated with the named element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
     * @return an array of <code>String</code>s.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
    String[] getAttributeNames(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     * Returns one of the constants starting with <code>VALUE_</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     * indicating whether the values of the given attribute within the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
     * named element are arbitrary, constrained to lie within a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     * specified range, constrained to be one of a set of enumerated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
     * values, or are a whitespace-separated list of arbitrary values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
     * @return one of the <code>VALUE_*</code> constants.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
    int getAttributeValueType(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
     * Returns one of the constants starting with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
     * <code>DATATYPE_</code>, indicating the format and
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   437
     * interpretation of the value of the given attribute within the
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   438
     * named element.  If <code>getAttributeValueType</code> returns
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
     * <code>VALUE_LIST</code>, then the legal value is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
     * whitespace-spearated list of values of the returned datatype.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
     * @return one of the <code>DATATYPE_*</code> constants.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
    int getAttributeDataType(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
     * Returns <code>true</code> if the named attribute must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
     * present within the named element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
     *
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   463
     * @return <code>true</code> if the attribute must be present.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
    boolean isAttributeRequired(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
     * Returns the default value of the named attribute, if it is not
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   476
     * explicitly present within the named element, as a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
     * <code>String</code>, or <code>null</code> if no default value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * is available.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
     * @return a <code>String</code> containing the default value, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
     * <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    String getAttributeDefaultValue(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     * Returns an array of <code>String</code>s containing the legal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * enumerated values for the given attribute within the named
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
     * element.  This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
     * <code>getAttributeValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
     * <code>VALUE_ENUMERATION</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
     * @return an array of <code>String</code>s.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
     * @exception IllegalArgumentException if the given attribute is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
     * not defined as an enumeration.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
    String[] getAttributeEnumerations(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
     * Returns the minimum legal value for the attribute.  Whether
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     * this value is inclusive or exclusive may be determined by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
     * value of <code>getAttributeValueType</code>.  The value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
     * returned as a <code>String</code>; its interpretation is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     * dependent on the value of <code>getAttributeDataType</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     * This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     * <code>getAttributeValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     * <code>VALUE_RANGE_*</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     * @return a <code>String</code> containing the smallest legal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * value for the attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     * @exception IllegalArgumentException if the given attribute is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     * not defined as a range.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
    String getAttributeMinValue(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
     * Returns the maximum legal value for the attribute.  Whether
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     * this value is inclusive or exclusive may be determined by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * value of <code>getAttributeValueType</code>.  The value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     * returned as a <code>String</code>; its interpretation is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     * dependent on the value of <code>getAttributeDataType</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     * This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
     * <code>getAttributeValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
     * <code>VALUE_RANGE_*</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
     * @param elementName the name of the element being queried, as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
     * <code>String</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     * @return a <code>String</code> containing the largest legal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     * value for the attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     * @exception IllegalArgumentException if the given attribute is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
     * not defined as a range.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
    String getAttributeMaxValue(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
     * Returns the minimum number of list items that may be used to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
     * define this attribute.  The attribute itself is defined as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     * <code>String</code> containing multiple whitespace-separated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     * items.  This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     * <code>getAttributeValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     * <code>VALUE_LIST</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
     * @return the smallest legal number of list items for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
     * attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
     * @exception IllegalArgumentException if the given attribute is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
     * not defined as a list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
    int getAttributeListMinLength(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
     * Returns the maximum number of list items that may be used to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
     * define this attribute.  A value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
     * <code>Integer.MAX_VALUE</code> may be used to specify that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
     * there is no upper bound.  The attribute itself is defined as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
     * <code>String</code> containing multiple whitespace-separated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
     * items.  This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
     * <code>getAttributeValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     * <code>VALUE_LIST</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
     * @param attrName the name of the attribute being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
     * @return the largest legal number of list items for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
     * attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
     * @exception IllegalArgumentException if the given attribute is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
     * not defined as a list.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
    int getAttributeListMaxLength(String elementName, String attrName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
     * Returns a <code>String</code> containing a description of the
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   627
     * named attribute, or <code>null</code>.  The description will be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     * localized for the supplied <code>Locale</code> if possible.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     * <p> If <code>locale</code> is <code>null</code>, the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     * default <code>Locale</code> returned by <code>Locale.getLocale</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     * will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
     * @param elementName the name of the element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
     * @param attrName the name of the attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
     * @param locale the <code>Locale</code> for which localization
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
     * will be attempted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
     * @return the attribute description.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
     * is <code>null</code>, or is not a legal element name for this format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
     * @exception IllegalArgumentException if <code>attrName</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
     * <code>null</code> or is not a legal attribute name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
     * element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
    String getAttributeDescription(String elementName, String attrName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
                                   Locale locale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
    // Object value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
     * Returns one of the enumerated values starting with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
     * <code>VALUE_</code>, indicating the type of values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
     * (enumeration, range, or array) that are allowed for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
     * <code>Object</code> reference.  If no object value can be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
     * stored within the given element, the result of this method will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
     * be <code>VALUE_NONE</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
     * <p> <code>Object</code> references whose legal values are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
     * defined as a range must implement the <code>Comparable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
     * @return one of the <code>VALUE_*</code> constants.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
     * @see Comparable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
    int getObjectValueType(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
     * Returns the <code>Class</code> type of the <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
     * reference stored within the element.  If this element may not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
     * contain an <code>Object</code> reference, an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
     * <code>IllegalArgumentException</code> will be thrown.  If the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
     * class type is an array, this field indicates the underlying
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
     * class type (<i>e.g</i>, for an array of <code>int</code>s, this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
     * method would return <code>int.class</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
     * <p> <code>Object</code> references whose legal values are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
     * defined as a range must implement the <code>Comparable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
     * interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
     * @return a <code>Class</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
    Class<?> getObjectClass(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
     * Returns an <code>Object</code>s containing the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
     * value for the <code>Object</code> reference within
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
     * the named element.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
     * @return an <code>Object</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
    Object getObjectDefaultValue(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
     * Returns an array of <code>Object</code>s containing the legal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
     * enumerated values for the <code>Object</code> reference within
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
     * the named element.  This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
     * <code>getObjectValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
     * <code>VALUE_ENUMERATION</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
     * <p> The <code>Object</code> associated with a node that accepts
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
   728
     * enumerated values must be equal to one of the values returned by
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
     * this method, as defined by the <code>==</code> operator (as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
     * opposed to the <code>Object.equals</code> method).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
     * @return an array of <code>Object</code>s.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
     * @exception IllegalArgumentException if the <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
     * is not defined as an enumeration.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
    Object[] getObjectEnumerations(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
     * Returns the minimum legal value for the <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
     * reference within the named element.  Whether this value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
     * inclusive or exclusive may be determined by the value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
     * <code>getObjectValueType</code>.  This method should only be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
     * called if <code>getObjectValueType</code> returns one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
     * constants starting with <code>VALUE_RANGE</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
     * @return the smallest legal value for the attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
     * @exception IllegalArgumentException if the <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
     * is not defined as a range.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
    Comparable<?> getObjectMinValue(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
     * Returns the maximum legal value for the <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
     * reference within the named element.  Whether this value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
     * inclusive or exclusive may be determined by the value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
     * <code>getObjectValueType</code>.  This method should only be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
     * called if <code>getObjectValueType</code> returns one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
     * constants starting with <code>VALUE_RANGE</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
     * @return the smallest legal value for the attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
     * @exception IllegalArgumentException if the <code>Object</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
     * is not defined as a range.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
    Comparable<?> getObjectMaxValue(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
     * Returns the minimum number of array elements that may be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
     * to define the <code>Object</code> reference within the named
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
     * element.  This method should only be called if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
     * <code>getObjectValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
     * <code>VALUE_LIST</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
     * @return the smallest valid array length for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
     * <code>Object</code> reference.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
     * @exception IllegalArgumentException if the <code>Object</code> is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
     * an array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
    int getObjectArrayMinLength(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
     * Returns the maximum number of array elements that may be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
     * to define the <code>Object</code> reference within the named
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
     * element.  A value of <code>Integer.MAX_VALUE</code> may be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
     * to specify that there is no upper bound.  This method should
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
     * only be called if <code>getObjectValueType</code> returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
     * <code>VALUE_LIST</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
     * @param elementName the name of the element being queried.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
     * @return the largest valid array length for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
     * <code>Object</code> reference.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
     * @exception IllegalArgumentException if <code>elementName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
     * is <code>null</code> or is not a legal element name for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
     * format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
     * @exception IllegalArgumentException if the named element cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
     * contain an object value (<i>i.e.</i>, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
     * <code>getObjectValueType(elementName) == VALUE_NONE</code>).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
     * @exception IllegalArgumentException if the <code>Object</code> is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
     * an array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
    int getObjectArrayMaxLength(String elementName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
}