An object describing the structure of metadata documents returned
from
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 implentation will
construct only a single instance and cache it for future
invocations of getInstance
.
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:
- Elements may not contain text or mix text with embedded
tags.
- The children of an element must conform to one of a few simple
patterns, described in the documentation for the
CHILD_*
constants;
- The in-memory representation of an elements may contain a
reference to an
Object
. There is no provision for
representing such objects textually.