Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataFormat.java
38918 views
/*1* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.imageio.metadata;2627import java.util.Locale;28import javax.imageio.ImageTypeSpecifier;2930/**31* An object describing the structure of metadata documents returned32* from <code>IIOMetadata.getAsTree</code> and passed to33* <code>IIOMetadata.setFromTree</code> and <code>mergeTree</code>.34* Document structures are described by a set of constraints on the35* type and number of child elements that may belong to a given parent36* element type, the names, types, and values of attributes that may37* belong to an element, and the type and values of38* <code>Object</code> reference that may be stored at a node.39*40* <p> N.B: classes that implement this interface should contain a41* method declared as <code>public static getInstance()</code> which42* returns an instance of the class. Commonly, an implementation will43* construct only a single instance and cache it for future44* invocations of <code>getInstance</code>.45*46* <p> The structures that may be described by this class are a subset47* of those expressible using XML document type definitions (DTDs),48* with the addition of some basic information on the datatypes of49* attributes and the ability to store an <code>Object</code>50* reference within a node. In the future, XML Schemas could be used51* to represent these structures, and many others.52*53* <p> The differences between54* <code>IIOMetadataFormat</code>-described structures and DTDs are as55* follows:56*57* <ul>58* <li> Elements may not contain text or mix text with embedded59* tags.60*61* <li> The children of an element must conform to one of a few simple62* patterns, described in the documentation for the63* <code>CHILD_*</code> constants;64*65* <li> The in-memory representation of an elements may contain a66* reference to an <code>Object</code>. There is no provision for67* representing such objects textually.68* </ul>69*70*/71public interface IIOMetadataFormat {7273// Child policies7475/**76* A constant returned by <code>getChildPolicy</code> to indicate77* that an element may not have any children. In other words, it78* is required to be a leaf node.79*/80int CHILD_POLICY_EMPTY = 0;8182/**83* A constant returned by <code>getChildPolicy</code> to indicate84* that an element must have a single instance of each of its85* legal child elements, in order. In DTD terms, the contents of86* the element are defined by a sequence <code>a,b,c,d,...</code>.87*/88int CHILD_POLICY_ALL = 1;8990/**91* A constant returned by <code>getChildPolicy</code> to indicate92* that an element must have zero or one instance of each of its93* legal child elements, in order. In DTD terms, the contents of94* the element are defined by a sequence95* <code>a?,b?,c?,d?,...</code>.96*/97int CHILD_POLICY_SOME = 2;9899/**100* A constant returned by <code>getChildPolicy</code> to indicate101* that an element must have zero or one children, selected from102* among its legal child elements. In DTD terms, the contents of103* the element are defined by a selection104* <code>a|b|c|d|...</code>.105*/106int CHILD_POLICY_CHOICE = 3;107108/**109* A constant returned by <code>getChildPolicy</code> to indicate110* that an element must have a sequence of instances of any of its111* legal child elements. In DTD terms, the contents of the112* element are defined by a sequence <code>(a|b|c|d|...)*</code>.113*/114int CHILD_POLICY_SEQUENCE = 4;115116/**117* A constant returned by <code>getChildPolicy</code> to indicate118* that an element must have zero or more instances of its unique119* legal child element. In DTD terms, the contents of the element120* are defined by a starred expression <code>a*</code>.121*/122int CHILD_POLICY_REPEAT = 5;123124/**125* The largest valid <code>CHILD_POLICY_*</code> constant,126* to be used for range checks.127*/128int CHILD_POLICY_MAX = CHILD_POLICY_REPEAT;129130/**131* A constant returned by <code>getObjectValueType</code> to132* indicate the absence of a user object.133*/134int VALUE_NONE = 0;135136/**137* A constant returned by <code>getAttributeValueType</code> and138* <code>getObjectValueType</code> to indicate that the attribute139* or user object may be set a single, arbitrary value.140*/141int VALUE_ARBITRARY = 1;142143/**144* A constant returned by <code>getAttributeValueType</code> and145* <code>getObjectValueType</code> to indicate that the attribute146* or user object may be set a range of values. Both the minimum147* and maximum values of the range are exclusive. It is148* recommended that ranges of integers be inclusive on both ends,149* and that exclusive ranges be used only for floating-point data.150*151* @see #VALUE_RANGE_MIN_MAX_INCLUSIVE152*/153int VALUE_RANGE = 2;154155/**156* A value that may be or'ed with <code>VALUE_RANGE</code> to157* obtain <code>VALUE_RANGE_MIN_INCLUSIVE</code>, and with158* <code>VALUE_RANGE_MAX_INCLUSIVE</code> to obtain159* <code>VALUE_RANGE_MIN_MAX_INCLUSIVE</code>.160*161* <p> Similarly, the value may be and'ed with the value of162* <code>getAttributeValueType</code>or163* <code>getObjectValueType</code> to determine if the minimum164* value of the range is inclusive.165*/166int VALUE_RANGE_MIN_INCLUSIVE_MASK = 4;167168/**169* A value that may be or'ed with <code>VALUE_RANGE</code> to170* obtain <code>VALUE_RANGE_MAX_INCLUSIVE</code>, and with171* <code>VALUE_RANGE_MIN_INCLUSIVE</code> to obtain172* <code>VALUE_RANGE_MIN_MAX_INCLUSIVE</code>.173*174* <p> Similarly, the value may be and'ed with the value of175* <code>getAttributeValueType</code>or176* <code>getObjectValueType</code> to determine if the maximum177* value of the range is inclusive.178*/179int VALUE_RANGE_MAX_INCLUSIVE_MASK = 8;180181/**182* A constant returned by <code>getAttributeValueType</code> and183* <code>getObjectValueType</code> to indicate that the attribute184* or user object may be set to a range of values. The minimum185* (but not the maximum) value of the range is inclusive.186*/187int VALUE_RANGE_MIN_INCLUSIVE = VALUE_RANGE |188VALUE_RANGE_MIN_INCLUSIVE_MASK;189190/**191* A constant returned by <code>getAttributeValueType</code> and192* <code>getObjectValueType</code> to indicate that the attribute193* or user object may be set to a range of values. The maximum194* (but not the minimum) value of the range is inclusive.195*/196int VALUE_RANGE_MAX_INCLUSIVE = VALUE_RANGE |197VALUE_RANGE_MAX_INCLUSIVE_MASK;198199/**200* A constant returned by <code>getAttributeValueType</code> and201* <code>getObjectValueType</code> to indicate that the attribute202* or user object may be set a range of values. Both the minimum203* and maximum values of the range are inclusive. It is204* recommended that ranges of integers be inclusive on both ends,205* and that exclusive ranges be used only for floating-point data.206*/207int VALUE_RANGE_MIN_MAX_INCLUSIVE =208VALUE_RANGE |209VALUE_RANGE_MIN_INCLUSIVE_MASK |210VALUE_RANGE_MAX_INCLUSIVE_MASK;211212/**213* A constant returned by <code>getAttributeValueType</code> and214* <code>getObjectValueType</code> to indicate that the attribute215* or user object may be set one of a number of enumerated values.216* In the case of attributes, these values are217* <code>String</code>s; for objects, they are218* <code>Object</code>s implementing a given class or interface.219*220* <p> Attribute values of type <code>DATATYPE_BOOLEAN</code>221* should be marked as enumerations.222*/223int VALUE_ENUMERATION = 16;224225/**226* A constant returned by <code>getAttributeValueType</code> and227* <code>getObjectValueType</code> to indicate that the attribute228* or user object may be set to a list or array of values. In the229* case of attributes, the list will consist of230* whitespace-separated values within a <code>String</code>; for231* objects, an array will be used.232*/233int VALUE_LIST = 32;234235/**236* A constant returned by <code>getAttributeDataType</code>237* indicating that the value of an attribute is a general Unicode238* string.239*/240int DATATYPE_STRING = 0;241242/**243* A constant returned by <code>getAttributeDataType</code>244* indicating that the value of an attribute is one of the boolean245* values 'true' or 'false'.246* Attribute values of type DATATYPE_BOOLEAN should be marked as247* enumerations, and the permitted values should be the string248* literal values "TRUE" or "FALSE", although a plugin may also249* recognise lower or mixed case equivalents.250*/251int DATATYPE_BOOLEAN = 1;252253/**254* A constant returned by <code>getAttributeDataType</code>255* indicating that the value of an attribute is a string256* representation of an integer.257*/258int DATATYPE_INTEGER = 2;259260/**261* A constant returned by <code>getAttributeDataType</code>262* indicating that the value of an attribute is a string263* representation of a decimal floating-point number.264*/265int DATATYPE_FLOAT = 3;266267/**268* A constant returned by <code>getAttributeDataType</code>269* indicating that the value of an attribute is a string270* representation of a double-precision decimal floating-point271* number.272*/273int DATATYPE_DOUBLE = 4;274275// Root276277/**278* Returns the name of the root element of the format.279*280* @return a <code>String</code>.281*/282String getRootName();283284// Multiplicity285286/**287* Returns <code>true</code> if the element (and the subtree below288* it) is allowed to appear in a metadata document for an image of289* the given type, defined by an <code>ImageTypeSpecifier</code>.290* For example, a metadata document format might contain an291* element that describes the primary colors of the image, which292* would not be allowed when writing a grayscale image.293*294* @param elementName the name of the element being queried.295* @param imageType an <code>ImageTypeSpecifier</code> indicating296* the type of the image that will be associated with the297* metadata.298*299* @return <code>true</code> if the node is meaningful for images300* of the given type.301*/302boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType);303304/**305* Returns the minimum number of children of the named element306* with child policy <code>CHILD_POLICY_REPEAT</code>. For307* example, an element representing color primary information308* might be required to have at least 3 children, one for each309* primary.310*311* @param elementName the name of the element being queried.312*313* @return an <code>int</code>.314*315* @exception IllegalArgumentException if <code>elementName</code>316* is <code>null</code> or is not a legal element name for this317* format.318* @exception IllegalArgumentException if the named element does319* not have a child policy of <code>CHILD_POLICY_REPEAT</code>.320*/321int getElementMinChildren(String elementName);322323/**324* Returns the maximum number of children of the named element325* with child policy <code>CHILD_POLICY_REPEAT</code>. For326* example, an element representing an entry in an 8-bit color327* palette might be allowed to repeat up to 256 times. A value of328* <code>Integer.MAX_VALUE</code> may be used to specify that329* there is no upper bound.330*331* @param elementName the name of the element being queried.332*333* @return an <code>int</code>.334*335* @exception IllegalArgumentException if <code>elementName</code>336* is <code>null</code> or is not a legal element name for this337* format.338* @exception IllegalArgumentException if the named element does339* not have a child policy of <code>CHILD_POLICY_REPEAT</code>.340*/341int getElementMaxChildren(String elementName);342343/**344* Returns a <code>String</code> containing a description of the345* named element, or <code>null</code>. The description will be346* localized for the supplied <code>Locale</code> if possible.347*348* <p> If <code>locale</code> is <code>null</code>, the current349* default <code>Locale</code> returned by <code>Locale.getLocale</code>350* will be used.351*352* @param elementName the name of the element.353* @param locale the <code>Locale</code> for which localization354* will be attempted.355*356* @return the element description.357*358* @exception IllegalArgumentException if <code>elementName</code>359* is <code>null</code>, or is not a legal element name for this format.360*/361String getElementDescription(String elementName, Locale locale);362363// Children364365/**366* Returns one of the constants starting with367* <code>CHILD_POLICY_</code>, indicating the legal pattern of368* children for the named element.369*370* @param elementName the name of the element being queried.371*372* @return one of the <code>CHILD_POLICY_*</code> constants.373*374* @exception IllegalArgumentException if <code>elementName</code>375* is <code>null</code> or is not a legal element name for this376* format.377*/378int getChildPolicy(String elementName);379380/**381* Returns an array of <code>String</code>s indicating the names382* of the element which are allowed to be children of the named383* element, in the order in which they should appear. If the384* element cannot have children, <code>null</code> is returned.385*386* @param elementName the name of the element being queried.387*388* @return an array of <code>String</code>s, or null.389*390* @exception IllegalArgumentException if <code>elementName</code>391* is <code>null</code> or is not a legal element name for this392* format.393*/394String[] getChildNames(String elementName);395396// Attributes397398/**399* Returns an array of <code>String</code>s listing the names of400* the attributes that may be associated with the named element.401*402* @param elementName the name of the element being queried.403*404* @return an array of <code>String</code>s.405*406* @exception IllegalArgumentException if <code>elementName</code>407* is <code>null</code> or is not a legal element name for this408* format.409*/410String[] getAttributeNames(String elementName);411412/**413* Returns one of the constants starting with <code>VALUE_</code>,414* indicating whether the values of the given attribute within the415* named element are arbitrary, constrained to lie within a416* specified range, constrained to be one of a set of enumerated417* values, or are a whitespace-separated list of arbitrary values.418*419* @param elementName the name of the element being queried.420* @param attrName the name of the attribute being queried.421*422* @return one of the <code>VALUE_*</code> constants.423*424* @exception IllegalArgumentException if <code>elementName</code>425* is <code>null</code> or is not a legal element name for this426* format.427* @exception IllegalArgumentException if <code>attrName</code> is428* <code>null</code> or is not a legal attribute name for this429* element.430*/431int getAttributeValueType(String elementName, String attrName);432433/**434* Returns one of the constants starting with435* <code>DATATYPE_</code>, indicating the format and436* interpretation of the value of the given attribute within the437* named element. If <code>getAttributeValueType</code> returns438* <code>VALUE_LIST</code>, then the legal value is a439* whitespace-spearated list of values of the returned datatype.440*441* @param elementName the name of the element being queried.442* @param attrName the name of the attribute being queried.443*444* @return one of the <code>DATATYPE_*</code> constants.445*446* @exception IllegalArgumentException if <code>elementName</code>447* is <code>null</code> or is not a legal element name for this448* format.449* @exception IllegalArgumentException if <code>attrName</code> is450* <code>null</code> or is not a legal attribute name for this451* element.452*/453int getAttributeDataType(String elementName, String attrName);454455/**456* Returns <code>true</code> if the named attribute must be457* present within the named element.458*459* @param elementName the name of the element being queried.460* @param attrName the name of the attribute being queried.461*462* @return <code>true</code> if the attribute must be present.463*464* @exception IllegalArgumentException if <code>elementName</code>465* is <code>null</code> or is not a legal element name for this466* format.467* @exception IllegalArgumentException if <code>attrName</code> is468* <code>null</code> or is not a legal attribute name for this469* element.470*/471boolean isAttributeRequired(String elementName, String attrName);472473/**474* Returns the default value of the named attribute, if it is not475* explicitly present within the named element, as a476* <code>String</code>, or <code>null</code> if no default value477* is available.478*479* @param elementName the name of the element being queried.480* @param attrName the name of the attribute being queried.481*482* @return a <code>String</code> containing the default value, or483* <code>null</code>.484*485* @exception IllegalArgumentException if <code>elementName</code>486* is <code>null</code> or is not a legal element name for this487* format.488* @exception IllegalArgumentException if <code>attrName</code> is489* <code>null</code> or is not a legal attribute name for this490* element.491*/492String getAttributeDefaultValue(String elementName, String attrName);493494/**495* Returns an array of <code>String</code>s containing the legal496* enumerated values for the given attribute within the named497* element. This method should only be called if498* <code>getAttributeValueType</code> returns499* <code>VALUE_ENUMERATION</code>.500*501* @param elementName the name of the element being queried.502* @param attrName the name of the attribute being queried.503*504* @return an array of <code>String</code>s.505*506* @exception IllegalArgumentException if <code>elementName</code>507* is <code>null</code> or is not a legal element name for this508* format.509* @exception IllegalArgumentException if <code>attrName</code> is510* <code>null</code> or is not a legal attribute name for this511* element.512* @exception IllegalArgumentException if the given attribute is513* not defined as an enumeration.514*/515String[] getAttributeEnumerations(String elementName, String attrName);516517/**518* Returns the minimum legal value for the attribute. Whether519* this value is inclusive or exclusive may be determined by the520* value of <code>getAttributeValueType</code>. The value is521* returned as a <code>String</code>; its interpretation is522* dependent on the value of <code>getAttributeDataType</code>.523* This method should only be called if524* <code>getAttributeValueType</code> returns525* <code>VALUE_RANGE_*</code>.526*527* @param elementName the name of the element being queried.528* @param attrName the name of the attribute being queried.529*530* @return a <code>String</code> containing the smallest legal531* value for the attribute.532*533* @exception IllegalArgumentException if <code>elementName</code>534* is <code>null</code> or is not a legal element name for this535* format.536* @exception IllegalArgumentException if <code>attrName</code> is537* <code>null</code> or is not a legal attribute name for this538* element.539* @exception IllegalArgumentException if the given attribute is540* not defined as a range.541*/542String getAttributeMinValue(String elementName, String attrName);543544/**545* Returns the maximum legal value for the attribute. Whether546* this value is inclusive or exclusive may be determined by the547* value of <code>getAttributeValueType</code>. The value is548* returned as a <code>String</code>; its interpretation is549* dependent on the value of <code>getAttributeDataType</code>.550* This method should only be called if551* <code>getAttributeValueType</code> returns552* <code>VALUE_RANGE_*</code>.553*554* @param elementName the name of the element being queried, as a555* <code>String</code>.556* @param attrName the name of the attribute being queried.557*558* @return a <code>String</code> containing the largest legal559* value for the attribute.560*561* @exception IllegalArgumentException if <code>elementName</code>562* is <code>null</code> or is not a legal element name for this563* format.564* @exception IllegalArgumentException if <code>attrName</code> is565* <code>null</code> or is not a legal attribute name for this566* element.567* @exception IllegalArgumentException if the given attribute is568* not defined as a range.569*/570String getAttributeMaxValue(String elementName, String attrName);571572/**573* Returns the minimum number of list items that may be used to574* define this attribute. The attribute itself is defined as a575* <code>String</code> containing multiple whitespace-separated576* items. This method should only be called if577* <code>getAttributeValueType</code> returns578* <code>VALUE_LIST</code>.579*580* @param elementName the name of the element being queried.581* @param attrName the name of the attribute being queried.582*583* @return the smallest legal number of list items for the584* attribute.585*586* @exception IllegalArgumentException if <code>elementName</code>587* is <code>null</code> or is not a legal element name for this588* format.589* @exception IllegalArgumentException if <code>attrName</code> is590* <code>null</code> or is not a legal attribute name for this591* element.592* @exception IllegalArgumentException if the given attribute is593* not defined as a list.594*/595int getAttributeListMinLength(String elementName, String attrName);596597/**598* Returns the maximum number of list items that may be used to599* define this attribute. A value of600* <code>Integer.MAX_VALUE</code> may be used to specify that601* there is no upper bound. The attribute itself is defined as a602* <code>String</code> containing multiple whitespace-separated603* items. This method should only be called if604* <code>getAttributeValueType</code> returns605* <code>VALUE_LIST</code>.606*607* @param elementName the name of the element being queried.608* @param attrName the name of the attribute being queried.609*610* @return the largest legal number of list items for the611* attribute.612*613* @exception IllegalArgumentException if <code>elementName</code>614* is <code>null</code> or is not a legal element name for this615* format.616* @exception IllegalArgumentException if <code>attrName</code> is617* <code>null</code> or is not a legal attribute name for this618* element.619* @exception IllegalArgumentException if the given attribute is620* not defined as a list.621*/622int getAttributeListMaxLength(String elementName, String attrName);623624/**625* Returns a <code>String</code> containing a description of the626* named attribute, or <code>null</code>. The description will be627* localized for the supplied <code>Locale</code> if possible.628*629* <p> If <code>locale</code> is <code>null</code>, the current630* default <code>Locale</code> returned by <code>Locale.getLocale</code>631* will be used.632*633* @param elementName the name of the element.634* @param attrName the name of the attribute.635* @param locale the <code>Locale</code> for which localization636* will be attempted.637*638* @return the attribute description.639*640* @exception IllegalArgumentException if <code>elementName</code>641* is <code>null</code>, or is not a legal element name for this format.642* @exception IllegalArgumentException if <code>attrName</code> is643* <code>null</code> or is not a legal attribute name for this644* element.645*/646String getAttributeDescription(String elementName, String attrName,647Locale locale);648649// Object value650651/**652* Returns one of the enumerated values starting with653* <code>VALUE_</code>, indicating the type of values654* (enumeration, range, or array) that are allowed for the655* <code>Object</code> reference. If no object value can be656* stored within the given element, the result of this method will657* be <code>VALUE_NONE</code>.658*659* <p> <code>Object</code> references whose legal values are660* defined as a range must implement the <code>Comparable</code>661* interface.662*663* @param elementName the name of the element being queried.664*665* @return one of the <code>VALUE_*</code> constants.666*667* @exception IllegalArgumentException if <code>elementName</code>668* is <code>null</code> or is not a legal element name for this669* format.670*671* @see Comparable672*/673int getObjectValueType(String elementName);674675/**676* Returns the <code>Class</code> type of the <code>Object</code>677* reference stored within the element. If this element may not678* contain an <code>Object</code> reference, an679* <code>IllegalArgumentException</code> will be thrown. If the680* class type is an array, this field indicates the underlying681* class type (<i>e.g</i>, for an array of <code>int</code>s, this682* method would return <code>int.class</code>).683*684* <p> <code>Object</code> references whose legal values are685* defined as a range must implement the <code>Comparable</code>686* interface.687*688* @param elementName the name of the element being queried.689*690* @return a <code>Class</code> object.691*692* @exception IllegalArgumentException if <code>elementName</code>693* is <code>null</code> or is not a legal element name for this694* format.695* @exception IllegalArgumentException if the named element cannot696* contain an object value (<i>i.e.</i>, if697* <code>getObjectValueType(elementName) == VALUE_NONE</code>).698*/699Class<?> getObjectClass(String elementName);700701/**702* Returns an <code>Object</code>s containing the default703* value for the <code>Object</code> reference within704* the named element.705*706* @param elementName the name of the element being queried.707*708* @return an <code>Object</code>.709*710* @exception IllegalArgumentException if <code>elementName</code>711* is <code>null</code> or is not a legal element name for this712* format.713* @exception IllegalArgumentException if the named element cannot714* contain an object value (<i>i.e.</i>, if715* <code>getObjectValueType(elementName) == VALUE_NONE</code>).716*/717Object getObjectDefaultValue(String elementName);718719/**720* Returns an array of <code>Object</code>s containing the legal721* enumerated values for the <code>Object</code> reference within722* the named element. This method should only be called if723* <code>getObjectValueType</code> returns724* <code>VALUE_ENUMERATION</code>.725*726* <p> The <code>Object</code> associated with a node that accepts727* enumerated values must be equal to one of the values returned by728* this method, as defined by the <code>==</code> operator (as729* opposed to the <code>Object.equals</code> method).730*731* @param elementName the name of the element being queried.732*733* @return an array of <code>Object</code>s.734*735* @exception IllegalArgumentException if <code>elementName</code>736* is <code>null</code> or is not a legal element name for this737* format.738* @exception IllegalArgumentException if the named element cannot739* contain an object value (<i>i.e.</i>, if740* <code>getObjectValueType(elementName) == VALUE_NONE</code>).741* @exception IllegalArgumentException if the <code>Object</code>742* is not defined as an enumeration.743*/744Object[] getObjectEnumerations(String elementName);745746/**747* Returns the minimum legal value for the <code>Object</code>748* reference within the named element. Whether this value is749* inclusive or exclusive may be determined by the value of750* <code>getObjectValueType</code>. This method should only be751* called if <code>getObjectValueType</code> returns one of the752* constants starting with <code>VALUE_RANGE</code>.753*754* @param elementName the name of the element being queried.755*756* @return the smallest legal value for the attribute.757*758* @exception IllegalArgumentException if <code>elementName</code>759* is <code>null</code> or is not a legal element name for this760* format.761* @exception IllegalArgumentException if the named element cannot762* contain an object value (<i>i.e.</i>, if763* <code>getObjectValueType(elementName) == VALUE_NONE</code>).764* @exception IllegalArgumentException if the <code>Object</code>765* is not defined as a range.766*/767Comparable<?> getObjectMinValue(String elementName);768769/**770* Returns the maximum legal value for the <code>Object</code>771* reference within the named element. Whether this value is772* inclusive or exclusive may be determined by the value of773* <code>getObjectValueType</code>. This method should only be774* called if <code>getObjectValueType</code> returns one of the775* constants starting with <code>VALUE_RANGE</code>.776*777* @return the smallest legal value for the attribute.778*779* @param elementName the name of the element being queried.780*781* @exception IllegalArgumentException if <code>elementName</code>782* is <code>null</code> or is not a legal element name for this783* format.784* @exception IllegalArgumentException if the named element cannot785* contain an object value (<i>i.e.</i>, if786* <code>getObjectValueType(elementName) == VALUE_NONE</code>).787* @exception IllegalArgumentException if the <code>Object</code>788* is not defined as a range.789*/790Comparable<?> getObjectMaxValue(String elementName);791792/**793* Returns the minimum number of array elements that may be used794* to define the <code>Object</code> reference within the named795* element. This method should only be called if796* <code>getObjectValueType</code> returns797* <code>VALUE_LIST</code>.798*799* @param elementName the name of the element being queried.800*801* @return the smallest valid array length for the802* <code>Object</code> reference.803*804* @exception IllegalArgumentException if <code>elementName</code>805* is <code>null</code> or is not a legal element name for this806* format.807* @exception IllegalArgumentException if the named element cannot808* contain an object value (<i>i.e.</i>, if809* <code>getObjectValueType(elementName) == VALUE_NONE</code>).810* @exception IllegalArgumentException if the <code>Object</code> is not811* an array.812*/813int getObjectArrayMinLength(String elementName);814815/**816* Returns the maximum number of array elements that may be used817* to define the <code>Object</code> reference within the named818* element. A value of <code>Integer.MAX_VALUE</code> may be used819* to specify that there is no upper bound. This method should820* only be called if <code>getObjectValueType</code> returns821* <code>VALUE_LIST</code>.822*823* @param elementName the name of the element being queried.824*825* @return the largest valid array length for the826* <code>Object</code> reference.827*828* @exception IllegalArgumentException if <code>elementName</code>829* is <code>null</code> or is not a legal element name for this830* format.831* @exception IllegalArgumentException if the named element cannot832* contain an object value (<i>i.e.</i>, if833* <code>getObjectValueType(elementName) == VALUE_NONE</code>).834* @exception IllegalArgumentException if the <code>Object</code> is not835* an array.836*/837int getObjectArrayMaxLength(String elementName);838}839840841