Class IIOMetadataFormatImpl
- All Implemented Interfaces:
- IIOMetadataFormat
IIOMetadataFormat interface.  In addition, a static
 instance representing the standard, plug-in neutral
 javax_imageio_1.0 format is provided by the
 getStandardFormatInstance method.
  In order to supply localized descriptions of elements and
 attributes, a ResourceBundle with a base name of
 this.getClass().getName() + "Resources" should be
 supplied via the usual mechanism used by
 ResourceBundle.getBundle.  Briefly, the subclasser
 supplies one or more additional classes according to a naming
 convention (by default, the fully-qualified name of the subclass
 extending IIMetadataFormatImpl, plus the string
 "Resources", plus the country, language, and variant codes
 separated by underscores).  At run time, calls to
 getElementDescription or
 getAttributeDescription will attempt to load such
 classes dynamically according to the supplied locale, and will use
 either the element name, or the element name followed by a '/'
 character followed by the attribute name as a key.  This key will
 be supplied to the ResourceBundle's
 getString method, and the resulting localized
 description of the node or attribute is returned.
 
 The subclass may supply a different base name for the resource
 bundles using the setResourceBaseName method.
 
 A subclass may choose its own localization mechanism, if so
 desired, by overriding the supplied implementations of
 getElementDescription and
 getAttributeDescription.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringAStringconstant containing the standard format name,"javax_imageio_1.0".Fields declared in interface javax.imageio.metadata.IIOMetadataFormatCHILD_POLICY_ALL, CHILD_POLICY_CHOICE, CHILD_POLICY_EMPTY, CHILD_POLICY_MAX, CHILD_POLICY_REPEAT, CHILD_POLICY_SEQUENCE, CHILD_POLICY_SOME, DATATYPE_BOOLEAN, DATATYPE_DOUBLE, DATATYPE_FLOAT, DATATYPE_INTEGER, DATATYPE_STRING, VALUE_ARBITRARY, VALUE_ENUMERATION, VALUE_LIST, VALUE_NONE, VALUE_RANGE, VALUE_RANGE_MAX_INCLUSIVE, VALUE_RANGE_MAX_INCLUSIVE_MASK, VALUE_RANGE_MIN_INCLUSIVE, VALUE_RANGE_MIN_INCLUSIVE_MASK, VALUE_RANGE_MIN_MAX_INCLUSIVE
