javax.imageio.metadata

Class IIOMetadataFormatImpl

public abstract class IIOMetadataFormatImpl extends Object implements IIOMetadataFormat

Field Summary
static StringstandardMetadataFormatName
The standard metadata format name constant set to "javax_imageio_1.0".
Constructor Summary
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.
Method Summary
protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue)
protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, List<String> enumeratedValues)
protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, String minValue, String maxValue, boolean minInclusive, boolean maxInclusive)
protected voidaddAttribute(String elementName, String attrName, int dataType, boolean required, int listMinLength, int listMaxLength)
protected voidaddBooleanAttribute(String elementName, String attrName, boolean hasDefaultValue, boolean defaultValue)
protected voidaddChildElement(String elementName, String parentName)
protected voidaddElement(String elementName, String parentName, int childPolicy)
protected voidaddElement(String elementName, String parentName, int minChildren, int maxChildren)
protected <T> voidaddObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue)
protected <T> voidaddObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue, List<? extends T> enumeratedValues)
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)
protected voidaddObjectValue(String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength)
abstract booleancanNodeAppear(String elementName, ImageTypeSpecifier specifier)
intgetAttributeDataType(String elementName, String attrName)
StringgetAttributeDefaultValue(String elementName, String attrName)
StringgetAttributeDescription(String elementName, String attrName, Locale locale)
String[]getAttributeEnumerations(String elementName, String attrName)
intgetAttributeListMaxLength(String elementName, String attrName)
intgetAttributeListMinLength(String elementName, String attrName)
StringgetAttributeMaxValue(String elementName, String attrName)
StringgetAttributeMinValue(String elementName, String attrName)
String[]getAttributeNames(String elementName)
intgetAttributeValueType(String elementName, String attrName)
String[]getChildNames(String elementName)
intgetChildPolicy(String elementName)
StringgetElementDescription(String elementName, Locale locale)
intgetElementMaxChildren(String elementName)
intgetElementMinChildren(String elementName)
intgetObjectArrayMaxLength(String elementName)
intgetObjectArrayMinLength(String elementName)
Class<?>getObjectClass(String elementName)
ObjectgetObjectDefaultValue(String elementName)
Object[]getObjectEnumerations(String elementName)
Comparable<?>getObjectMaxValue(String elementName)
Comparable<?>getObjectMinValue(String elementName)
intgetObjectValueType(String elementName)
protected StringgetResourceBaseName()
StringgetRootName()
static IIOMetadataFormatgetStandardFormatInstance()
booleanisAttributeRequired(String elementName, String attrName)
protected voidremoveAttribute(String elementName, String attrName)
protected voidremoveElement(String elementName)
protected voidremoveObjectValue(String elementName)
protected voidsetResourceBaseName(String resourceBaseName)

Field Detail

standardMetadataFormatName

public static final String standardMetadataFormatName
The standard metadata format name constant set to "javax_imageio_1.0".

Constructor Detail

IIOMetadataFormatImpl

public IIOMetadataFormatImpl(String rootName, int childPolicy)
Construct a blank IIOMetadataFormatImpl with the given root name and child policy.

Parameters: rootName the root element name childPolicy the child policy of the root element

Throws: IllegalArgumentException if rootName is null IllegalArgumentException if childPolicy is CHILD_POLICY_REPEAT or if childPolicy is not a CHILD_POLICY constant

IIOMetadataFormatImpl

public 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.

Parameters: rootName the root element name minChildren the minimum number of children that this node can have maxChildren the maximum number of children that this node can have

Throws: IllegalArgumentException if rootName is null IllegalArgumentException if minChildren is less than zero or greater than maxChildren

Method Detail

addAttribute

protected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue)

addAttribute

protected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, List<String> enumeratedValues)

addAttribute

protected void addAttribute(String elementName, String attrName, int dataType, boolean required, String defaultValue, String minValue, String maxValue, boolean minInclusive, boolean maxInclusive)

addAttribute

protected void addAttribute(String elementName, String attrName, int dataType, boolean required, int listMinLength, int listMaxLength)

addBooleanAttribute

protected void addBooleanAttribute(String elementName, String attrName, boolean hasDefaultValue, boolean defaultValue)

addChildElement

protected void addChildElement(String elementName, String parentName)

addElement

protected void addElement(String elementName, String parentName, int childPolicy)

addElement

protected void addElement(String elementName, String parentName, int minChildren, int maxChildren)

addObjectValue

protected <T> void addObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue)

addObjectValue

protected <T> void addObjectValue(String elementName, Class<T> classType, boolean required, T defaultValue, List<? extends T> enumeratedValues)

addObjectValue

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)

addObjectValue

protected void addObjectValue(String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength)

canNodeAppear

public abstract boolean canNodeAppear(String elementName, ImageTypeSpecifier specifier)

getAttributeDataType

public int getAttributeDataType(String elementName, String attrName)

getAttributeDefaultValue

public String getAttributeDefaultValue(String elementName, String attrName)

getAttributeDescription

public String getAttributeDescription(String elementName, String attrName, Locale locale)

getAttributeEnumerations

public String[] getAttributeEnumerations(String elementName, String attrName)

getAttributeListMaxLength

public int getAttributeListMaxLength(String elementName, String attrName)

getAttributeListMinLength

public int getAttributeListMinLength(String elementName, String attrName)

getAttributeMaxValue

public String getAttributeMaxValue(String elementName, String attrName)

getAttributeMinValue

public String getAttributeMinValue(String elementName, String attrName)

getAttributeNames

public String[] getAttributeNames(String elementName)

getAttributeValueType

public int getAttributeValueType(String elementName, String attrName)

getChildNames

public String[] getChildNames(String elementName)

getChildPolicy

public int getChildPolicy(String elementName)

getElementDescription

public String getElementDescription(String elementName, Locale locale)

getElementMaxChildren

public int getElementMaxChildren(String elementName)

getElementMinChildren

public int getElementMinChildren(String elementName)

getObjectArrayMaxLength

public int getObjectArrayMaxLength(String elementName)

getObjectArrayMinLength

public int getObjectArrayMinLength(String elementName)

getObjectClass

public Class<?> getObjectClass(String elementName)

getObjectDefaultValue

public Object getObjectDefaultValue(String elementName)

getObjectEnumerations

public Object[] getObjectEnumerations(String elementName)

getObjectMaxValue

public Comparable<?> getObjectMaxValue(String elementName)

getObjectMinValue

public Comparable<?> getObjectMinValue(String elementName)

getObjectValueType

public int getObjectValueType(String elementName)

getResourceBaseName

protected String getResourceBaseName()

getRootName

public String getRootName()

getStandardFormatInstance

public static IIOMetadataFormat getStandardFormatInstance()

isAttributeRequired

public boolean isAttributeRequired(String elementName, String attrName)

removeAttribute

protected void removeAttribute(String elementName, String attrName)

removeElement

protected void removeElement(String elementName)

removeObjectValue

protected void removeObjectValue(String elementName)

setResourceBaseName

protected void setResourceBaseName(String resourceBaseName)