001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package javax.imageio.metadata;
019:
020: import javax.imageio.ImageTypeSpecifier;
021: import java.util.Locale;
022:
023: public interface IIOMetadataFormat {
024:
025: int CHILD_POLICY_EMPTY = 0;
026: int CHILD_POLICY_ALL = 1;
027: int CHILD_POLICY_SOME = 2;
028: int CHILD_POLICY_CHOICE = 3;
029: int CHILD_POLICY_SEQUENCE = 4;
030: int CHILD_POLICY_REPEAT = 5;
031: int CHILD_POLICY_MAX = CHILD_POLICY_REPEAT;
032:
033: int DATATYPE_STRING = 0;
034: int DATATYPE_BOOLEAN = 1;
035: int DATATYPE_INTEGER = 2;
036: int DATATYPE_FLOAT = 3;
037: int DATATYPE_DOUBLE = 4;
038:
039: int VALUE_NONE = 0;
040: int VALUE_ARBITRARY = 1;
041: int VALUE_RANGE = 2;
042: int VALUE_RANGE_MIN_INCLUSIVE_MASK = 4;
043: int VALUE_RANGE_MAX_INCLUSIVE_MASK = 8;
044: int VALUE_ENUMERATION = 16;
045: int VALUE_LIST = 32;
046: int VALUE_RANGE_MIN_INCLUSIVE = VALUE_RANGE
047: | VALUE_RANGE_MIN_INCLUSIVE_MASK;
048: int VALUE_RANGE_MAX_INCLUSIVE = VALUE_RANGE
049: | VALUE_RANGE_MAX_INCLUSIVE_MASK;
050: int VALUE_RANGE_MIN_MAX_INCLUSIVE = VALUE_RANGE
051: | VALUE_RANGE_MIN_INCLUSIVE_MASK
052: | VALUE_RANGE_MAX_INCLUSIVE_MASK;
053:
054: boolean canNodeAppear(String elementName,
055: ImageTypeSpecifier imageType);
056:
057: int getAttributeDataType(String elementName, String attrName);
058:
059: String getAttributeDefaultValue(String elementName, String attrName);
060:
061: String getAttributeDescription(String elementName, String attrName,
062: Locale locale);
063:
064: String[] getAttributeEnumerations(String elementName,
065: String attrName);
066:
067: int getAttributeListMaxLength(String elementName, String attrName);
068:
069: int getAttributeListMinLength(String elementName, String attrName);
070:
071: String getAttributeMaxValue(String elementName, String attrName);
072:
073: String getAttributeMinValue(String elementName, String attrName);
074:
075: String[] getAttributeNames(String elementName);
076:
077: int getAttributeValueType(String elementName, String attrName);
078:
079: boolean isAttributeRequired(String elementName, String attrName);
080:
081: String[] getChildNames(String elementName);
082:
083: int getChildPolicy(String elementName);
084:
085: String getElementDescription(String elementName, Locale locale);
086:
087: int getElementMaxChildren(String elementName);
088:
089: int getElementMinChildren(String elementName);
090:
091: int getObjectArrayMaxLength(String elementName);
092:
093: int getObjectArrayMinLength(String elementName);
094:
095: Class<?> getObjectClass(String elementName);
096:
097: Object getObjectDefaultValue(String elementName);
098:
099: Object[] getObjectEnumerations(String elementName);
100:
101: Comparable<?> getObjectMaxValue(String elementName);
102:
103: Comparable<?> getObjectMinValue(String elementName);
104:
105: int getObjectValueType(String elementName);
106:
107: String getRootName();
108: }
|