Java Doc for IIOMetadataFormat.java in  » 6.0-JDK-Core » image » javax » imageio » metadata » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » image » javax.imageio.metadata 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.imageio.metadata.IIOMetadataFormat

All known Subclasses:   javax.imageio.metadata.IIOMetadataFormatImpl,
IIOMetadataFormat
public interface IIOMetadataFormat (Code)
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.

version:
   0.5


Field Summary
 intCHILD_POLICY_ALL
     A constant returned by getChildPolicy to indicate that an element must have a single instance of each of its legal child elements, in order.
 intCHILD_POLICY_CHOICE
     A constant returned by getChildPolicy to indicate that an element must have zero or one children, selected from among its legal child elements.
 intCHILD_POLICY_EMPTY
     A constant returned by getChildPolicy to indicate that an element may not have any children.
 intCHILD_POLICY_MAX
     The largest valid CHILD_POLICY_* constant, to be used for range checks.
 intCHILD_POLICY_REPEAT
     A constant returned by getChildPolicy to indicate that an element must have zero or more instances of its unique legal child element.
 intCHILD_POLICY_SEQUENCE
     A constant returned by getChildPolicy to indicate that an element must have a sequence of instances of any of its legal child elements.
 intCHILD_POLICY_SOME
     A constant returned by getChildPolicy to indicate that an element must have zero or one instance of each of its legal child elements, in order.
 intDATATYPE_BOOLEAN
     A constant returned by getAttributeDataType indicating that the value of an attribute is one of 'true' or 'false'.
 intDATATYPE_DOUBLE
     A constant returned by getAttributeDataType indicating that the value of an attribute is a string representation of a double-precision decimal floating-point number.
 intDATATYPE_FLOAT
     A constant returned by getAttributeDataType indicating that the value of an attribute is a string representation of a decimal floating-point number.
 intDATATYPE_INTEGER
     A constant returned by getAttributeDataType indicating that the value of an attribute is a string representation of an integer.
 intDATATYPE_STRING
     A constant returned by getAttributeDataType indicating that the value of an attribute is a general Unicode string.
 intVALUE_ARBITRARY
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set a single, arbitrary value.
 intVALUE_ENUMERATION
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set one of a number of enumerated values.
 intVALUE_LIST
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set to a list or array of values.
 intVALUE_NONE
     A constant returned by getObjectValueType to indicate the absence of a user object.
 intVALUE_RANGE
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set a range of values.
 intVALUE_RANGE_MAX_INCLUSIVE
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set to a range of values.
 intVALUE_RANGE_MAX_INCLUSIVE_MASK
     A value that may be or'ed with VALUE_RANGE to obtain VALUE_RANGE_MAX_INCLUSIVE, and with VALUE_RANGE_MIN_INCLUSIVE to obtain VALUE_RANGE_MIN_MAX_INCLUSIVE.
 intVALUE_RANGE_MIN_INCLUSIVE
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set to a range of values.
 intVALUE_RANGE_MIN_INCLUSIVE_MASK
     A value that may be or'ed with VALUE_RANGE to obtain VALUE_RANGE_MIN_INCLUSIVE, and with VALUE_RANGE_MAX_INCLUSIVE to obtain VALUE_RANGE_MIN_MAX_INCLUSIVE.
 intVALUE_RANGE_MIN_MAX_INCLUSIVE
     A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set a range of values.


Method Summary
 booleancanNodeAppear(String elementName, ImageTypeSpecifier imageType)
     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. For example, a metadata document format might contain an element that describes the primary colors of the image, which would not be allowed when writing a grayscale image.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  imageType - an ImageTypeSpecifier indicatingthe type of the image that will be associated with themetadata.
 intgetAttributeDataType(String elementName, String attrName)
     Returns one of the constants starting with DATATYPE_, indicating the format and interpretation of the value of the given attribute within th enamed element.
 StringgetAttributeDefaultValue(String elementName, String attrName)
     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.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried.
 StringgetAttributeDescription(String elementName, String attrName, Locale locale)
     Returns a String containing a description of the named attribute, or null.
 String[]getAttributeEnumerations(String elementName, String attrName)
     Returns an array of Strings containing the legal enumerated values for the given attribute within the named element.
 intgetAttributeListMaxLength(String elementName, String attrName)
     Returns the maximum number of list items that may be used to define this attribute.
 intgetAttributeListMinLength(String elementName, String attrName)
     Returns the minimum number of list items that may be used to define this attribute.
 StringgetAttributeMaxValue(String elementName, String attrName)
     Returns the maximum legal value for the attribute.
 StringgetAttributeMinValue(String elementName, String attrName)
     Returns the minimum legal value for the attribute.
 String[]getAttributeNames(String elementName)
     Returns an array of Strings listing the names of the attributes that may be associated with the named element.