- 
Constructor SummaryConstructorsConstructorDescriptionIIOMetadataFormatImpl(String rootName, int childPolicy) Constructs a blankIIOMetadataFormatImplinstance, with a given root element name and child policy (other thanCHILD_POLICY_REPEAT).IIOMetadataFormatImpl(String rootName, int minChildren, int maxChildren) Constructs a blankIIOMetadataFormatImplinstance, with a given root element name and a child policy ofCHILD_POLICY_REPEAT.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, int listMinLength, int listMaxLength) Adds a new attribute to a previously defined element that will be defined by a list of values.protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue) Adds a new attribute to a previously defined element that may be set to an arbitrary value.protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, String minValue, String maxValue, boolean minInclusive, boolean maxInclusive) Adds a new attribute to a previously defined element that will be defined by a range of values.protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, List<String> enumeratedValues) Adds a new attribute to a previously defined element that will be defined by a set of enumerated values.protected voidaddBooleanAttribute(String elementName, String attrName, boolean hasDefaultValue, boolean defaultValue) Adds a new attribute to a previously defined element that will be defined by the enumerated valuesTRUEandFALSE, with a datatype ofDATATYPE_BOOLEAN.protected voidaddChildElement(String elementName, String parentName) Adds an existing element to the list of legal children for a given parent node type.protected voidaddElement(String elementName, String parentName, int childPolicy) Adds a new element type to this metadata document format with a child policy other thanCHILD_POLICY_REPEAT.protected voidaddElement(String elementName, String parentName, int minChildren, int maxChildren) Adds a new element type to this metadata document format with a child policy ofCHILD_POLICY_REPEAT.protected voidaddObjectValue(String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength) Allows anObjectreference of a given class type to be stored in nodes implementing the named element.protected <T> voidaddObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue) Allows anObjectreference of a given class type to be stored in nodes implementing the named element.protected <T> voidaddObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue, List<? extends T> enumeratedValues) Allows anObjectreference of a given class type to be stored in nodes implementing the named element.protected <T extends Object & Comparable<? super T>>
 voidaddObjectValue(String elementName, Class<T> classType, T defaultValue, Comparable<? super T> minValue, Comparable<? super T> maxValue, boolean minInclusive, boolean maxInclusive) Allows anObjectreference of a given class type to be stored in nodes implementing the named element.intgetAttributeDataType(String elementName, String attrName) Returns one of the constants starting withDATATYPE_, indicating the format and interpretation of the value of the given attribute within the named element.getAttributeDefaultValue(String elementName, String attrName) Returns the default value of the named attribute, if it is not explicitly present within the named element, as aString, ornullif no default value is available.getAttributeDescription(String elementName, String attrName, Locale locale) Returns aStringcontaining a description of the named attribute, ornull.String[]getAttributeEnumerations(String elementName, String attrName) Returns an array ofStrings containing the legal enumerated values for the given attribute within the named element.intgetAttributeListMaxLength(String elementName, String attrName) Returns the maximum number of list items that may be used to define this attribute.intgetAttributeListMinLength(String elementName, String attrName) Returns the minimum number of list items that may be used to define this attribute.getAttributeMaxValue(String elementName, String attrName) Returns the maximum legal value for the attribute.getAttributeMinValue(String elementName, String attrName) Returns the minimum legal value for the attribute.String[]getAttributeNames(String elementName) Returns an array ofStrings listing the names of the attributes that may be associated with the named element.intgetAttributeValueType(String elementName, String attrName) Returns one of the constants starting withVALUE_, indicating whether the values of the given attribute within the named element are arbitrary, constrained to lie within a specified range, constrained to be one of a set of enumerated values, or are a whitespace-separated list of arbitrary values.String[]getChildNames(String elementName) Returns an array ofStrings indicating the names of the element which are allowed to be children of the named element, in the order in which they should appear.intgetChildPolicy(String elementName) Returns one of the constants starting withCHILD_POLICY_, indicating the legal pattern of children for the named element.getElementDescription(String elementName, Locale locale) Returns aStringcontaining a description of the named element, ornull.intgetElementMaxChildren(String elementName) Returns the maximum number of children of the named element with child policyCHILD_POLICY_REPEAT.intgetElementMinChildren(String elementName) Returns the minimum number of children of the named element with child policyCHILD_POLICY_REPEAT.intgetObjectArrayMaxLength(String elementName) Returns the maximum number of array elements that may be used to define theObjectreference within the named element.intgetObjectArrayMinLength(String elementName) Returns the minimum number of array elements that may be used to define theObjectreference within the named element.Class<?> getObjectClass(String elementName) Returns theClasstype of theObjectreference stored within the element.getObjectDefaultValue(String elementName) Returns anObjects containing the default value for theObjectreference within the named element.Object[]getObjectEnumerations(String elementName) Returns an array ofObjects containing the legal enumerated values for theObjectreference within the named element.Comparable<?> getObjectMaxValue(String elementName) Returns the maximum legal value for theObjectreference within the named element.Comparable<?> getObjectMinValue(String elementName) Returns the minimum legal value for theObjectreference within the named element.intgetObjectValueType(String elementName) Returns one of the enumerated values starting withVALUE_, indicating the type of values (enumeration, range, or array) that are allowed for theObjectreference.protected StringReturns the currently set base name for locatingResourceBundles.Returns the name of the root element of the format.static IIOMetadataFormatReturns anIIOMetadataFormatobject describing the standard, plug-in neutraljavax.imageio_1.0metadata document format described in the comment of thejavax.imageio.metadatapackage.booleanisAttributeRequired(String elementName, String attrName) Returnstrueif the named attribute must be present within the named element.protected voidremoveAttribute(String elementName, String attrName) Removes an attribute from a previously defined element.protected voidremoveElement(String elementName) Removes an element from the format.protected voidremoveObjectValue(String elementName) Disallows anObjectreference from being stored in nodes implementing the named element.protected voidsetResourceBaseName(String resourceBaseName) Sets a new base name for locatingResourceBundles containing descriptions of elements and attributes for this format.Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface javax.imageio.metadata.IIOMetadataFormatcanNodeAppear
