|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
javax.imageio.metadata.IIOMetadataFormatImpl

public abstract class IIOMetadataFormatImpl


A concrete class providing a reusable implementation of the
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.
ResourceBundle.getBundle(String,Locale)

| Field Summary | |
|---|---|
static String |
standardMetadataFormatName
A String constant containing the standard format
name, "javax_imageio_1.0". |
Fields inherited from interface javax.imageio.metadata.IIOMetadataFormat ![]() |
|---|
CHILD_POLICY_ALL |
| Constructor Summary | |
|---|---|
IIOMetadataFormatImpl
Constructs a blank IIOMetadataFormatImpl instance,
with a given root element name and child policy (other than
CHILD_POLICY_REPEAT). |
|
IIOMetadataFormatImpl
Constructs a blank IIOMetadataFormatImpl instance,
with a given root element name and a child policy of
CHILD_POLICY_REPEAT. |
|
| Method Summary | ||
|---|---|---|
protected void |
addAttribute
Adds a new attribute to a previously defined element that will be defined by a list of values. |
|
protected void |
addAttribute
Adds a new attribute to a previously defined element that may be set to an arbitrary value. |
|
protected void |
addAttribute
Adds a new attribute to a previously defined element that will be defined by a set of enumerated values. |
|
protected void |
addAttribute
Adds a new attribute to a previously defined element that will be defined by a range of values. |
|
protected void |
addBooleanAttribute
Adds a new attribute to a previously defined element that will be defined by the enumerated values TRUE and
FALSE, with a datatype of
DATATYPE_BOOLEAN. |
|
protected void |
addChildElement
Adds an existing element to the list of legal children for a given parent node type. |
|
protected void |
addElement
Adds a new element type to this metadata document format with a child policy other than CHILD_POLICY_REPEAT. |
|
protected void |
addElement
Adds a new element type to this metadata document format with a child policy of CHILD_POLICY_REPEAT. |
|
protected void |
addObjectValue
Allows an Object reference of a given class type
to be stored in nodes implementing the named element. |
|
protected
|
addObjectValue
Allows an Object reference of a given class type
to be stored in nodes implementing the named element. |
|
protected
|
addObjectValue
Allows an Object reference of a given class type
to be stored in nodes implementing the named element. |
|
protected
|
addObjectValue
Allows an Object reference of a given class type
to be stored in nodes implementing the named element. |
|
abstract boolean |
canNodeAppear
Returns true if the element (and the subtree below
it) is allowed to appear in a metadata document for an image of
the given type, defined by an ImageTypeSpecifier. |
|
int |
getAttributeDataType
Returns one of the constants starting with DATATYPE_, indicating the format and
interpretation of the value of the given attribute within th
enamed element. |
|
String |
getAttributeDefaultValue
Returns the default value of the named attribute, if it is not explictly present within the named element, as a String, or null if no default value
is available. |
|
String |
getAttributeDescription
Returns a String containing a description of the
named attribute, or null. |
|
String |
getAttributeEnumerations
Returns an array of Strings containing the legal
enumerated values for the given attribute within the named
element. |
|
int |
getAttributeListMaxLength
Returns the maximum number of list items that may be used to define this attribute. |
|
int |
getAttributeListMinLength
Returns the minimum number of list items that may be used to define this attribute. |
|
String |
getAttributeMaxValue
Returns the maximum legal value for the attribute. |
|
String |
getAttributeMinValue
Returns the minimum legal value for the attribute. |
|
String |
getAttributeNames
Returns an array of Strings listing the names of
the attributes that may be associated with the named element. |
|
int |
getAttributeValueType
Returns one of the constants starting with VALUE_,
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
Returns an array of Strings indicating the names
of the element which are allowed to be children of the named
element, in the order in which they should appear. |
|
int |
getChildPolicy
Returns one of the constants starting with CHILD_POLICY_, indicating the legal pattern of
children for the named element. |
|
String |
getElementDescription
Returns a String containing a description of the
named element, or null. |
|
int |
getElementMaxChildren
Returns the maximum number of children of the named element with child policy CHILD_POLICY_REPEAT. |
|
int |
getElementMinChildren
Returns the minimum number of children of the named element with child policy CHILD_POLICY_REPEAT. |
|
int |
getObjectArrayMaxLength
Returns the maximum number of array elements that may be used to define the Object reference within the named
element. |
|
int |
getObjectArrayMinLength
Returns the minimum number of array elements that may be used to define the Object reference within the named
element. |
|
Class |
getObjectClass
Returns the Class type of the Object
reference stored within the element. |
|
Object |
getObjectDefaultValue
Returns an Objects containing the default
value for the Object reference within
the named element. |
|
Object |
getObjectEnumerations | |