Parameters:
  elementName - the name of the element being queried.
 intgetAttributeValueType(String elementName, String attrName)
     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.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried.
 String[]getChildNames(String elementName)
     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.
 intgetChildPolicy(String elementName)
     Returns one of the constants starting with CHILD_POLICY_, indicating the legal pattern of children for the named element.
Parameters:
  elementName - the name of the element being queried.
 StringgetElementDescription(String elementName, Locale locale)
     Returns a String containing a description of the named element, or null.
 intgetElementMaxChildren(String elementName)
     Returns the maximum number of children of the named element with child policy CHILD_POLICY_REPEAT.
 intgetElementMinChildren(String elementName)
     Returns the minimum number of children of the named element with child policy CHILD_POLICY_REPEAT.
 intgetObjectArrayMaxLength(String elementName)
     Returns the maximum number of array elements that may be used to define the Object reference within the named element.
 intgetObjectArrayMinLength(String elementName)
     Returns the minimum number of array elements that may be used to define the Object reference within the named element.
 ClassgetObjectClass(String elementName)
     Returns the Class type of the Object reference stored within the element.
 ObjectgetObjectDefaultValue(String elementName)
     Returns an Objects containing the default value for the Object reference within the named element.
Parameters:
  elementName - the name of the element being queried.
 Object[]getObjectEnumerations(String elementName)
     Returns an array of Objects containing the legal enumerated values for the Object reference within the named element.
 ComparablegetObjectMaxValue(String elementName)
     Returns the maximum legal value for the Object reference within the named element.
 ComparablegetObjectMinValue(String elementName)
     Returns the minimum legal value for the Object reference within the named element.
 intgetObjectValueType(String elementName)
     Returns one of the enumerated values starting with VALUE_, indicating the type of values (enumeration, range, or array) that are allowed for the Object reference.
 StringgetRootName()
     Returns the name of the root element of the format.
 booleanisAttributeRequired(String elementName, String attrName)
     Returns true if the named attribute must be present within the named element.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried.

Field Detail
CHILD_POLICY_ALL
int CHILD_POLICY_ALL(Code)
A constant returned by getChildPolicy to indicate that an element must have a single instance of each of its legal child elements, in order. In DTD terms, the contents of the element are defined by a sequence a,b,c,d,....



CHILD_POLICY_CHOICE
int CHILD_POLICY_CHOICE(Code)
A constant returned by getChildPolicy to indicate that an element must have zero or one children, selected from among its legal child elements. In DTD terms, the contents of the element are defined by a selection a|b|c|d|....



CHILD_POLICY_EMPTY
int CHILD_POLICY_EMPTY(Code)
A constant returned by getChildPolicy to indicate that an element may not have any children. In other words, it is required to be a leaf node.



CHILD_POLICY_MAX
int CHILD_POLICY_MAX(Code)
The largest valid CHILD_POLICY_* constant, to be used for range checks.



CHILD_POLICY_REPEAT
int CHILD_POLICY_REPEAT(Code)
A constant returned by getChildPolicy to indicate that an element must have zero or more instances of its unique legal child element. In DTD terms, the contents of the element are defined by a starred expression a*.



CHILD_POLICY_SEQUENCE
int CHILD_POLICY_SEQUENCE(Code)
A constant returned by getChildPolicy to indicate that an element must have a sequence of instances of any of its legal child elements. In DTD terms, the contents of the element are defined by a sequence (a|b|c|d|...)*.



CHILD_POLICY_SOME
int CHILD_POLICY_SOME(Code)
A constant returned by getChildPolicy to indicate that an element must have zero or one instance of each of its legal child elements, in order. In DTD terms, the contents of the element are defined by a sequence a?,b?,c?,d?,....



DATATYPE_BOOLEAN
int DATATYPE_BOOLEAN(Code)
A constant returned by getAttributeDataType indicating that the value of an attribute is one of 'true' or 'false'.



DATATYPE_DOUBLE
int DATATYPE_DOUBLE(Code)
A constant returned by getAttributeDataType indicating that the value of an attribute is a string representation of a double-precision decimal floating-point number.



