jdk/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java
author malenkov
Tue, 29 Oct 2013 17:01:06 +0400
changeset 21278 ef8a3a2a72f2
parent 5506 202f599c92aa
child 23010 6dadb192ad81
child 23312 4711f66e7d5c
permissions -rw-r--r--
8022746: List of spelling errors in API doc Reviewed-by: alexsch, smarks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package com.sun.imageio.plugins.common;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.util.ArrayList;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.util.List;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.imageio.ImageTypeSpecifier;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import javax.imageio.metadata.IIOMetadataFormatImpl;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
public class StandardMetadataFormat extends IIOMetadataFormatImpl {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
    35
    // Utility method for nodes with a single attribute named "value"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
    private void addSingleAttributeElement(String elementName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
                                           String parentName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
                                           int dataType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
        addElement(elementName, parentName, CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
        addAttribute(elementName, "value", dataType, true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    public StandardMetadataFormat() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
        super(standardMetadataFormatName, CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
        List values;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        // root -> Chroma
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        addElement("Chroma", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
                   CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        // root -> Chroma -> ColorSpaceType
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        addElement("ColorSpaceType", "Chroma",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        values.add("XYZ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        values.add("Lab");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        values.add("Luv");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        values.add("YCbCr");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        values.add("Yxy");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        values.add("YCCK");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        values.add("PhotoYCC");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        values.add("RGB");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        values.add("GRAY");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        values.add("HSV");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        values.add("HLS");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        values.add("CMYK");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        values.add("CMY");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        values.add("2CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        values.add("3CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        values.add("4CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        values.add("5CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        values.add("6CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        values.add("7CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        values.add("8CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        values.add("9CLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        values.add("ACLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        values.add("BCLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        values.add("CCLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        values.add("DCLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        values.add("ECLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        values.add("FCLR");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        addAttribute("ColorSpaceType",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                     "name",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        // root -> Chroma -> NumChannels
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        addElement("NumChannels", "Chroma",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        addAttribute("NumChannels", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                     0, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        // root -> Chroma -> Gamma
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        addElement("Gamma", "Chroma", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        addAttribute("Gamma", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                     DATATYPE_FLOAT, true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        // root -> Chroma -> BlackIsZero
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        addElement("BlackIsZero", "Chroma", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        addBooleanAttribute("BlackIsZero", "value", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        // root -> Chroma -> Palette
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        addElement("Palette", "Chroma", 0, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        // root -> Chroma -> PaletteEntry
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        addElement("PaletteEntry", "Palette", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        addAttribute("PaletteEntry", "index", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        addAttribute("PaletteEntry", "red", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        addAttribute("PaletteEntry", "green", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        addAttribute("PaletteEntry", "blue", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        addAttribute("PaletteEntry", "alpha", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                     false, "255");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        // root -> Chroma -> BackgroundIndex
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        addElement("BackgroundIndex", "Chroma", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        addAttribute("BackgroundIndex", "value", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        // root -> Chroma -> BackgroundColor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        addElement("BackgroundColor", "Chroma", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        addAttribute("BackgroundColor", "red", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        addAttribute("BackgroundColor", "green", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        addAttribute("BackgroundColor", "blue", DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                     true, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        // root -> Compression
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        addElement("Compression", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                   CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        // root -> Compression -> CompressionTypeName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        addSingleAttributeElement("CompressionTypeName",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                                  "Compression",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                                  DATATYPE_STRING);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        // root -> Compression -> Lossless
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        addElement("Lossless", "Compression", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        addBooleanAttribute("Lossless", "value", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        // root -> Compression -> NumProgressiveScans
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        addSingleAttributeElement("NumProgressiveScans",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
                                  "Compression",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
                                  DATATYPE_INTEGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        // root -> Compression -> BitRate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        addSingleAttributeElement("BitRate",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                                  "Compression",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        // root -> Data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        addElement("Data", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                   CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        // root -> Data -> PlanarConfiguration
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        addElement("PlanarConfiguration", "Data", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        values.add("PixelInterleaved");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        values.add("PlaneInterleaved");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        values.add("LineInterleaved");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
        values.add("TileInterleaved");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        addAttribute("PlanarConfiguration", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        // root -> Data -> SampleFormat
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        addElement("SampleFormat", "Data", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        values.add("SignedIntegral");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        values.add("UnsignedIntegral");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        values.add("Real");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        values.add("Index");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        addAttribute("SampleFormat", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        // root -> Data -> BitsPerSample
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        addElement("BitsPerSample", "Data",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        addAttribute("BitsPerSample", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                     1, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        // root -> Data -> SignificantBitsPerSample
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        addElement("SignificantBitsPerSample", "Data", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        addAttribute("SignificantBitsPerSample", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                     1, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        // root -> Data -> SampleMSB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        addElement("SampleMSB", "Data",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        addAttribute("SampleMSB", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                     1, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        // root -> Dimension
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        addElement("Dimension", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                   CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        // root -> Dimension -> PixelAspectRatio
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        addSingleAttributeElement("PixelAspectRatio",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        // root -> Dimension -> ImageOrientation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        addElement("ImageOrientation", "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        values.add("Normal");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        values.add("Rotate90");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        values.add("Rotate180");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        values.add("Rotate270");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        values.add("FlipH");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        values.add("FlipV");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        values.add("FlipHRotate90");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        values.add("FlipVRotate90");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
        addAttribute("ImageOrientation", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        // root -> Dimension -> HorizontalPixelSize
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        addSingleAttributeElement("HorizontalPixelSize",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
        // root -> Dimension -> VerticalPixelSize
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
        addSingleAttributeElement("VerticalPixelSize",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        // root -> Dimension -> HorizontalPhysicalPixelSpacing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
        addSingleAttributeElement("HorizontalPhysicalPixelSpacing",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
        // root -> Dimension -> VerticalPhysicalPixelSpacing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
        addSingleAttributeElement("VerticalPhysicalPixelSpacing",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
        // root -> Dimension -> HorizontalPosition
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        addSingleAttributeElement("HorizontalPosition",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
        // root -> Dimension -> VerticalPosition
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        addSingleAttributeElement("VerticalPosition",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
                                  DATATYPE_FLOAT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
        // root -> Dimension -> HorizontalPixelOffset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
        addSingleAttributeElement("HorizontalPixelOffset",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
                                  DATATYPE_INTEGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
        // root -> Dimension -> VerticalPixelOffset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
        addSingleAttributeElement("VerticalPixelOffset",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
                                  DATATYPE_INTEGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
        // root -> Dimension -> HorizontalScreenSize
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
        addSingleAttributeElement("HorizontalScreenSize",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
                                  DATATYPE_INTEGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        // root -> Dimension -> VerticalScreenSize
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
        addSingleAttributeElement("VerticalScreenSize",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
                                  "Dimension",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
                                  DATATYPE_INTEGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
        // root -> Document
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
        addElement("Document", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
                   CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
        // root -> Document -> FormatVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
        addElement("FormatVersion", "Document",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
        addAttribute("FormatVersion", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
        // root -> Document -> SubimageInterpretation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
        addElement("SubimageInterpretation", "Document",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
        values.add("Standalone");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
        values.add("SinglePage");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        values.add("FullResolution");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        values.add("ReducedResolution");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
        values.add("PyramidLayer");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
        values.add("Preview");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
        values.add("VolumeSlice");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
        values.add("ObjectView");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
        values.add("Panorama");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
        values.add("AnimationFrame");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
        values.add("TransparencyMask");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
        values.add("CompositingLayer");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
        values.add("SpectralSlice");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
        values.add("Unknown");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
        addAttribute("SubimageInterpretation", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
        // root -> Document -> ImageCreationTime
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
        addElement("ImageCreationTime", "Document",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
        addAttribute("ImageCreationTime", "year",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
        addAttribute("ImageCreationTime", "month",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
                     "1", "12", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
        addAttribute("ImageCreationTime", "day",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
                     "1", "31", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
        addAttribute("ImageCreationTime", "hour",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
                     "0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
                     "0", "23", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        addAttribute("ImageCreationTime", "minute",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
                     "0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
                     "0", "59", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
        // second = 60 denotes leap second
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        addAttribute("ImageCreationTime", "second",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
                     "0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
                     "0", "60", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
        // root -> Document -> ImageModificationTime
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
        addElement("ImageModificationTime", "Document",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
        addAttribute("ImageModificationTime", "year",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
        addAttribute("ImageModificationTime", "month",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
                     "1", "12", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
        addAttribute("ImageModificationTime", "day",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
                     null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
                     "1", "31", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
        addAttribute("ImageModificationTime", "hour",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
                     "0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
                     "0", "23", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
        addAttribute("ImageModificationTime", "minute",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
                     "0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
                     "0", "59", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
        // second = 60 denotes leap second
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
        addAttribute("ImageModificationTime", "second",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
                     "0",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
                     "0", "60", true, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
        // root -> Text
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
        addElement("Text", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
                   0, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
        // root -> Text -> TextEntry
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        addElement("TextEntry", "Text", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
        addAttribute("TextEntry", "keyword",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        addAttribute("TextEntry", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
        addAttribute("TextEntry", "language",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
        addAttribute("TextEntry", "encoding",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        values.add("none");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
        values.add("lzw");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
        values.add("zip");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        values.add("bzip");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
        values.add("other");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
        addAttribute("TextEntry", "compression",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
                     "none",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        // root -> Transparency
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
        addElement("Transparency", standardMetadataFormatName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
                   CHILD_POLICY_SOME);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
        // root -> Transparency -> Alpha
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
        addElement("Alpha", "Transparency", CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
        values = new ArrayList();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
        values.add("none");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
        values.add("premultiplied");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
        values.add("nonpremultiplied");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
        addAttribute("Alpha", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
                     DATATYPE_STRING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
                     false,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
                     "none",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
                     values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
        // root -> Transparency -> TransparentIndex
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
        addSingleAttributeElement("TransparentIndex", "Transparency",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
                                  DATATYPE_INTEGER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
        // root -> Transparency -> TransparentColor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
        addElement("TransparentColor", "Transparency",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
        addAttribute("TransparentColor", "value",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
                     0, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
        // root -> Transparency -> TileTransparencies
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
        addElement("TileTransparencies", "Transparency",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
                   0, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
        // root -> Transparency -> TileTransparencies -> TransparentTile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
        addElement("TransparentTile", "TileTransparencies",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
        addAttribute("TransparentTile", "x",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
        addAttribute("TransparentTile", "y",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
        // root -> Transparency -> TileOpacities
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
        addElement("TileOpacities", "Transparency",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
                   0, Integer.MAX_VALUE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
        // root -> Transparency -> TileOpacities -> OpaqueTile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
        addElement("OpaqueTile", "TileOpacities",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
                   CHILD_POLICY_EMPTY);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
        addAttribute("OpaqueTile", "x",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
        addAttribute("OpaqueTile", "y",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
                     DATATYPE_INTEGER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
                     true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
                     null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    public boolean canNodeAppear(String elementName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
                                 ImageTypeSpecifier imageType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
            return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
}