Path: blob/master/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormat.java
41153 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} and passed to33* {@code IIOMetadata.setFromTree} and {@code mergeTree}.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} 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()} 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}.45* <p> In the event that the plugin is provided as part of a named module,46* that module must export the package containing the implementation class47* to the <pre>java.desktop</pre> module via a qualified export.48* An unqualified export is not recommended unless also needed for49* some other reason. Failing to export the package will result in50* access failure at runtime.51*52* <p> The structures that may be described by this class are a subset53* of those expressible using XML document type definitions (DTDs),54* with the addition of some basic information on the datatypes of55* attributes and the ability to store an {@code Object}56* reference within a node. In the future, XML Schemas could be used57* to represent these structures, and many others.58*59* <p> The differences between60* {@code IIOMetadataFormat}-described structures and DTDs are as61* follows:62*63* <ul>64* <li> Elements may not contain text or mix text with embedded65* tags.66*67* <li> The children of an element must conform to one of a few simple68* patterns, described in the documentation for the69* {@code CHILD_*} constants;70*71* <li> The in-memory representation of an elements may contain a72* reference to an {@code Object}. There is no provision for73* representing such objects textually.74* </ul>75*76*/77public interface IIOMetadataFormat {7879// Child policies8081/**82* A constant returned by {@code getChildPolicy} to indicate83* that an element may not have any children. In other words, it84* is required to be a leaf node.85*/86int CHILD_POLICY_EMPTY = 0;8788/**89* A constant returned by {@code getChildPolicy} to indicate90* that an element must have a single instance of each of its91* legal child elements, in order. In DTD terms, the contents of92* the element are defined by a sequence {@code a,b,c,d,...}.93*/94int CHILD_POLICY_ALL = 1;9596/**97* A constant returned by {@code getChildPolicy} to indicate98* that an element must have zero or one instance of each of its99* legal child elements, in order. In DTD terms, the contents of100* the element are defined by a sequence101* {@code a?,b?,c?,d?,...}.102*/103int CHILD_POLICY_SOME = 2;104105/**106* A constant returned by {@code getChildPolicy} to indicate107* that an element must have zero or one children, selected from108* among its legal child elements. In DTD terms, the contents of109* the element are defined by a selection110* {@code a|b|c|d|...}.111*/112int CHILD_POLICY_CHOICE = 3;113114/**115* A constant returned by {@code getChildPolicy} to indicate116* that an element must have a sequence of instances of any of its117* legal child elements. In DTD terms, the contents of the118* element are defined by a sequence {@code (a|b|c|d|...)*}.119*/120int CHILD_POLICY_SEQUENCE = 4;121122/**123* A constant returned by {@code getChildPolicy} to indicate124* that an element must have zero or more instances of its unique125* legal child element. In DTD terms, the contents of the element126* are defined by a starred expression {@code a*}.127*/128int CHILD_POLICY_REPEAT = 5;129130/**131* The largest valid {@code CHILD_POLICY_*} constant,132* to be used for range checks.133*/134int CHILD_POLICY_MAX = CHILD_POLICY_REPEAT;135136/**137* A constant returned by {@code getObjectValueType} to138* indicate the absence of a user object.139*/140int VALUE_NONE = 0;141142/**143* A constant returned by {@code getAttributeValueType} and144* {@code getObjectValueType} to indicate that the attribute145* or user object may be set a single, arbitrary value.146*/147int VALUE_ARBITRARY = 1;148149/**150* A constant returned by {@code getAttributeValueType} and151* {@code getObjectValueType} to indicate that the attribute152* or user object may be set a range of values. Both the minimum153* and maximum values of the range are exclusive. It is154* recommended that ranges of integers be inclusive on both ends,155* and that exclusive ranges be used only for floating-point data.156*157* @see #VALUE_RANGE_MIN_MAX_INCLUSIVE158*/159int VALUE_RANGE = 2;160161/**162* A value that may be or'ed with {@code VALUE_RANGE} to163* obtain {@code VALUE_RANGE_MIN_INCLUSIVE}, and with164* {@code VALUE_RANGE_MAX_INCLUSIVE} to obtain165* {@code VALUE_RANGE_MIN_MAX_INCLUSIVE}.166*167* <p> Similarly, the value may be and'ed with the value of168* {@code getAttributeValueType} or169* {@code getObjectValueType} to determine if the minimum170* value of the range is inclusive.171*/172int VALUE_RANGE_MIN_INCLUSIVE_MASK = 4;173174/**175* A value that may be or'ed with {@code VALUE_RANGE} to176* obtain {@code VALUE_RANGE_MAX_INCLUSIVE}, and with177* {@code VALUE_RANGE_MIN_INCLUSIVE} to obtain178* {@code VALUE_RANGE_MIN_MAX_INCLUSIVE}.179*180* <p> Similarly, the value may be and'ed with the value of181* {@code getAttributeValueType} or182* {@code getObjectValueType} to determine if the maximum183* value of the range is inclusive.184*/185int VALUE_RANGE_MAX_INCLUSIVE_MASK = 8;186187/**188* A constant returned by {@code getAttributeValueType} and189* {@code getObjectValueType} to indicate that the attribute190* or user object may be set to a range of values. The minimum191* (but not the maximum) value of the range is inclusive.192*/193int VALUE_RANGE_MIN_INCLUSIVE = VALUE_RANGE |194VALUE_RANGE_MIN_INCLUSIVE_MASK;195196/**197* A constant returned by {@code getAttributeValueType} and198* {@code getObjectValueType} to indicate that the attribute199* or user object may be set to a range of values. The maximum200* (but not the minimum) value of the range is inclusive.201*/202int VALUE_RANGE_MAX_INCLUSIVE = VALUE_RANGE |203VALUE_RANGE_MAX_INCLUSIVE_MASK;204205/**206* A constant returned by {@code getAttributeValueType} and207* {@code getObjectValueType} to indicate that the attribute208* or user object may be set a range of values. Both the minimum209* and maximum values of the range are inclusive. It is210* recommended that ranges of integers be inclusive on both ends,211* and that exclusive ranges be used only for floating-point data.212*/213int VALUE_RANGE_MIN_MAX_INCLUSIVE =214VALUE_RANGE |215VALUE_RANGE_MIN_INCLUSIVE_MASK |216VALUE_RANGE_MAX_INCLUSIVE_MASK;217218/**219* A constant returned by {@code getAttributeValueType} and220* {@code getObjectValueType} to indicate that the attribute221* or user object may be set one of a number of enumerated values.222* In the case of attributes, these values are223* {@code String}s; for objects, they are224* {@code Object}s implementing a given class or interface.225*226* <p> Attribute values of type {@code DATATYPE_BOOLEAN}227* should be marked as enumerations.228*/229int VALUE_ENUMERATION = 16;230231/**232* A constant returned by {@code getAttributeValueType} and233* {@code getObjectValueType} to indicate that the attribute234* or user object may be set to a list or array of values. In the235* case of attributes, the list will consist of236* whitespace-separated values within a {@code String}; for237* objects, an array will be used.238*/239int VALUE_LIST = 32;240241/**242* A constant returned by {@code getAttributeDataType}243* indicating that the value of an attribute is a general Unicode244* string.245*/246int DATATYPE_STRING = 0;247248/**249* A constant returned by {@code getAttributeDataType}250* indicating that the value of an attribute is one of the boolean251* values 'true' or 'false'.252* Attribute values of type DATATYPE_BOOLEAN should be marked as253* enumerations, and the permitted values should be the string254* literal values "TRUE" or "FALSE", although a plugin may also255* recognise lower or mixed case equivalents.256*/257int DATATYPE_BOOLEAN = 1;258259/**260* A constant returned by {@code getAttributeDataType}261* indicating that the value of an attribute is a string262* representation of an integer.263*/264int DATATYPE_INTEGER = 2;265266/**267* A constant returned by {@code getAttributeDataType}268* indicating that the value of an attribute is a string269* representation of a decimal floating-point number.270*/271int DATATYPE_FLOAT = 3;272273/**274* A constant returned by {@code getAttributeDataType}275* indicating that the value of an attribute is a string276* representation of a double-precision decimal floating-point277* number.278*/279int DATATYPE_DOUBLE = 4;280281// Root282283/**284* Returns the name of the root element of the format.285*286* @return a {@code String}.287*/288String getRootName();289290// Multiplicity291292/**293* Returns {@code true} if the element (and the subtree below294* it) is allowed to appear in a metadata document for an image of295* the given type, defined by an {@code ImageTypeSpecifier}.296* For example, a metadata document format might contain an297* element that describes the primary colors of the image, which298* would not be allowed when writing a grayscale image.299*300* @param elementName the name of the element being queried.301* @param imageType an {@code ImageTypeSpecifier} indicating302* the type of the image that will be associated with the303* metadata.304*305* @return {@code true} if the node is meaningful for images306* of the given type.307*/308boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType);309310/**311* Returns the minimum number of children of the named element312* with child policy {@code CHILD_POLICY_REPEAT}. For313* example, an element representing color primary information314* might be required to have at least 3 children, one for each315* primary.316*317* @param elementName the name of the element being queried.318*319* @return an {@code int}.320*321* @exception IllegalArgumentException if {@code elementName}322* is {@code null} or is not a legal element name for this323* format.324* @exception IllegalArgumentException if the named element does325* not have a child policy of {@code CHILD_POLICY_REPEAT}.326*/327int getElementMinChildren(String elementName);328329/**330* Returns the maximum number of children of the named element331* with child policy {@code CHILD_POLICY_REPEAT}. For332* example, an element representing an entry in an 8-bit color333* palette might be allowed to repeat up to 256 times. A value of334* {@code Integer.MAX_VALUE} may be used to specify that335* there is no upper bound.336*337* @param elementName the name of the element being queried.338*339* @return an {@code int}.340*341* @exception IllegalArgumentException if {@code elementName}342* is {@code null} or is not a legal element name for this343* format.344* @exception IllegalArgumentException if the named element does345* not have a child policy of {@code CHILD_POLICY_REPEAT}.346*/347int getElementMaxChildren(String elementName);348349/**350* Returns a {@code String} containing a description of the351* named element, or {@code null}. The description will be352* localized for the supplied {@code Locale} if possible.353*354* <p> If {@code locale} is {@code null}, the current355* default {@code Locale} returned by {@code Locale.getLocale}356* will be used.357*358* @param elementName the name of the element.359* @param locale the {@code Locale} for which localization360* will be attempted.361*362* @return the element description.363*364* @exception IllegalArgumentException if {@code elementName}365* is {@code null}, or is not a legal element name for this format.366*/367String getElementDescription(String elementName, Locale locale);368369// Children370371/**372* Returns one of the constants starting with373* {@code CHILD_POLICY_}, indicating the legal pattern of374* children for the named element.375*376* @param elementName the name of the element being queried.377*378* @return one of the {@code CHILD_POLICY_*} constants.379*380* @exception IllegalArgumentException if {@code elementName}381* is {@code null} or is not a legal element name for this382* format.383*/384int getChildPolicy(String elementName);385386/**387* Returns an array of {@code String}s indicating the names388* of the element which are allowed to be children of the named389* element, in the order in which they should appear. If the390* element cannot have children, {@code null} is returned.391*392* @param elementName the name of the element being queried.393*394* @return an array of {@code String}s, or null.395*396* @exception IllegalArgumentException if {@code elementName}397* is {@code null} or is not a legal element name for this398* format.399*/400String[] getChildNames(String elementName);401402// Attributes403404/**405* Returns an array of {@code String}s listing the names of406* the attributes that may be associated with the named element.407*408* @param elementName the name of the element being queried.409*410* @return an array of {@code String}s.411*412* @exception IllegalArgumentException if {@code elementName}413* is {@code null} or is not a legal element name for this414* format.415*/416String[] getAttributeNames(String elementName);417418/**419* Returns one of the constants starting with {@code VALUE_},420* indicating whether the values of the given attribute within the421* named element are arbitrary, constrained to lie within a422* specified range, constrained to be one of a set of enumerated423* values, or are a whitespace-separated list of arbitrary values.424*425* @param elementName the name of the element being queried.426* @param attrName the name of the attribute being queried.427*428* @return one of the {@code VALUE_*} constants.429*430* @exception IllegalArgumentException if {@code elementName}431* is {@code null} or is not a legal element name for this432* format.433* @exception IllegalArgumentException if {@code attrName} is434* {@code null} or is not a legal attribute name for this435* element.436*/437int getAttributeValueType(String elementName, String attrName);438439/**440* Returns one of the constants starting with441* {@code DATATYPE_}, indicating the format and442* interpretation of the value of the given attribute within the443* named element. If {@code getAttributeValueType} returns444* {@code VALUE_LIST}, then the legal value is a445* whitespace-spearated list of values of the returned datatype.446*447* @param elementName the name of the element being queried.448* @param attrName the name of the attribute being queried.449*450* @return one of the {@code DATATYPE_*} constants.451*452* @exception IllegalArgumentException if {@code elementName}453* is {@code null} or is not a legal element name for this454* format.455* @exception IllegalArgumentException if {@code attrName} is456* {@code null} or is not a legal attribute name for this457* element.458*/459int getAttributeDataType(String elementName, String attrName);460461/**462* Returns {@code true} if the named attribute must be463* present within the named element.464*465* @param elementName the name of the element being queried.466* @param attrName the name of the attribute being queried.467*468* @return {@code true} if the attribute must be present.469*470* @exception IllegalArgumentException if {@code elementName}471* is {@code null} or is not a legal element name for this472* format.473* @exception IllegalArgumentException if {@code attrName} is474* {@code null} or is not a legal attribute name for this475* element.476*/477boolean isAttributeRequired(String elementName, String attrName);478479/**480* Returns the default value of the named attribute, if it is not481* explicitly present within the named element, as a482* {@code String}, or {@code null} if no default value483* is available.484*485* @param elementName the name of the element being queried.486* @param attrName the name of the attribute being queried.487*488* @return a {@code String} containing the default value, or489* {@code null}.490*491* @exception IllegalArgumentException if {@code elementName}492* is {@code null} or is not a legal element name for this493* format.494* @exception IllegalArgumentException if {@code attrName} is495* {@code null} or is not a legal attribute name for this496* element.497*/498String getAttributeDefaultValue(String elementName, String attrName);499500/**501* Returns an array of {@code String}s containing the legal502* enumerated values for the given attribute within the named503* element. This method should only be called if504* {@code getAttributeValueType} returns505* {@code VALUE_ENUMERATION}.506*507* @param elementName the name of the element being queried.508* @param attrName the name of the attribute being queried.509*510* @return an array of {@code String}s.511*512* @exception IllegalArgumentException if {@code elementName}513* is {@code null} or is not a legal element name for this514* format.515* @exception IllegalArgumentException if {@code attrName} is516* {@code null} or is not a legal attribute name for this517* element.518* @exception IllegalArgumentException if the given attribute is519* not defined as an enumeration.520*/521String[] getAttributeEnumerations(String elementName, String attrName);522523/**524* Returns the minimum legal value for the attribute. Whether525* this value is inclusive or exclusive may be determined by the526* value of {@code getAttributeValueType}. The value is527* returned as a {@code String}; its interpretation is528* dependent on the value of {@code getAttributeDataType}.529* This method should only be called if530* {@code getAttributeValueType} returns531* {@code VALUE_RANGE_*}.532*533* @param elementName the name of the element being queried.534* @param attrName the name of the attribute being queried.535*536* @return a {@code String} containing the smallest legal537* value for the attribute.538*539* @exception IllegalArgumentException if {@code elementName}540* is {@code null} or is not a legal element name for this541* format.542* @exception IllegalArgumentException if {@code attrName} is543* {@code null} or is not a legal attribute name for this544* element.545* @exception IllegalArgumentException if the given attribute is546* not defined as a range.547*/548String getAttributeMinValue(String elementName, String attrName);549550/**551* Returns the maximum legal value for the attribute. Whether552* this value is inclusive or exclusive may be determined by the553* value of {@code getAttributeValueType}. The value is554* returned as a {@code String}; its interpretation is555* dependent on the value of {@code getAttributeDataType}.556* This method should only be called if557* {@code getAttributeValueType} returns558* {@code VALUE_RANGE_*}.559*560* @param elementName the name of the element being queried, as a561* {@code String}.562* @param attrName the name of the attribute being queried.563*564* @return a {@code String} containing the largest legal565* value for the attribute.566*567* @exception IllegalArgumentException if {@code elementName}568* is {@code null} or is not a legal element name for this569* format.570* @exception IllegalArgumentException if {@code attrName} is571* {@code null} or is not a legal attribute name for this572* element.573* @exception IllegalArgumentException if the given attribute is574* not defined as a range.575*/576String getAttributeMaxValue(String elementName, String attrName);577578/**579* Returns the minimum number of list items that may be used to580* define this attribute. The attribute itself is defined as a581* {@code String} containing multiple whitespace-separated582* items. This method should only be called if583* {@code getAttributeValueType} returns584* {@code VALUE_LIST}.585*586* @param elementName the name of the element being queried.587* @param attrName the name of the attribute being queried.588*589* @return the smallest legal number of list items for the590* attribute.591*592* @exception IllegalArgumentException if {@code elementName}593* is {@code null} or is not a legal element name for this594* format.595* @exception IllegalArgumentException if {@code attrName} is596* {@code null} or is not a legal attribute name for this597* element.598* @exception IllegalArgumentException if the given attribute is599* not defined as a list.600*/601int getAttributeListMinLength(String elementName, String attrName);602603/**604* Returns the maximum number of list items that may be used to605* define this attribute. A value of606* {@code Integer.MAX_VALUE} may be used to specify that607* there is no upper bound. The attribute itself is defined as a608* {@code String} containing multiple whitespace-separated609* items. This method should only be called if610* {@code getAttributeValueType} returns611* {@code VALUE_LIST}.612*613* @param elementName the name of the element being queried.614* @param attrName the name of the attribute being queried.615*616* @return the largest legal number of list items for the617* attribute.618*619* @exception IllegalArgumentException if {@code elementName}620* is {@code null} or is not a legal element name for this621* format.622* @exception IllegalArgumentException if {@code attrName} is623* {@code null} or is not a legal attribute name for this624* element.625* @exception IllegalArgumentException if the given attribute is626* not defined as a list.627*/628int getAttributeListMaxLength(String elementName, String attrName);629630/**631* Returns a {@code String} containing a description of the632* named attribute, or {@code null}. The description will be633* localized for the supplied {@code Locale} if possible.634*635* <p> If {@code locale} is {@code null}, the current636* default {@code Locale} returned by {@code Locale.getLocale}637* will be used.638*639* @param elementName the name of the element.640* @param attrName the name of the attribute.641* @param locale the {@code Locale} for which localization642* will be attempted.643*644* @return the attribute description.645*646* @exception IllegalArgumentException if {@code elementName}647* is {@code null}, or is not a legal element name for this format.648* @exception IllegalArgumentException if {@code attrName} is649* {@code null} or is not a legal attribute name for this650* element.651*/652String getAttributeDescription(String elementName, String attrName,653Locale locale);654655// Object value656657/**658* Returns one of the enumerated values starting with659* {@code VALUE_}, indicating the type of values660* (enumeration, range, or array) that are allowed for the661* {@code Object} reference. If no object value can be662* stored within the given element, the result of this method will663* be {@code VALUE_NONE}.664*665* <p> {@code Object} references whose legal values are666* defined as a range must implement the {@code Comparable}667* interface.668*669* @param elementName the name of the element being queried.670*671* @return one of the {@code VALUE_*} constants.672*673* @exception IllegalArgumentException if {@code elementName}674* is {@code null} or is not a legal element name for this675* format.676*677* @see Comparable678*/679int getObjectValueType(String elementName);680681/**682* Returns the {@code Class} type of the {@code Object}683* reference stored within the element. If this element may not684* contain an {@code Object} reference, an685* {@code IllegalArgumentException} will be thrown. If the686* class type is an array, this field indicates the underlying687* class type (<i>e.g</i>, for an array of {@code int}s, this688* method would return {@code int.class}).689*690* <p> {@code Object} references whose legal values are691* defined as a range must implement the {@code Comparable}692* interface.693*694* @param elementName the name of the element being queried.695*696* @return a {@code Class} object.697*698* @exception IllegalArgumentException if {@code elementName}699* is {@code null} or is not a legal element name for this700* format.701* @exception IllegalArgumentException if the named element cannot702* contain an object value (<i>i.e.</i>, if703* {@code getObjectValueType(elementName) == VALUE_NONE}).704*/705Class<?> getObjectClass(String elementName);706707/**708* Returns an {@code Object}s containing the default709* value for the {@code Object} reference within710* the named element.711*712* @param elementName the name of the element being queried.713*714* @return an {@code Object}.715*716* @exception IllegalArgumentException if {@code elementName}717* is {@code null} or is not a legal element name for this718* format.719* @exception IllegalArgumentException if the named element cannot720* contain an object value (<i>i.e.</i>, if721* {@code getObjectValueType(elementName) == VALUE_NONE}).722*/723Object getObjectDefaultValue(String elementName);724725/**726* Returns an array of {@code Object}s containing the legal727* enumerated values for the {@code Object} reference within728* the named element. This method should only be called if729* {@code getObjectValueType} returns730* {@code VALUE_ENUMERATION}.731*732* <p> The {@code Object} associated with a node that accepts733* enumerated values must be equal to one of the values returned by734* this method, as defined by the {@code ==} operator (as735* opposed to the {@code Object.equals} method).736*737* @param elementName the name of the element being queried.738*739* @return an array of {@code Object}s.740*741* @exception IllegalArgumentException if {@code elementName}742* is {@code null} or is not a legal element name for this743* format.744* @exception IllegalArgumentException if the named element cannot745* contain an object value (<i>i.e.</i>, if746* {@code getObjectValueType(elementName) == VALUE_NONE}).747* @exception IllegalArgumentException if the {@code Object}748* is not defined as an enumeration.749*/750Object[] getObjectEnumerations(String elementName);751752/**753* Returns the minimum legal value for the {@code Object}754* reference within the named element. Whether this value is755* inclusive or exclusive may be determined by the value of756* {@code getObjectValueType}. This method should only be757* called if {@code getObjectValueType} returns one of the758* constants starting with {@code VALUE_RANGE}.759*760* @param elementName the name of the element being queried.761*762* @return the smallest legal value for the attribute.763*764* @exception IllegalArgumentException if {@code elementName}765* is {@code null} or is not a legal element name for this766* format.767* @exception IllegalArgumentException if the named element cannot768* contain an object value (<i>i.e.</i>, if769* {@code getObjectValueType(elementName) == VALUE_NONE}).770* @exception IllegalArgumentException if the {@code Object}771* is not defined as a range.772*/773Comparable<?> getObjectMinValue(String elementName);774775/**776* Returns the maximum legal value for the {@code Object}777* reference within the named element. Whether this value is778* inclusive or exclusive may be determined by the value of779* {@code getObjectValueType}. This method should only be780* called if {@code getObjectValueType} returns one of the781* constants starting with {@code VALUE_RANGE}.782*783* @return the smallest legal value for the attribute.784*785* @param elementName the name of the element being queried.786*787* @exception IllegalArgumentException if {@code elementName}788* is {@code null} or is not a legal element name for this789* format.790* @exception IllegalArgumentException if the named element cannot791* contain an object value (<i>i.e.</i>, if792* {@code getObjectValueType(elementName) == VALUE_NONE}).793* @exception IllegalArgumentException if the {@code Object}794* is not defined as a range.795*/796Comparable<?> getObjectMaxValue(String elementName);797798/**799* Returns the minimum number of array elements that may be used800* to define the {@code Object} reference within the named801* element. This method should only be called if802* {@code getObjectValueType} returns803* {@code VALUE_LIST}.804*805* @param elementName the name of the element being queried.806*807* @return the smallest valid array length for the808* {@code Object} reference.809*810* @exception IllegalArgumentException if {@code elementName}811* is {@code null} or is not a legal element name for this812* format.813* @exception IllegalArgumentException if the named element cannot814* contain an object value (<i>i.e.</i>, if815* {@code getObjectValueType(elementName) == VALUE_NONE}).816* @exception IllegalArgumentException if the {@code Object} is not817* an array.818*/819int getObjectArrayMinLength(String elementName);820821/**822* Returns the maximum number of array elements that may be used823* to define the {@code Object} reference within the named824* element. A value of {@code Integer.MAX_VALUE} may be used825* to specify that there is no upper bound. This method should826* only be called if {@code getObjectValueType} returns827* {@code VALUE_LIST}.828*829* @param elementName the name of the element being queried.830*831* @return the largest valid array length for the832* {@code Object} reference.833*834* @exception IllegalArgumentException if {@code elementName}835* is {@code null} or is not a legal element name for this836* format.837* @exception IllegalArgumentException if the named element cannot838* contain an object value (<i>i.e.</i>, if839* {@code getObjectValueType(elementName) == VALUE_NONE}).840* @exception IllegalArgumentException if the {@code Object} is not841* an array.842*/843int getObjectArrayMaxLength(String elementName);844}845846847