DATATYPE_FLOAT
int DATATYPE_FLOAT(Code)
A constant returned by getAttributeDataType indicating that the value of an attribute is a string representation of a decimal floating-point number.



DATATYPE_INTEGER
int DATATYPE_INTEGER(Code)
A constant returned by getAttributeDataType indicating that the value of an attribute is a string representation of an integer.



DATATYPE_STRING
int DATATYPE_STRING(Code)
A constant returned by getAttributeDataType indicating that the value of an attribute is a general Unicode string.



VALUE_ARBITRARY
int VALUE_ARBITRARY(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set a single, arbitrary value.



VALUE_ENUMERATION
int VALUE_ENUMERATION(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set one of a number of enumerated values. In the case of attributes, these values are Strings; for objects, they are Objects implementing a given class or interface.

Attribute values of type DATATYPE_BOOLEAN should be marked as enumerations.




VALUE_LIST
int VALUE_LIST(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set to a list or array of values. In the case of attributes, the list will consist of whitespace-separated values within a String; for objects, an array will be used.



VALUE_NONE
int VALUE_NONE(Code)
A constant returned by getObjectValueType to indicate the absence of a user object.



VALUE_RANGE
int VALUE_RANGE(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set a range of values. Both the minimum and maximum values of the range are exclusive. It is recommended that ranges of integers be inclusive on both ends, and that exclusive ranges be used only for floating-point data.
See Also:   IIOMetadataFormat.VALUE_RANGE_MIN_MAX_INCLUSIVE



VALUE_RANGE_MAX_INCLUSIVE
int VALUE_RANGE_MAX_INCLUSIVE(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set to a range of values. The maximum (but not the minimum) value of the range is inclusive.



VALUE_RANGE_MAX_INCLUSIVE_MASK
int VALUE_RANGE_MAX_INCLUSIVE_MASK(Code)
A value that may be or'ed with VALUE_RANGE to obtain VALUE_RANGE_MAX_INCLUSIVE, and with VALUE_RANGE_MIN_INCLUSIVE to obtain VALUE_RANGE_MIN_MAX_INCLUSIVE.

Similarly, the value may be and'ed with the value of getAttributeValueTypeor getObjectValueType to determine if the maximum value of the range is inclusive.




VALUE_RANGE_MIN_INCLUSIVE
int VALUE_RANGE_MIN_INCLUSIVE(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set to a range of values. The minimum (but not the maximum) value of the range is inclusive.



VALUE_RANGE_MIN_INCLUSIVE_MASK
int VALUE_RANGE_MIN_INCLUSIVE_MASK(Code)
A value that may be or'ed with VALUE_RANGE to obtain VALUE_RANGE_MIN_INCLUSIVE, and with VALUE_RANGE_MAX_INCLUSIVE to obtain VALUE_RANGE_MIN_MAX_INCLUSIVE.

Similarly, the value may be and'ed with the value of getAttributeValueTypeor getObjectValueType to determine if the minimum value of the range is inclusive.




VALUE_RANGE_MIN_MAX_INCLUSIVE
int VALUE_RANGE_MIN_MAX_INCLUSIVE(Code)
A constant returned by getAttributeValueType and getObjectValueType to indicate that the attribute or user object may be set a range of values. Both the minimum and maximum values of the range are inclusive. It is recommended that ranges of integers be inclusive on both ends, and that exclusive ranges be used only for floating-point data.





Method Detail
canNodeAppear
boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType)(Code)
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. For example, a metadata document format might contain an element that describes the primary colors of the image, which would not be allowed when writing a grayscale image.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  imageType - an ImageTypeSpecifier indicatingthe type of the image that will be associated with themetadata. true if the node is meaningful for imagesof the given type.



getAttributeDataType
int getAttributeDataType(String elementName, String attrName)(Code)
Returns one of the constants starting with DATATYPE_, indicating the format and interpretation of the value of the given attribute within th enamed element. If getAttributeValueType returns VALUE_LIST, then the legal value is a whitespace-spearated list of values of the returned datatype.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. one of the DATATYPE_* constants.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.



getAttributeDefaultValue
String getAttributeDefaultValue(String elementName, String attrName)(Code)
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.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. a String containing the default value, ornull.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.



getAttributeDescription
String getAttributeDescription(String elementName, String attrName, Locale locale)(Code)
Returns a String containing a description of the named attribute, or null. The desciption will be localized for the supplied Locale if possible.

If locale is null, the current default Locale returned by Locale.getLocale will be used.
Parameters:
  elementName - the name of the element.
Parameters:
  attrName - the name of the attribute.
Parameters:
  locale - the Locale for which localizationwill be attempted. the attribute description.
exception:
  IllegalArgumentException - if elementNameis null, or is not a legal element name for this format.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.




getAttributeEnumerations
String[] getAttributeEnumerations(String elementName, String attrName)(Code)
Returns an array of Strings containing the legal enumerated values for the given attribute within the named element. This method should only be called if getAttributeValueType returns VALUE_ENUMERATION.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. an array of Strings.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.
exception:
  IllegalArgumentException - if the given attribute isnot defined as an enumeration.



getAttributeListMaxLength
int getAttributeListMaxLength(String elementName, String attrName)(Code)
Returns the maximum number of list items that may be used to define this attribute. A value of Integer.MAX_VALUE may be used to specify that there is no upper bound. The attribute itself is defined as a String containing multiple whitespace-separated items. This method should only be called if getAttributeValueType returns VALUE_LIST.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. the largest legal number of list items for theattribute.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.
exception:
  IllegalArgumentException - if the given attribute isnot defined as a list.



getAttributeListMinLength
int getAttributeListMinLength(String elementName, String attrName)(Code)
Returns the minimum number of list items that may be used to define this attribute. The attribute itself is defined as a String containing multiple whitespace-separated items. This method should only be called if getAttributeValueType returns VALUE_LIST.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. the smallest legal number of list items for theattribute.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.
exception:
  IllegalArgumentException - if the given attribute isnot defined as a list.



getAttributeMaxValue
String getAttributeMaxValue(String elementName, String attrName)(Code)
Returns the maximum legal value for the attribute. Whether this value is inclusive or exclusive may be determined by the value of getAttributeValueType. The value is returned as a String; its interpretation is dependent on the value of getAttributeDataType. This method should only be called if getAttributeValueType returns VALUE_RANGE_*.
Parameters:
  elementName - the name of the element being queried, as aString.
Parameters:
  attrName - the name of the attribute being queried. a String containing the largest legalvalue for the attribute.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.
exception:
  IllegalArgumentException - if the given attribute isnot defined as a range.



getAttributeMinValue
String getAttributeMinValue(String elementName, String attrName)(Code)
Returns the minimum legal value for the attribute. Whether this value is inclusive or exclusive may be determined by the value of getAttributeValueType. The value is returned as a String; its interpretation is dependent on the value of getAttributeDataType. This method should only be called if getAttributeValueType returns VALUE_RANGE_*.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. a String containing the smallest legalvalue for the attribute.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.
exception:
  IllegalArgumentException - if the given attribute isnot defined as a range.



getAttributeNames
String[] getAttributeNames(String elementName)(Code)
Returns an array of Strings listing the names of the attributes that may be associated with the named element.
Parameters:
  elementName - the name of the element being queried. an array of Strings.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.



getAttributeValueType
int getAttributeValueType(String elementName, String attrName)(Code)
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.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. one of the VALUE_* constants.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.



getChildNames
String[] getChildNames(String elementName)(Code)
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. If the element cannot have children, null is returned.
Parameters:
  elementName - the name of the element being queried. an array of Strings, or null.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.



getChildPolicy
int getChildPolicy(String elementName)(Code)
Returns one of the constants starting with CHILD_POLICY_, indicating the legal pattern of children for the named element.
Parameters:
  elementName - the name of the element being queried. one of the CHILD_POLICY_* constants.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.



getElementDescription
String getElementDescription(String elementName, Locale locale)(Code)
Returns a String containing a description of the named element, or null. The desciption will be localized for the supplied Locale if possible.

If locale is null, the current default Locale returned by Locale.getLocale will be used.
Parameters:
  elementName - the name of the element.
Parameters:
  locale - the Locale for which localizationwill be attempted. the element description.
exception:
  IllegalArgumentException - if elementNameis null, or is not a legal element name for this format.




getElementMaxChildren
int getElementMaxChildren(String elementName)(Code)
Returns the maximum number of children of the named element with child policy CHILD_POLICY_REPEAT. For example, an element representing an entry in an 8-bit color palette might be allowed to repeat up to 256 times. A value of Integer.MAX_VALUE may be used to specify that there is no upper bound.
Parameters:
  elementName - the name of the element being queried. an int.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element doesnot have a child policy of CHILD_POLICY_REPEAT.



getElementMinChildren
int getElementMinChildren(String elementName)(Code)
Returns the minimum number of children of the named element with child policy CHILD_POLICY_REPEAT. For example, an element representing color primary information might be required to have at least 3 children, one for each primay.
Parameters:
  elementName - the name of the element being queried. an int.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element doesnot have a child policy of CHILD_POLICY_REPEAT.



getObjectArrayMaxLength
int getObjectArrayMaxLength(String elementName)(Code)
Returns the maximum number of array elements that may be used to define the Object reference within the named element. A value of Integer.MAX_VALUE may be used to specify that there is no upper bound. This method should only be called if getObjectValueType returns VALUE_LIST.
Parameters:
  elementName - the name of the element being queried. the largest valid array length for theObject reference.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).
exception:
  IllegalArgumentException - if the Object is notan array.



getObjectArrayMinLength
int getObjectArrayMinLength(String elementName)(Code)
Returns the minimum number of array elements that may be used to define the Object reference within the named element. This method should only be called if getObjectValueType returns VALUE_LIST.
Parameters:
  elementName - the name of the element being queried. the smallest valid array length for theObject reference.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).
exception:
  IllegalArgumentException - if the Object is notan array.



getObjectClass
Class getObjectClass(String elementName)(Code)
Returns the Class type of the Object reference stored within the element. If this element may not contain an Object reference, an IllegalArgumentException will be thrown. If the class type is an array, this field indicates the underlying class type (e.g, for an array of ints, this method would return int.class).

Object references whose legal values are defined as a range must implement the Comparable interface.
Parameters:
  elementName - the name of the element being queried. a Class object.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).




getObjectDefaultValue
Object getObjectDefaultValue(String elementName)(Code)
Returns an Objects containing the default value for the Object reference within the named element.
Parameters:
  elementName - the name of the element being queried. an Object.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).



getObjectEnumerations
Object[] getObjectEnumerations(String elementName)(Code)
Returns an array of Objects containing the legal enumerated values for the Object reference within the named element. This method should only be called if getObjectValueType returns VALUE_ENUMERATION.

The Object associated with a node that accepts emuerated values must be equal to one of the values returned by this method, as defined by the == operator (as opposed to the Object.equals method).
Parameters:
  elementName - the name of the element being queried. an array of Objects.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).
