public abstract class IIOMetadataFormatImpl extends Object implements IIOMetadataFormat
| Modifier and Type | Field and Description |
|---|---|
static String |
standardMetadataFormatName
The standard metadata format name constant set to
"javax_imageio_1.0".
|
CHILD_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 and Description |
|---|
IIOMetadataFormatImpl(String rootName,
int childPolicy)
Construct a blank IIOMetadataFormatImpl with the given root name
and child policy.
|
IIOMetadataFormatImpl(String rootName,
int minChildren,
int maxChildren)
Construct a blank IIOMetadataFormatImpl with the given root name,
a child policy of CHILD_POLICY_REPEAT and the given minimum and
maximum limits on the number of root element children.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttribute(String elementName,
String attrName,
int dataType,
boolean required,
int listMinLength,
int listMaxLength) |
protected void |
addAttribute(String elementName,
String attrName,
int dataType,
boolean required,
String defaultValue) |
protected void |
addAttribute(String elementName,
String attrName,
int dataType,
boolean required,
String defaultValue,
List<String> enumeratedValues) |
protected void |
addAttribute(String elementName,
String attrName,
int dataType,
boolean required,
String defaultValue,
String minValue,
String maxValue,
boolean minInclusive,
boolean maxInclusive) |
protected void |
addBooleanAttribute(String elementName,
String attrName,
boolean hasDefaultValue,
boolean defaultValue) |
protected void |
addChildElement(String elementName,
String parentName) |
protected void |
addElement(String elementName,
String parentName,
int childPolicy) |
protected void |
addElement(String elementName,
String parentName,
int minChildren,
int maxChildren) |
protected void |
addObjectValue(String elementName,
Class<?> classType,
int arrayMinLength,
int arrayMaxLength) |
protected <T> void |
addObjectValue(String elementName,
Class<T> classType,
boolean required,
T defaultValue) |
protected <T> void |
addObjectValue(String elementName,
Class<T> classType,
boolean required,
T defaultValue,
List<? extends T> enumeratedValues) |
protected <T extends Object & Comparable<? super T>> |
addObjectValue(String elementName,
Class<T> classType,
T defaultValue,
Comparable<? super T> minValue,
Comparable<? super T> maxValue,
boolean minInclusive,
boolean maxInclusive) |
abstract boolean |
canNodeAppear(String elementName,
ImageTypeSpecifier specifier) |
int |
getAttributeDataType(String elementName,
String attrName) |
String |
getAttributeDefaultValue(String elementName,
String attrName) |
String |
getAttributeDescription(String elementName,
String attrName,
Locale locale) |
String[] |
getAttributeEnumerations(String elementName,
String attrName) |
int |
getAttributeListMaxLength(String elementName,
String attrName) |
int |
getAttributeListMinLength(String elementName,
String attrName) |
String |
getAttributeMaxValue(String elementName,
String attrName) |
String |
getAttributeMinValue(String elementName,
String attrName) |
String[] |
getAttributeNames(String elementName) |
int |
getAttributeValueType(String elementName,
String attrName) |
String[] |
getChildNames(String elementName) |
int |
getChildPolicy(String elementName) |
String |
getElementDescription(String elementName,
Locale locale) |
int |
getElementMaxChildren(String elementName) |
int |
getElementMinChildren(String elementName) |
int |
getObjectArrayMaxLength(String elementName) |
int |
getObjectArrayMinLength(String elementName) |
Class<?> |
getObjectClass(String elementName) |
Object |
getObjectDefaultValue(String elementName) |
Object[] |
getObjectEnumerations(String elementName) |
Comparable<?> |
getObjectMaxValue(String elementName) |
Comparable<?> |
getObjectMinValue(String elementName) |
int |
getObjectValueType(String elementName) |
protected String |
getResourceBaseName() |
String |
getRootName() |
static IIOMetadataFormat |
getStandardFormatInstance() |
boolean |
isAttributeRequired(String elementName,
String attrName) |
protected void |
removeAttribute(String elementName,
String attrName) |
protected void |
removeElement(String elementName) |
protected void |
removeObjectValue(String elementName) |
protected void |
setResourceBaseName(String resourceBaseName) |
public static final String standardMetadataFormatName
public IIOMetadataFormatImpl(String rootName, int childPolicy)
rootName - the root element namechildPolicy - the child policy of the root elementIllegalArgumentException - if rootName is nullIllegalArgumentException - if childPolicy is
CHILD_POLICY_REPEAT or if childPolicy is not a CHILD_POLICY
constantpublic IIOMetadataFormatImpl(String rootName, int minChildren, int maxChildren)
rootName - the root element nameminChildren - the minimum number of children that this node
can havemaxChildren - the maximum number of children that this node
can haveIllegalArgumentException - if rootName is nullIllegalArgumentException - if minChildren is less than
zero or greater than maxChildrenprotected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue)
protected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, List<String> enumeratedValues)
protected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, String minValue, String maxValue, boolean minInclusive, boolean maxInclusive)
protected void addAttribute(String elementName, String attrName, int dataType, boolean required, int listMinLength, int listMaxLength)
protected void addBooleanAttribute(String elementName, String attrName, boolean hasDefaultValue, boolean defaultValue)
protected void addChildElement(String elementName, String parentName)
protected void addElement(String elementName, String parentName, int childPolicy)
protected void addElement(String elementName, String parentName, int minChildren, int maxChildren)
protected <T> void addObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue)
protected <T> void addObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue, List<? extends T> enumeratedValues)
protected <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)
protected void addObjectValue(String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength)
public String getRootName()
getRootName in interface IIOMetadataFormatprotected String getResourceBaseName()
public static IIOMetadataFormat getStandardFormatInstance()
public abstract boolean canNodeAppear(String elementName, ImageTypeSpecifier specifier)
canNodeAppear in interface IIOMetadataFormatprotected void removeAttribute(String elementName, String attrName)
protected void removeElement(String elementName)
protected void removeObjectValue(String elementName)
protected void setResourceBaseName(String resourceBaseName)
public int getAttributeDataType(String elementName, String attrName)
getAttributeDataType in interface IIOMetadataFormatpublic String getAttributeDefaultValue(String elementName, String attrName)
getAttributeDefaultValue in interface IIOMetadataFormatpublic String getAttributeDescription(String elementName, String attrName, Locale locale)
getAttributeDescription in interface IIOMetadataFormatpublic String[] getAttributeEnumerations(String elementName, String attrName)
getAttributeEnumerations in interface IIOMetadataFormatpublic int getAttributeListMaxLength(String elementName, String attrName)
getAttributeListMaxLength in interface IIOMetadataFormatpublic int getAttributeListMinLength(String elementName, String attrName)
getAttributeListMinLength in interface IIOMetadataFormatpublic String getAttributeMaxValue(String elementName, String attrName)
getAttributeMaxValue in interface IIOMetadataFormatpublic String getAttributeMinValue(String elementName, String attrName)
getAttributeMinValue in interface IIOMetadataFormatpublic String[] getAttributeNames(String elementName)
getAttributeNames in interface IIOMetadataFormatpublic int getAttributeValueType(String elementName, String attrName)
getAttributeValueType in interface IIOMetadataFormatpublic String[] getChildNames(String elementName)
getChildNames in interface IIOMetadataFormatpublic int getChildPolicy(String elementName)
getChildPolicy in interface IIOMetadataFormatpublic String getElementDescription(String elementName, Locale locale)
getElementDescription in interface IIOMetadataFormatpublic int getElementMaxChildren(String elementName)
getElementMaxChildren in interface IIOMetadataFormatpublic int getElementMinChildren(String elementName)
getElementMinChildren in interface IIOMetadataFormatpublic int getObjectArrayMaxLength(String elementName)
getObjectArrayMaxLength in interface IIOMetadataFormatpublic int getObjectArrayMinLength(String elementName)
getObjectArrayMinLength in interface IIOMetadataFormatpublic Class<?> getObjectClass(String elementName)
getObjectClass in interface IIOMetadataFormatpublic Object getObjectDefaultValue(String elementName)
getObjectDefaultValue in interface IIOMetadataFormatpublic Object[] getObjectEnumerations(String elementName)
getObjectEnumerations in interface IIOMetadataFormatpublic Comparable<?> getObjectMaxValue(String elementName)
getObjectMaxValue in interface IIOMetadataFormatpublic Comparable<?> getObjectMinValue(String elementName)
getObjectMinValue in interface IIOMetadataFormatpublic int getObjectValueType(String elementName)
getObjectValueType in interface IIOMetadataFormatpublic boolean isAttributeRequired(String elementName, String attrName)
isAttributeRequired in interface IIOMetadataFormat