- 
Field Details- 
standardMetadataFormatNameAStringconstant containing the standard format name,"javax_imageio_1.0".- See Also:
 
 
- 
- 
Constructor Details- 
IIOMetadataFormatImplConstructs a blankIIOMetadataFormatImplinstance, with a given root element name and child policy (other thanCHILD_POLICY_REPEAT). Additional elements, and their attributes andObjectreference information may be added using the variousaddmethods.- Parameters:
- rootName- the name of the root element.
- childPolicy- one of the- CHILD_POLICY_*constants, other than- CHILD_POLICY_REPEAT.
- Throws:
- IllegalArgumentException- if- rootNameis- null.
- IllegalArgumentException- if- childPolicyis not one of the predefined constants.
 
- 
IIOMetadataFormatImplConstructs a blankIIOMetadataFormatImplinstance, with a given root element name and a child policy ofCHILD_POLICY_REPEAT. Additional elements, and their attributes andObjectreference information may be added using the variousaddmethods.- Parameters:
- rootName- the name of the root element.
- minChildren- the minimum number of children of the node.
- maxChildren- the maximum number of children of the node.
- Throws:
- IllegalArgumentException- if- rootNameis- null.
- IllegalArgumentException- if- minChildrenis negative or larger than- maxChildren.
 
 
- 
- 
Method Details- 
setResourceBaseNameSets a new base name for locatingResourceBundles containing descriptions of elements and attributes for this format.Prior to the first time this method is called, the base name will be equal to this.getClass().getName() + "Resources".- Parameters:
- resourceBaseName- a- Stringcontaining the new base name.
- Throws:
- IllegalArgumentException- if- resourceBaseNameis- null.
- See Also:
 
- 
getResourceBaseNameReturns the currently set base name for locatingResourceBundles.- Returns:
- a Stringcontaining the base name.
- See Also:
 
- 
addElementAdds a new element type to this metadata document format with a child policy other thanCHILD_POLICY_REPEAT.- Parameters:
- elementName- the name of the new element.
- parentName- the name of the element that will be the parent of the new element.
- childPolicy- one of the- CHILD_POLICY_*constants, other than- CHILD_POLICY_REPEAT, indicating the child policy of the new element.
- Throws:
- IllegalArgumentException- if- parentNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- childPolicyis not one of the predefined constants.
 
- 
addElementAdds a new element type to this metadata document format with a child policy ofCHILD_POLICY_REPEAT.- Parameters:
- elementName- the name of the new element.
- parentName- the name of the element that will be the parent of the new element.
- minChildren- the minimum number of children of the node.
- maxChildren- the maximum number of children of the node.
- Throws:
- IllegalArgumentException- if- parentNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- minChildrenis negative or larger than- maxChildren.
 
- 
addChildElementAdds an existing element to the list of legal children for a given parent node type.- Parameters:
- elementName- the name of the element to be added as a child.
- parentName- the name of the element that will be the new parent of the element.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- parentNameis- null, or is not a legal element name for this format.
 
- 
removeElementRemoves an element from the format. If no element with the given name was present, nothing happens and no exception is thrown.- Parameters:
- elementName- the name of the element to be removed.
 
- 
addAttributeprotected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue) Adds a new attribute to a previously defined element that may be set to an arbitrary value.- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute being added.
- dataType- the data type (string format) of the attribute, one of the- DATATYPE_*constants.
- required-- trueif the attribute must be present.
- defaultValue- the default value for the attribute, or- null.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- attrNameis- null.
- IllegalArgumentException- if- dataTypeis not one of the predefined constants.
 