exception:
  IllegalArgumentException - if the Objectis not defined as an enumeration.




getObjectMaxValue
Comparable getObjectMaxValue(String elementName)(Code)
Returns the maximum legal value for the Object reference within the named element. Whether this value is inclusive or exclusive may be determined by the value of getObjectValueType. This method should only be called if getObjectValueType returns one of the constants starting with VALUE_RANGE. the smallest legal value for the attribute.
Parameters:
  elementName - the name of the element being queried.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).
exception:
  IllegalArgumentException - if the Objectis not defined as a range.



getObjectMinValue
Comparable getObjectMinValue(String elementName)(Code)
Returns the minimum legal value for the Object reference within the named element. Whether this value is inclusive or exclusive may be determined by the value of getObjectValueType. This method should only be called if getObjectValueType returns one of the constants starting with VALUE_RANGE.
Parameters:
  elementName - the name of the element being queried. the smallest legal value for the attribute.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if the named element cannotcontain an object value (i.e., ifgetObjectValueType(elementName) == VALUE_NONE).
exception:
  IllegalArgumentException - if the Objectis not defined as a range.



getObjectValueType
int getObjectValueType(String elementName)(Code)
Returns one of the enumerated values starting with VALUE_, indicating the type of values (enumeration, range, or array) that are allowed for the Object reference. If no object value can be stored within the given element, the result of this method will be VALUE_NONE.

Object references whose legal values are defined as a range must implement the Comparable interface.
Parameters:
  elementName - the name of the element being queried. one of the VALUE_* constants.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
See Also:   Comparable




getRootName
String getRootName()(Code)
Returns the name of the root element of the format. a String.



isAttributeRequired
boolean isAttributeRequired(String elementName, String attrName)(Code)
Returns true if the named attribute must be present within the named element.
Parameters:
  elementName - the name of the element being queried.
Parameters:
  attrName - the name of the attribute being queried. true if the attribut must be present.
exception:
  IllegalArgumentException - if elementNameis null or is not a legal element name for thisformat.
exception:
  IllegalArgumentException - if attrName isnull or is not a legal attribute name for thiselement.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.