IIOMetadata.getAsTree and passed to
IIOMetadata.setFromTree and mergeTree.
Document structures are described by a set of constraints on the
type and number of child elements that may belong to a given parent
element type, the names, types, and values of attributes that may
belong to an element, and the type and values of
Object reference that may be stored at a node.
N.B: classes that implement this interface should contain a
method declared as public static getInstance() which
returns an instance of the class. Commonly, an implementation will
construct only a single instance and cache it for future
invocations of getInstance.
In the event that the plugin is provided as part of a named module, that module must export the package containing the implementation class to the
java.desktopmodule via a qualified export. An unqualified export is not recommended unless also needed for some other reason. Failing to export the package will result in access failure at runtime.
The structures that may be described by this class are a subset
of those expressible using XML document type definitions (DTDs),
with the addition of some basic information on the datatypes of
attributes and the ability to store an Object
reference within a node. In the future, XML Schemas could be used
to represent these structures, and many others.
The differences between
IIOMetadataFormat-described structures and DTDs are as
follows:
CHILD_* constants;
Object. There is no provision for
representing such objects textually.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CHILD_POLICY_ALL
A constant returned by |
| public static final int | CHILD_POLICY_CHOICE
A constant returned by |
| public static final int | CHILD_POLICY_EMPTY
A constant returned by |
| public static final int | CHILD_POLICY_MAX
The largest valid |
| public static final int | CHILD_POLICY_REPEAT
A constant returned by |
| public static final int | CHILD_POLICY_SEQUENCE
A constant returned by |
| public static final int | CHILD_POLICY_SOME
A constant returned by |
| public static final int | DATATYPE_BOOLEAN
A constant returned by |
| public static final int | DATATYPE_DOUBLE
A constant returned by |
| public static final int | DATATYPE_FLOAT
A constant returned by |
| public static final int | DATATYPE_INTEGER
A constant returned by |
| public static final int | DATATYPE_STRING
A constant returned by |
| public static final int | VALUE_ARBITRARY
A constant returned by |
| public static final int | VALUE_ENUMERATION
A constant returned by |
| public static final int | VALUE_LIST
A constant returned by |
| public static final int | VALUE_NONE
A constant returned by |
| public static final int | VALUE_RANGE
A constant returned by |
| public static final int | VALUE_RANGE_MAX_INCLUSIVE
A constant returned by |
| public static final int | VALUE_RANGE_MAX_INCLUSIVE_MASK
A value that may be or'ed with |
| public static final int | VALUE_RANGE_MIN_INCLUSIVE
A constant returned by |
| public static final int | VALUE_RANGE_MIN_INCLUSIVE_MASK
A value that may be or'ed with |
| public static final int | VALUE_RANGE_MIN_MAX_INCLUSIVE
A constant returned by |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the node is meaningful for images
of the given type.the name of the element being queried. elementName, ImageTypeSpecifier an imageType)ImageTypeSpecifier indicating
the type of the image that will be associated with the
metadata.Returns |
| public int | Returns: one of theDATATYPE_* constants.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns one of the constants starting with
|
| public String | Returns: aString containing the default value, or
null.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns the default value of the named attribute, if it is not
explicitly present within the named element, as a
|
| public String | Returns: the attribute description.the name of the element. elementName, String the name of the attribute. attrName, Locale the locale)Locale for which localization
will be attempted.Returns a |
| public String[] | Returns: an array ofStrings.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns an array of |
| public int | Returns: the largest legal number of list items for the attribute.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns the maximum number of list items that may be used to define this attribute. |
| public int | Returns: the smallest legal number of list items for the attribute.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns the minimum number of list items that may be used to define this attribute. |
| public String | Returns: aString containing the largest legal
value for the attribute.the name of the element being queried, as a
elementName, String String.the name of the attribute being queried. attrName)Returns the maximum legal value for the attribute. |
| public String | Returns: aString containing the smallest legal
value for the attribute.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns the minimum legal value for the attribute. |
| public String[] | Returns: an array ofStrings.the name of the element being queried. elementName)Returns an array of |
| public int | Returns: one of theVALUE_* constants.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns one of the constants starting with |
| public String[] | Returns: an array ofStrings, or null.the name of the element being queried. elementName)Returns an array of |
| public int | Returns: one of theCHILD_POLICY_* constants.the name of the element being queried. elementName)Returns one of the constants starting with
|
| public String | Returns: the element description.the name of the element. elementName, Locale the locale)Locale for which localization
will be attempted.Returns a |
| public int | Returns: anint.the name of the element being queried. elementName)Returns the maximum number of children of the named element
with child policy |
| public int | Returns: anint.the name of the element being queried. elementName)Returns the minimum number of children of the named element
with child policy |
| public int | Returns: the largest valid array length for theObject reference.the name of the element being queried. elementName)Returns the maximum number of array elements that may be used
to define the |
| public int | Returns: the smallest valid array length for theObject reference.the name of the element being queried. elementName)Returns the minimum number of array elements that may be used
to define the |
| public Class | Returns: aClass object.the name of the element being queried. elementName)Returns the |
| public Object | Returns: anObject.the name of the element being queried. elementName)Returns an |
| public Object[] | Returns: an array ofObjects.the name of the element being queried. elementName)Returns an array of |
| public Comparable | Returns: the smallest legal value for the attribute.the name of the element being queried. elementName)Returns the maximum legal value for the |
| public Comparable | Returns: the smallest legal value for the attribute.the name of the element being queried. elementName)Returns the minimum legal value for the |
| public int | Returns: one of theVALUE_* constants.the name of the element being queried. elementName)Returns one of the enumerated values starting with
|
| public String | |
| public boolean | Returns: true if the attribute must be present.the name of the element being queried. elementName, String the name of the attribute being queried. attrName)Returns |
| CHILD_POLICY_ALL | back to summary |
|---|---|
| public static final int CHILD_POLICY_ALL A constant returned by | |
| CHILD_POLICY_CHOICE | back to summary |
|---|---|
| public static final int CHILD_POLICY_CHOICE A constant returned by | |
| CHILD_POLICY_EMPTY | back to summary |
|---|---|
| public static final int CHILD_POLICY_EMPTY A constant returned by | |
| CHILD_POLICY_MAX | back to summary |
|---|---|
| public static final int CHILD_POLICY_MAX The largest valid | |
| CHILD_POLICY_REPEAT | back to summary |
|---|---|
| public static final int CHILD_POLICY_REPEAT A constant returned by | |
| CHILD_POLICY_SEQUENCE | back to summary |
|---|---|
| public static final int CHILD_POLICY_SEQUENCE A constant returned by | |
| CHILD_POLICY_SOME | back to summary |
|---|---|
| public static final int CHILD_POLICY_SOME A constant returned by | |
| DATATYPE_BOOLEAN | back to summary |
|---|---|
| public static final int DATATYPE_BOOLEAN A constant returned by | |
| DATATYPE_DOUBLE | back to summary |
|---|---|
| public static final int DATATYPE_DOUBLE A constant returned by | |
| DATATYPE_FLOAT | back to summary |
|---|---|
| public static final int DATATYPE_FLOAT A constant returned by | |
| DATATYPE_INTEGER | back to summary |
|---|---|
| public static final int DATATYPE_INTEGER A constant returned by | |
| DATATYPE_STRING | back to summary |
|---|---|
| public static final int DATATYPE_STRING A constant returned by | |
| VALUE_ARBITRARY | back to summary |
|---|---|
| public static final int VALUE_ARBITRARY A constant returned by | |
| VALUE_ENUMERATION | back to summary |
|---|---|
| public static final int VALUE_ENUMERATION A constant returned by Attribute values of type | |
| VALUE_LIST | back to summary |
|---|---|
| public static final int VALUE_LIST A constant returned by | |
| VALUE_NONE | back to summary |
|---|---|
| public static final int VALUE_NONE A constant returned by | |
| VALUE_RANGE | back to summary |
|---|---|
| public static final int VALUE_RANGE A constant returned by
| |
| VALUE_RANGE_MAX_INCLUSIVE | back to summary |
|---|---|
| public static final int VALUE_RANGE_MAX_INCLUSIVE A constant returned by | |
| VALUE_RANGE_MAX_INCLUSIVE_MASK | back to summary |
|---|---|
| public static final int VALUE_RANGE_MAX_INCLUSIVE_MASK A value that may be or'ed with Similarly, the value may be and'ed with the value of
| |
| VALUE_RANGE_MIN_INCLUSIVE | back to summary |
|---|---|
| public static final int VALUE_RANGE_MIN_INCLUSIVE A constant returned by | |
| VALUE_RANGE_MIN_INCLUSIVE_MASK | back to summary |
|---|---|
| public static final int VALUE_RANGE_MIN_INCLUSIVE_MASK A value that may be or'ed with Similarly, the value may be and'ed with the value of
| |
| VALUE_RANGE_MIN_MAX_INCLUSIVE | back to summary |
|---|---|
| public static final int VALUE_RANGE_MIN_MAX_INCLUSIVE A constant returned by | |
| canNodeAppear | back to summary |
|---|---|
| public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) Returns
| |
| getAttributeDataType | back to summary |
|---|---|
| public int getAttributeDataType(String elementName, String attrName) Returns one of the constants starting with
| |
| getAttributeDefaultValue | back to summary |
|---|---|
| public String getAttributeDefaultValue(String elementName, String attrName) Returns the default value of the named attribute, if it is not
explicitly present within the named element, as a
| |
| getAttributeDescription | back to summary |
|---|---|
| public String getAttributeDescription(String elementName, String attrName, Locale locale) Returns a If
| |
| getAttributeEnumerations | back to summary |
|---|---|
| public String[] getAttributeEnumerations(String elementName, String attrName) Returns an array of
| |
| getAttributeListMaxLength | back to summary |
|---|---|
| public int getAttributeListMaxLength(String elementName, String attrName) Returns the maximum number of list items that may be used to
define this attribute. A value of
| |
| getAttributeListMinLength | back to summary |
|---|---|
| public int getAttributeListMinLength(String elementName, String attrName) Returns the minimum number of list items that may be used to
define this attribute. The attribute itself is defined as a
| |
| getAttributeMaxValue | back to summary |
|---|---|
| public String getAttributeMaxValue(String elementName, String attrName) Returns the maximum legal value for the attribute. Whether
this value is inclusive or exclusive may be determined by the
value of
| |
| getAttributeMinValue | back to summary |
|---|---|
| public String getAttributeMinValue(String elementName, String attrName) Returns the minimum legal value for the attribute. Whether
this value is inclusive or exclusive may be determined by the
value of
| |
| getAttributeNames | back to summary |
|---|---|
| public String[] getAttributeNames(String elementName) Returns an array of
| |
| getAttributeValueType | back to summary |
|---|---|
| public int getAttributeValueType(String elementName, String attrName) Returns one of the constants starting with
| |
| getChildNames | back to summary |
|---|---|
| public String[] getChildNames(String elementName) Returns an array of
| |
| getChildPolicy | back to summary |
|---|---|
| public int getChildPolicy(String elementName) Returns one of the constants starting with
| |
| getElementDescription | back to summary |
|---|---|
| public String getElementDescription(String elementName, Locale locale) Returns a If
| |
| getElementMaxChildren | back to summary |
|---|---|
| public int getElementMaxChildren(String elementName) Returns the maximum number of children of the named element
with child policy
| |
| getElementMinChildren | back to summary |
|---|---|
| public int getElementMinChildren(String elementName) Returns the minimum number of children of the named element
with child policy
| |
| getObjectArrayMaxLength | back to summary |
|---|---|
| public int getObjectArrayMaxLength(String elementName) Returns the maximum number of array elements that may be used
to define the
| |
| getObjectArrayMinLength | back to summary |
|---|---|
| public int getObjectArrayMinLength(String elementName) Returns the minimum number of array elements that may be used
to define the
| |
| getObjectClass | back to summary |
|---|---|
| public Class Returns the
| |
| getObjectDefaultValue | back to summary |
|---|---|
| public Object getObjectDefaultValue(String elementName) Returns an
| |
| getObjectEnumerations | back to summary |
|---|---|
| public Object[] getObjectEnumerations(String elementName) Returns an array of The
| |
| getObjectMaxValue | back to summary |
|---|---|
| public Comparable Returns the maximum legal value for the
| |
| getObjectMinValue | back to summary |
|---|---|
| public Comparable Returns the minimum legal value for the
| |
| getObjectValueType | back to summary |
|---|---|
| public int getObjectValueType(String elementName) Returns one of the enumerated values starting with
| |
| getRootName | back to summary |
|---|---|
| public String getRootName() Returns the name of the root element of the format.
| |
| isAttributeRequired | back to summary |
|---|---|
| public boolean isAttributeRequired(String elementName, String attrName) Returns
| |