- 
addAttributeprotected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, List<String> enumeratedValues) Adds a new attribute to a previously defined element that will be defined by a set of enumerated values.- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute being added.
- dataType- the data type (string format) of the attribute, one of the- DATATYPE_*constants.
- required-- trueif the attribute must be present.
- defaultValue- the default value for the attribute, or- null.
- enumeratedValues- a- Listof- Strings containing the legal values for the attribute.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- attrNameis- null.
- IllegalArgumentException- if- dataTypeis not one of the predefined constants.
- IllegalArgumentException- if- enumeratedValuesis- null.
- IllegalArgumentException- if- enumeratedValuesdoes not contain at least one entry.
- IllegalArgumentException- if- enumeratedValuescontains an element that is not a- Stringor is- null.
 
- 
addAttributeprotected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, String minValue, String maxValue, boolean minInclusive, boolean maxInclusive) Adds a new attribute to a previously defined element that will be defined by a range of values.- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute being added.
- dataType- the data type (string format) of the attribute, one of the- DATATYPE_*constants.
- required-- trueif the attribute must be present.
- defaultValue- the default value for the attribute, or- null.
- minValue- the smallest (inclusive or exclusive depending on the value of- minInclusive) legal value for the attribute, as a- String.
- maxValue- the largest (inclusive or exclusive depending on the value of- minInclusive) legal value for the attribute, as a- String.
- minInclusive-- trueif- minValueis inclusive.
- maxInclusive-- trueif- maxValueis inclusive.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- attrNameis- null.
- IllegalArgumentException- if- dataTypeis not one of the predefined constants.
 
- 
addAttributeprotected void addAttribute(String elementName, String attrName, int dataType, boolean required, int listMinLength, int listMaxLength) Adds a new attribute to a previously defined element that will be defined by a list of values.- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute being added.
- dataType- the data type (string format) of the attribute, one of the- DATATYPE_*constants.
- required-- trueif the attribute must be present.
- listMinLength- the smallest legal number of list items.
- listMaxLength- the largest legal number of list items.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- attrNameis- null.
- IllegalArgumentException- if- dataTypeis not one of the predefined constants.
- IllegalArgumentException- if- listMinLengthis negative or larger than- listMaxLength.
 
- 
addBooleanAttributeprotected void addBooleanAttribute(String elementName, String attrName, boolean hasDefaultValue, boolean defaultValue) Adds a new attribute to a previously defined element that will be defined by the enumerated valuesTRUEandFALSE, with a datatype ofDATATYPE_BOOLEAN.- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute being added.
- hasDefaultValue-- trueif a default value should be present.
- defaultValue- the default value for the attribute as a- boolean, ignored if- hasDefaultValueis- false.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- attrNameis- null.
 
- 
removeAttributeRemoves an attribute from a previously defined element. If no attribute with the given name was present in the given element, nothing happens and no exception is thrown.- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute being removed.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
 
- 
addObjectValueprotected <T> void addObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue) Allows anObjectreference of a given class type to be stored in nodes implementing the named element. The value of theObjectis unconstrained other than by its class type.If an Objectreference was previously allowed, the previous settings are overwritten.- Type Parameters:
- T- the type of the object.
- Parameters:
- elementName- the name of the element.
- classType- a- Classvariable indicating the legal class type for the object value.
- required-- trueif an object value must be present.
- defaultValue- the default value for the- Objectreference, or- null.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
 
- 
addObjectValueprotected <T> void addObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue, List<? extends T> enumeratedValues) Allows anObjectreference of a given class type to be stored in nodes implementing the named element. The value of theObjectmust be one of the values given byenumeratedValues.If an Objectreference was previously allowed, the previous settings are overwritten.- Type Parameters:
- T- the type of the object.
- Parameters:
- elementName- the name of the element.
- classType- a- Classvariable indicating the legal class type for the object value.
- required-- trueif an object value must be present.
- defaultValue- the default value for the- Objectreference, or- null.
- enumeratedValues- a- Listof- Objects containing the legal values for the object reference.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- enumeratedValuesis- null.
- IllegalArgumentException- if- enumeratedValuesdoes not contain at least one entry.
- IllegalArgumentException- if- enumeratedValuescontains an element that is not an instance of the class type denoted by- classTypeor is- null.
 
- 
addObjectValueprotected <T extends Object & Comparable<? super T>> void addObjectValue(String elementName, Class<T> classType, T defaultValue, Comparable<? super T> minValue, Comparable<? super T> maxValue, boolean minInclusive, boolean maxInclusive) Allows anObjectreference of a given class type to be stored in nodes implementing the named element. The value of theObjectmust be within the range given byminValueandmaxValue. Furthermore, the class type must implement theComparableinterface.If an Objectreference was previously allowed, the previous settings are overwritten.- Type Parameters:
- T- the type of the object.
- Parameters:
- elementName- the name of the element.
- classType- a- Classvariable indicating the legal class type for the object value.
- defaultValue- the default value for the
- minValue- the smallest (inclusive or exclusive depending on the value of- minInclusive) legal value for the object value, as a- String.
- maxValue- the largest (inclusive or exclusive depending on the value of- minInclusive) legal value for the object value, as a- String.
- minInclusive-- trueif- minValueis inclusive.
- maxInclusive-- trueif- maxValueis inclusive.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
 
- 
addObjectValueprotected void addObjectValue(String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength) Allows anObjectreference of a given class type to be stored in nodes implementing the named element. The value of theObjectmust an array of objects of class type given byclassType, with at leastarrayMinLengthand at mostarrayMaxLengthelements.If an Objectreference was previously allowed, the previous settings are overwritten.- Parameters:
- elementName- the name of the element.
- classType- a- Classvariable indicating the legal class type for the object value.
- arrayMinLength- the smallest legal length for the array.
- arrayMaxLength- the largest legal length for the array.
- Throws:
- IllegalArgumentException- if- elementNameis not a legal element name for this format.
 
- 
removeObjectValueDisallows anObjectreference from being stored in nodes implementing the named element.- Parameters:
- elementName- the name of the element.
- Throws:
- IllegalArgumentException- if- elementNameis not a legal element name for this format.
 
- 
getRootNameDescription copied from interface:IIOMetadataFormatReturns the name of the root element of the format.- Specified by:
- getRootNamein interface- IIOMetadataFormat
- Returns:
- a String.
 
- 
getElementMinChildrenDescription copied from interface:IIOMetadataFormatReturns the minimum number of children of the named element with child policyCHILD_POLICY_REPEAT. For example, an element representing color primary information might be required to have at least 3 children, one for each primary.- Specified by:
- getElementMinChildrenin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- an int.
 
- 
getElementMaxChildrenDescription copied from interface:IIOMetadataFormatReturns the maximum number of children of the named element with child policyCHILD_POLICY_REPEAT. For example, an element representing an entry in an 8-bit color palette might be allowed to repeat up to 256 times. A value ofInteger.MAX_VALUEmay be used to specify that there is no upper bound.- Specified by:
- getElementMaxChildrenin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- an int.
 
- 
getElementDescriptionReturns aStringcontaining a description of the named element, ornull. The description will be localized for the suppliedLocaleif possible.The default implementation will first locate a ResourceBundleusing the current resource base name set bysetResourceBaseNameand the suppliedLocale, using the fallback mechanism described in the comments forResourceBundle.getBundle. If aResourceBundleis found, the element name will be used as a key to itsgetStringmethod, and the result returned. If noResourceBundleis found, or no such key is present,nullwill be returned.If localeisnull, the current defaultLocalereturned byLocale.getLocalewill be used.- Specified by:
- getElementDescriptionin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element.
- locale- the- Localefor which localization will be attempted.
- Returns:
- the element description.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- See Also:
 
- 
getChildPolicyDescription copied from interface:IIOMetadataFormatReturns one of the constants starting withCHILD_POLICY_, indicating the legal pattern of children for the named element.- Specified by:
- getChildPolicyin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- one of the CHILD_POLICY_*constants.
 
- 
getChildNamesDescription copied from interface:IIOMetadataFormatReturns an array ofStrings indicating the names of the element which are allowed to be children of the named element, in the order in which they should appear. If the element cannot have children,nullis returned.- Specified by:
- getChildNamesin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- an array of Strings, or null.
 
- 
getAttributeNamesDescription copied from interface:IIOMetadataFormatReturns an array ofStrings listing the names of the attributes that may be associated with the named element.- Specified by:
- getAttributeNamesin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- an array of Strings.
 
- 
getAttributeValueTypeDescription copied from interface:IIOMetadataFormatReturns one of the constants starting withVALUE_, indicating whether the values of the given attribute within the named element are arbitrary, constrained to lie within a specified range, constrained to be one of a set of enumerated values, or are a whitespace-separated list of arbitrary values.- Specified by:
- getAttributeValueTypein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- one of the VALUE_*constants.
 
- 
getAttributeDataTypeDescription copied from interface:IIOMetadataFormatReturns one of the constants starting withDATATYPE_, indicating the format and interpretation of the value of the given attribute within the named element. IfgetAttributeValueTypereturnsVALUE_LIST, then the legal value is a whitespace-spearated list of values of the returned datatype.- Specified by:
- getAttributeDataTypein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- one of the DATATYPE_*constants.
 
- 
isAttributeRequiredDescription copied from interface:IIOMetadataFormatReturnstrueif the named attribute must be present within the named element.- Specified by:
- isAttributeRequiredin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- trueif the attribute must be present.
 
- 
getAttributeDefaultValueDescription copied from interface:IIOMetadataFormatReturns the default value of the named attribute, if it is not explicitly present within the named element, as aString, ornullif no default value is available.- Specified by:
- getAttributeDefaultValuein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- a Stringcontaining the default value, ornull.
 
- 
getAttributeEnumerationsDescription copied from interface:IIOMetadataFormatReturns an array ofStrings containing the legal enumerated values for the given attribute within the named element. This method should only be called ifgetAttributeValueTypereturnsVALUE_ENUMERATION.- Specified by:
- getAttributeEnumerationsin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- an array of Strings.
 
- 
getAttributeMinValueDescription copied from interface:IIOMetadataFormatReturns the minimum legal value for the attribute. Whether this value is inclusive or exclusive may be determined by the value ofgetAttributeValueType. The value is returned as aString; its interpretation is dependent on the value ofgetAttributeDataType. This method should only be called ifgetAttributeValueTypereturnsVALUE_RANGE_*.- Specified by:
- getAttributeMinValuein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- a Stringcontaining the smallest legal value for the attribute.
 
- 
getAttributeMaxValueDescription copied from interface:IIOMetadataFormatReturns the maximum legal value for the attribute. Whether this value is inclusive or exclusive may be determined by the value ofgetAttributeValueType. The value is returned as aString; its interpretation is dependent on the value ofgetAttributeDataType. This method should only be called ifgetAttributeValueTypereturnsVALUE_RANGE_*.- Specified by:
- getAttributeMaxValuein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried, as a- String.
- attrName- the name of the attribute being queried.
- Returns:
- a Stringcontaining the largest legal value for the attribute.
 
- 
getAttributeListMinLengthDescription copied from interface:IIOMetadataFormatReturns the minimum number of list items that may be used to define this attribute. The attribute itself is defined as aStringcontaining multiple whitespace-separated items. This method should only be called ifgetAttributeValueTypereturnsVALUE_LIST.- Specified by:
- getAttributeListMinLengthin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- the smallest legal number of list items for the attribute.
 
- 
getAttributeListMaxLengthDescription copied from interface:IIOMetadataFormatReturns the maximum number of list items that may be used to define this attribute. A value ofInteger.MAX_VALUEmay be used to specify that there is no upper bound. The attribute itself is defined as aStringcontaining multiple whitespace-separated items. This method should only be called ifgetAttributeValueTypereturnsVALUE_LIST.- Specified by:
- getAttributeListMaxLengthin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- attrName- the name of the attribute being queried.
- Returns:
- the largest legal number of list items for the attribute.
 
- 
getAttributeDescriptionReturns aStringcontaining a description of the named attribute, ornull. The description will be localized for the suppliedLocaleif possible.The default implementation will first locate a ResourceBundleusing the current resource base name set bysetResourceBaseNameand the suppliedLocale, using the fallback mechanism described in the comments forResourceBundle.getBundle. If aResourceBundleis found, the element name followed by a "/" character followed by the attribute name (elementName + "/" + attrName) will be used as a key to itsgetStringmethod, and the result returned. If noResourceBundleis found, or no such key is present,nullwill be returned.If localeisnull, the current defaultLocalereturned byLocale.getLocalewill be used.- Specified by:
- getAttributeDescriptionin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element.
- attrName- the name of the attribute.
- locale- the- Localefor which localization will be attempted, or- null.
- Returns:
- the attribute description.
- Throws:
- IllegalArgumentException- if- elementNameis- null, or is not a legal element name for this format.
- IllegalArgumentException- if- attrNameis- nullor is not a legal attribute name for this element.
- See Also:
 
- 
getObjectValueTypeDescription copied from interface:IIOMetadataFormatReturns one of the enumerated values starting withVALUE_, indicating the type of values (enumeration, range, or array) that are allowed for theObjectreference. If no object value can be stored within the given element, the result of this method will beVALUE_NONE.Objectreferences whose legal values are defined as a range must implement theComparableinterface.- Specified by:
- getObjectValueTypein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- one of the VALUE_*constants.
- See Also:
 
- 
getObjectClassDescription copied from interface:IIOMetadataFormatReturns theClasstype of theObjectreference stored within the element. If this element may not contain anObjectreference, anIllegalArgumentExceptionwill be thrown. If the class type is an array, this field indicates the underlying class type (e.g, for an array ofints, this method would returnint.class).Objectreferences whose legal values are defined as a range must implement theComparableinterface.- Specified by:
- getObjectClassin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- a Classobject.
 
- 
getObjectDefaultValueDescription copied from interface:IIOMetadataFormatReturns anObjects containing the default value for theObjectreference within the named element.- Specified by:
- getObjectDefaultValuein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- an Object.
 
- 
getObjectEnumerationsDescription copied from interface:IIOMetadataFormatReturns an array ofObjects containing the legal enumerated values for theObjectreference within the named element. This method should only be called ifgetObjectValueTypereturnsVALUE_ENUMERATION.The Objectassociated with a node that accepts enumerated values must be equal to one of the values returned by this method, as defined by the==operator (as opposed to theObject.equalsmethod).- Specified by:
- getObjectEnumerationsin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- an array of Objects.
 
- 
getObjectMinValueDescription copied from interface:IIOMetadataFormatReturns the minimum legal value for theObjectreference within the named element. Whether this value is inclusive or exclusive may be determined by the value ofgetObjectValueType. This method should only be called ifgetObjectValueTypereturns one of the constants starting withVALUE_RANGE.- Specified by:
- getObjectMinValuein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- the smallest legal value for the attribute.
 
- 
getObjectMaxValueDescription copied from interface:IIOMetadataFormatReturns the maximum legal value for theObjectreference within the named element. Whether this value is inclusive or exclusive may be determined by the value ofgetObjectValueType. This method should only be called ifgetObjectValueTypereturns one of the constants starting withVALUE_RANGE.- Specified by:
- getObjectMaxValuein interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- the smallest legal value for the attribute.
 
- 
getObjectArrayMinLengthDescription copied from interface:IIOMetadataFormatReturns the minimum number of array elements that may be used to define theObjectreference within the named element. This method should only be called ifgetObjectValueTypereturnsVALUE_LIST.- Specified by:
- getObjectArrayMinLengthin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- the smallest valid array length for the
 Objectreference.
 
- 
getObjectArrayMaxLengthDescription copied from interface:IIOMetadataFormatReturns the maximum number of array elements that may be used to define theObjectreference within the named element. A value ofInteger.MAX_VALUEmay be used to specify that there is no upper bound. This method should only be called ifgetObjectValueTypereturnsVALUE_LIST.- Specified by:
- getObjectArrayMaxLengthin interface- IIOMetadataFormat
- Parameters:
- elementName- the name of the element being queried.
- Returns:
- the largest valid array length for the
 Objectreference.
 
- 
getStandardFormatInstanceReturns anIIOMetadataFormatobject describing the standard, plug-in neutraljavax.imageio_1.0metadata document format described in the comment of thejavax.imageio.metadatapackage.- Returns:
- a predefined IIOMetadataFormatinstance.
 
 
-