001/*
002// Licensed to Julian Hyde under one or more contributor license
003// agreements. See the NOTICE file distributed with this work for
004// additional information regarding copyright ownership.
005//
006// Julian Hyde licenses this file to you under the Apache License,
007// Version 2.0 (the "License"); you may not use this file except in
008// compliance with the License. You may obtain a copy of the License at:
009//
010// http://www.apache.org/licenses/LICENSE-2.0
011//
012// Unless required by applicable law or agreed to in writing, software
013// distributed under the License is distributed on an "AS IS" BASIS,
014// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015// See the License for the specific language governing permissions and
016// limitations under the License.
017*/
018package org.olap4j.metadata;
019
020import org.olap4j.impl.Olap4jUtil;
021
022import java.util.Collections;
023import java.util.Set;
024
025/**
026 * Definition of a property of a {@link Member} or
027 * {@link org.olap4j.Cell}.
028 *
029 * @author jhyde
030 * @since Aug 23, 2006
031 */
032public interface Property extends MetadataElement {
033    /**
034     * Returns the datatype of this Property.
035     *
036     * @return datatype of this Property
037     */
038    Datatype getDatatype();
039
040    /**
041     * Returns a set of flags which describe the type of this Property.
042     *
043     * @return type of this Property
044     */
045    Set<TypeFlag> getType();
046
047    /**
048     * Returns the content type of this Property.
049     *
050     * @return content type
051     */
052    ContentType getContentType();
053
054    /**
055     * Enumeration of aspects of the type of a Property. In particular, whether
056     * it belongs to a member or a cell.
057     *
058     * <p>The values are as specified by XMLA for the PROPERTY_TYPE attribute
059     * of the MDSCHEMA_PROPERTIES data set.
060     * For example, XMLA specifies that the value 9 (0x1 | 0x8) means that a
061     * property belongs to a member and is a binary large object (BLOB).
062     * In this case, {@link Property#getType} will return the {@link Set}
063     * {{@link #MEMBER}, {@link #BLOB}}.
064     */
065    enum TypeFlag implements XmlaConstant {
066        /**
067         * Identifies a property of a member. This property can be used in the
068         * DIMENSION PROPERTIES clause of the SELECT statement.
069         */
070        MEMBER(1),
071
072        /**
073         * Identifies a property of a cell. This property can be used in the
074         * CELL PROPERTIES clause that occurs at the end of the SELECT
075         * statement.
076         */
077        CELL(2),
078
079        /**
080         * Identifies an internal property.
081         */
082        SYSTEM(4),
083
084        /**
085         * Identifies a property which contains a binary large object (blob).
086         */
087        BLOB(8);
088
089        private final int xmlaOrdinal;
090
091        public static final Set<TypeFlag> CELL_TYPE_FLAG =
092            Collections.unmodifiableSet(
093                Olap4jUtil.enumSetOf(TypeFlag.CELL));
094        public static final Set<TypeFlag> MEMBER_TYPE_FLAG =
095            Collections.unmodifiableSet(
096                Olap4jUtil.enumSetOf(TypeFlag.MEMBER));
097        private static final DictionaryImpl<TypeFlag> DICTIONARY =
098            DictionaryImpl.forClass(TypeFlag.class);
099
100        private TypeFlag(int xmlaOrdinal) {
101            this.xmlaOrdinal = xmlaOrdinal;
102        }
103
104        public String xmlaName() {
105            return "MDPROP_" + name();
106        }
107
108        public String getDescription() {
109            return null;
110        }
111
112        public int xmlaOrdinal() {
113            return xmlaOrdinal;
114        }
115
116        /**
117         * Per {@link org.olap4j.metadata.XmlaConstant}, returns a dictionary
118         * of all values of this enumeration.
119         *
120         * @return Dictionary of all values
121         */
122        public static Dictionary<TypeFlag> getDictionary() {
123            return DICTIONARY;
124        }
125    }
126
127    /**
128     * Enumeration of the system properties available for every {@link Member}.
129     *
130     * <p>The following properties are mandatory for members:<ul>
131     * <li>{@link #CATALOG_NAME}</li>
132     * <li>{@link #SCHEMA_NAME}</li>
133     * <li>{@link #CUBE_NAME}</li>
134     * <li>{@link #DIMENSION_UNIQUE_NAME}</li>
135     * <li>{@link #HIERARCHY_UNIQUE_NAME}</li>
136     * <li>{@link #LEVEL_UNIQUE_NAME}</li>
137     * <li>{@link #LEVEL_NUMBER}</li>
138     * <li>{@link #MEMBER_UNIQUE_NAME}</li>
139     * <li>{@link #MEMBER_NAME}</li>
140     * <li>{@link #MEMBER_TYPE}</li>
141     * <li>{@link #MEMBER_GUID}</li>
142     * <li>{@link #MEMBER_CAPTION}</li>
143     * <li>{@link #MEMBER_ORDINAL}</li>
144     * <li>{@link #CHILDREN_CARDINALITY}</li>
145     * <li>{@link #PARENT_LEVEL}</li>
146     * <li>{@link #PARENT_UNIQUE_NAME}</li>
147     * <li>{@link #PARENT_COUNT}</li>
148     * <li>{@link #DESCRIPTION}</li>
149     * </ul>
150     */
151    enum StandardMemberProperty implements Property {
152
153        /**
154         * Definition of the property which
155         * holds the name of the current catalog.
156         */
157        CATALOG_NAME(
158            Datatype.STRING,
159            10,
160            false,
161            null,
162            "Optional. The name of the catalog to which this member belongs. "
163            + "NULL if the provider does not support catalogs."),
164
165        /**
166         * Definition of the property which
167         * holds the name of the current schema.
168         */
169        SCHEMA_NAME(
170            Datatype.STRING,
171            11,
172            false,
173            null,
174            "Optional. The name of the schema to which this member belongs. "
175            + "NULL if the provider does not support schemas."),
176
177        /**
178         * Definition of the property which
179         * holds the name of the current cube.
180         */
181        CUBE_NAME(
182            Datatype.STRING,
183            12,
184            false,
185            null, "Required. Name of the cube to which this member belongs."),
186
187        /**
188         * Definition of the property which
189         * holds the unique name of the current dimension.
190         */
191        DIMENSION_UNIQUE_NAME(
192            Datatype.STRING,
193            13,
194            false,
195            null,
196            "Required. Unique name of the dimension to which this member "
197            + "belongs. For providers that generate unique names by "
198            + "qualification, each component of this name is delimited."),
199
200        /**
201         * Definition of the property which
202         * holds the unique name of the current hierarchy.
203         */
204        HIERARCHY_UNIQUE_NAME(
205            Datatype.STRING,
206            14,
207            false,
208            null,
209            "Required. Unique name of the hierarchy. If the member belongs to "
210            + "more than one hierarchy, there is one row for each hierarchy "
211            + "to which it belongs. For providers that generate unique names "
212            + "by qualification, each component of this name is delimited."),
213
214        /**
215         * Definition of the property which
216         * holds the unique name of the current level.
217         */
218        LEVEL_UNIQUE_NAME(
219            Datatype.STRING,
220            15,
221            false,
222            null,
223            "Required. Unique name of the level to which the member belongs. "
224            + "For providers that generate unique names by qualification, "
225            + "each component of this name is delimited."),
226
227        /**
228         * Definition of the property which
229         * holds the ordinal of the current level.
230         */
231        LEVEL_NUMBER(
232            Datatype.UNSIGNED_INTEGER,
233            16,
234            false,
235            null,
236            "Required. The distance of the member from the root of the "
237            + "hierarchy. The root level is zero."),
238
239        /**
240         * Definition of the property which
241         * holds the ordinal of the current member.
242         */
243        MEMBER_ORDINAL(
244            Datatype.UNSIGNED_INTEGER,
245            17,
246            false,
247            null,
248            "Required. Ordinal number of the member. Sort rank of the member "
249            + "when members of this dimension are sorted in their natural "
250            + "sort order. If providers do not have the concept of natural "
251            + "ordering, this should be the rank when sorted by MEMBER_NAME."),
252
253        /**
254         * Definition of the property which
255         * holds the name of the current member.
256         */
257        MEMBER_NAME(
258            Datatype.STRING,
259            18,
260            false,
261            null,
262            "Required. Name of the member."),
263
264        /**
265         * Definition of the property which
266         * holds the unique name of the current member.
267         */
268        MEMBER_UNIQUE_NAME(
269            Datatype.STRING,
270            19,
271            false,
272            null,
273            "Required. Unique name of the member. For providers that generate "
274            + "unique names by qualification, each component of this name is "
275            + "delimited."),
276
277        /**
278         * Definition of the property which
279         * holds the type of the member.
280         */
281        MEMBER_TYPE(
282            Datatype.STRING,
283            20,
284            false,
285            null,
286            "Required. Type of the member. Can be one of the following values: "
287            + "MDMEMBER_Datatype.TYPE_REGULAR, MDMEMBER_Datatype.TYPE_ALL, "
288            + "MDMEMBER_Datatype.TYPE_FORMULA, MDMEMBER_Datatype.TYPE_MEASURE, "
289            + "MDMEMBER_Datatype.TYPE_UNKNOWN. MDMEMBER_Datatype.TYPE_FORMULA "
290            + "takes precedence over MDMEMBER_Datatype.TYPE_MEASURE. "
291            + "Therefore, if there is a formula (calculated) member on the "
292            + "Measures dimension, it is listed as "
293            + "MDMEMBER_Datatype.TYPE_FORMULA."),
294
295        /**
296         * Definition of the property which
297         * holds the GUID of the member
298         */
299        MEMBER_GUID(
300            Datatype.STRING,
301            21,
302            false,
303            null,
304            "Optional. Member GUID. NULL if no GUID exists."),
305
306        /**
307         * Definition of the property which
308         * holds the label or caption associated with the member, or the
309         * member's name if no caption is defined.
310         */
311        MEMBER_CAPTION(
312            Datatype.STRING,
313            22,
314            false,
315            null,
316            "Required. A label or caption associated with the member. Used "
317            + "primarily for display purposes. If a caption does not exist, "
318            + "MEMBER_NAME is returned."),
319
320        /**
321         * Definition of the property which holds the
322         * number of children this member has.
323         */
324        CHILDREN_CARDINALITY(
325            Datatype.UNSIGNED_INTEGER,
326            23,
327            false,
328            null,
329            "Required. Number of children that the member has. This can be an "
330            + "estimate, so consumers should not rely on this to be the exact "
331            + "count. Providers should return the best estimate possible."),
332
333        /**
334         * Definition of the property which holds the
335         * distance from the root of the hierarchy of this member's parent.
336         */
337        PARENT_LEVEL(
338            Datatype.UNSIGNED_INTEGER,
339            24,
340            false,
341            null,
342            "Required. The distance of the member's parent from the root level "
343            + "of the hierarchy. The root level is zero."),
344
345        /**
346         * Definition of the property which holds the
347         * Name of the current catalog.
348         */
349        PARENT_UNIQUE_NAME(
350            Datatype.STRING,
351            25,
352            false,
353            null,
354            "Required. Unique name of the member's parent. NULL is returned "
355            + "for any members at the root level. For providers that generate "
356            + "unique names by qualification, each component of this name is "
357            + "delimited."),
358
359        /**
360         * Definition of the property which holds the
361         * number of parents that this member has. Generally 1, or 0
362         * for root members.
363         */
364        PARENT_COUNT(
365            Datatype.UNSIGNED_INTEGER,
366            26,
367            false,
368            null,
369            "Required. Number of parents that this member has."),
370
371        /**
372         * Definition of the property which holds the
373         * description of this member.
374         */
375        DESCRIPTION(
376            Datatype.STRING,
377            27,
378            false,
379            null,
380            "Optional. A human-readable description of the member."),
381
382        /**
383         * Definition of the internal property which holds the
384         * name of the system property which determines whether to show a member
385         * (especially a measure or calculated member) in a user interface such
386         * as JPivot.
387         */
388        $visible(
389            Datatype.BOOLEAN,
390            28,
391            true,
392            null,
393            null),
394
395        /**
396         * Definition of the internal property which holds the
397         * value of the member key in the original data type. MEMBER_KEY is for
398         * backward-compatibility.  MEMBER_KEY has the same value as KEY0 for
399         * non-composite keys, and MEMBER_KEY property is null for composite
400         * keys.
401         */
402        MEMBER_KEY(
403            Datatype.VARIANT,
404            29,
405            true,
406            null,
407            "Optional. The value of the member key. Null for composite keys."),
408
409        /**
410         * Definition of the boolean property that indicates whether
411         * a member is a placeholder member for an empty position in a
412         * dimension hierarchy.
413         */
414        IS_PLACEHOLDERMEMBER(
415            Datatype.BOOLEAN,
416            30,
417            false,
418            null,
419            "Required. Whether the member is a placeholder member for an empty "
420            + "position in a dimension hierarchy."),
421
422        /**
423         * Definition of the property that indicates whether the member is a
424         * data member.
425         */
426        IS_DATAMEMBER(
427            Datatype.BOOLEAN,
428            31,
429            false,
430            null,
431            "Required. whether the member is a data member"),
432
433        /**
434         * Definition of the property which
435         * holds the level depth of a member.
436         *
437         * <p>Caution: Level depth of members in parent-child hierarchy isn't
438         * from their levels.  It's calculated from the underlying data
439         * dynamically.
440         */
441        DEPTH(
442            Datatype.UNSIGNED_INTEGER,
443            43,
444            true,
445            null,
446            "The level depth of a member"),
447
448        /**
449         * Definition of the property which
450         * holds the DISPLAY_INFO required by XML/A.
451         *
452         * <p>Caution: This property's value is calculated based on a specified
453         * MDX query, so its value is dynamic at runtime.
454         */
455        DISPLAY_INFO(
456            Datatype.UNSIGNED_INTEGER,
457            44,
458            false,
459            null,
460            "Display instruction of a member for XML/A"),
461
462        /**
463         * Definition of the property which
464         * holds the value of a cell. Is usually numeric (since most measures
465         * are numeric) but is occasionally another type.
466         */
467        VALUE(
468            Datatype.VARIANT,
469            41,
470            false,
471            null,
472            "The unformatted value of the cell.");
473
474        private final Datatype type;
475        private final String description;
476        private final boolean internal;
477
478        private StandardMemberProperty(
479            Datatype type,
480            int ordinal,
481            boolean internal,
482            Class<? extends Enum> enumClazz,
483            String description)
484        {
485//            assert ordinal == ordinal();
486            this.internal = internal;
487            this.type = type;
488            this.description = description;
489        }
490
491        public String getName() {
492            return name();
493        }
494
495        public String getUniqueName() {
496            return name();
497        }
498
499        public String getCaption() {
500            // NOTE: This caption will be the same in all locales, since
501            // StandardMemberProperty has no way of deducing the current
502            // connection. Providers that wish to localize the caption of
503            // built-in properties should create a wrapper around
504            // StandardMemberProperty that is aware of the current connection or
505            // locale.
506            return name();
507        }
508
509        public String getDescription() {
510            // NOTE: This description will be the same in all locales, since
511            // StandardMemberProperty has no way of deducing the current
512            // connection. Providers that wish to localize the description of
513            // built-in properties should create a wrapper around
514            // StandardCellProperty that is aware of the current connection or
515            // locale.
516            return description;
517        }
518
519        public Datatype getDatatype() {
520            return type;
521        }
522
523        public Set<TypeFlag> getType() {
524            return TypeFlag.MEMBER_TYPE_FLAG;
525        }
526
527        public ContentType getContentType() {
528            return ContentType.REGULAR;
529        }
530
531        public boolean isInternal() {
532            return internal;
533        }
534
535        public boolean isVisible() {
536            return !internal;
537        }
538    }
539
540    /**
541     * Enumeration of the system properties available for every
542     * {@link org.olap4j.Cell}.
543     *
544     * <p>The following propertiess are mandatory for cells:<ul>
545     * <li>{@link #BACK_COLOR}</li>
546     * <li>{@link #CELL_EVALUATION_LIST}</li>
547     * <li>{@link #CELL_ORDINAL}</li>
548     * <li>{@link #FORE_COLOR}</li>
549     * <li>{@link #FONT_NAME}</li>
550     * <li>{@link #FONT_SIZE}</li>
551     * <li>{@link #FONT_FLAGS}</li>
552     * <li>{@link #FORMAT_STRING}</li>
553     * <li>{@link #FORMATTED_VALUE}</li>
554     * <li>{@link #NON_EMPTY_BEHAVIOR}</li>
555     * <li>{@link #SOLVE_ORDER}</li>
556     * <li>{@link #VALUE}</li>
557     * </ul>
558     */
559    enum StandardCellProperty implements Property {
560        BACK_COLOR(
561            Datatype.STRING,
562            30,
563            false,
564            null,
565            "The background color for displaying the VALUE or FORMATTED_VALUE "
566            + "property. For more information, see FORE_COLOR and BACK_COLOR "
567            + "Contents."),
568
569        CELL_EVALUATION_LIST(
570            Datatype.STRING,
571            31,
572            false,
573            null,
574            "The semicolon-delimited list of evaluated formulas applicable to "
575            + "the cell, in order from lowest to highest solve order. For more "
576            + "information about solve order, see Understanding Pass Order and "
577            + "Solve Order"),
578
579        CELL_ORDINAL(
580            Datatype.UNSIGNED_INTEGER,
581            32,
582            false,
583            null,
584            "The ordinal number of the cell in the dataset."),
585
586        FORE_COLOR(
587            Datatype.STRING,
588            33,
589            false,
590            null,
591            "The foreground color for displaying the VALUE or FORMATTED_VALUE "
592            + "property. For more information, see FORE_COLOR and BACK_COLOR "
593            + "Contents."),
594
595        FONT_NAME(
596            Datatype.STRING,
597            34,
598            false,
599            null,
600            "The font to be used to display the VALUE or FORMATTED_VALUE "
601            + "property."),
602
603        FONT_SIZE(
604            Datatype.STRING,
605            35,
606            false,
607            null,
608            "Font size to be used to display the VALUE or FORMATTED_VALUE "
609            + "property."),
610
611        FONT_FLAGS(
612            Datatype.UNSIGNED_INTEGER,
613            36,
614            false,
615            XmlaConstants.FontFlag.class,
616            "The bitmask detailing effects on the font. The value is the "
617            + "result of a bitwise OR operation of one or more of the "
618            + "following constants: MDFF_BOLD  = 1, MDFF_ITALIC = 2, "
619            + "MDFF_UNDERLINE = 4, MDFF_STRIKEOUT = 8. For example, the value "
620            + "5 represents the combination of bold (MDFF_BOLD) and underline "
621            + "(MDFF_UNDERLINE) font effects."),
622
623        /**
624         * Definition of the property which
625         * holds the formatted value of a cell.
626         */
627        FORMATTED_VALUE(
628            Datatype.STRING,
629            37,
630            false,
631            null,
632            "The character string that represents a formatted display of the "
633            + "VALUE property."),
634
635        /**
636         * Definition of the property which
637         * holds the format string used to format cell values.
638         */
639        FORMAT_STRING(
640            Datatype.STRING,
641            38,
642            false,
643            null,
644            "The format string used to create the FORMATTED_VALUE property "
645            + "value. For more information, see FORMAT_STRING Contents."),
646
647        NON_EMPTY_BEHAVIOR(
648            Datatype.STRING,
649            39,
650            false,
651            null,
652            "The measure used to determine the behavior of calculated members "
653            + "when resolving empty cells."),
654
655        /**
656         * Definition of the property which
657         * determines the solve order of a calculated member with respect to
658         * other calculated members.
659         */
660        SOLVE_ORDER(
661            Datatype.INTEGER,
662            40,
663            false,
664            null,
665            "The solve order of the cell."),
666
667        /**
668         * Definition of the property which
669         * holds the value of a cell. Is usually numeric (since most measures
670         * are numeric) but is occasionally another type.
671         */
672        VALUE(
673            Datatype.VARIANT,
674            41,
675            false,
676            null,
677            "The unformatted value of the cell."),
678
679        /**
680         * Definition of the property which
681         * holds the datatype of a cell. Valid values are "String",
682         * "Numeric", "Integer". The property's value derives from the
683         * "datatype" attribute of the "Measure" element; if the
684         * datatype attribute is not specified, the datatype is
685         * "Numeric" by default, except measures whose aggregator is
686         * "Count", whose datatype is "Integer".
687         */
688        DATATYPE(
689            Datatype.STRING,
690            42,
691            false,
692            null,
693            "The datatype of the cell."),
694
695        LANGUAGE(
696            Datatype.UNSIGNED_INTEGER,
697            0,
698            false,
699            null,
700            "The locale where the FORMAT_STRING will be applied. LANGUAGE is "
701            + "usually used for currency conversion."),
702
703        ACTION_TYPE(
704            Datatype.INT4,
705            0,
706            false,
707            XmlaConstants.ActionType.class,
708            "A bitmask that indicates which types of actions exist on the "
709            + "cell."),
710
711        UPDATEABLE(
712            Datatype.UNSIGNED_INTEGER,
713            0,
714            false,
715            XmlaConstants.Updateable.class,
716            "A value that indicates whether the cell can be updated.");
717
718        /**
719         * The datatype of the property.
720         */
721        private final Datatype type;
722        private final String description;
723        private final boolean internal;
724
725        private StandardCellProperty(
726            Datatype type,
727            int ordinal,
728            boolean internal,
729            Class<? extends Enum> enumClazz,
730            String description)
731        {
732            this.type = type;
733            this.internal = internal;
734            this.description = description;
735        }
736
737        public Datatype getDatatype() {
738            return type;
739        }
740
741        public Set<TypeFlag> getType() {
742            return TypeFlag.CELL_TYPE_FLAG;
743        }
744
745        public String getName() {
746            return name();
747        }
748
749        public String getUniqueName() {
750            return name();
751        }
752
753        public String getCaption() {
754            // NOTE: This caption will be the same in all locales, since
755            // StandardCellProperty has no way of deducing the current
756            // connection. Providers that wish to localize the caption of
757            // built-in properties should create a wrapper around
758            // StandardCellProperty that is aware of the current connection or
759            // locale.
760            return name();
761        }
762
763        public String getDescription() {
764            // NOTE: This description will be the same in all locales, since
765            // StandardCellProperty has no way of deducing the current
766            // connection. Providers that wish to localize the description of
767            // built-in properties should create a wrapper around
768            // StandardCellProperty that is aware of the current connection or
769            // locale.
770            return description;
771        }
772
773        public boolean isInternal() {
774            return internal;
775        }
776
777        public boolean isVisible() {
778            return !internal;
779        }
780
781        public ContentType getContentType() {
782            return ContentType.REGULAR;
783        }
784    }
785
786    /**
787     * Enumeration of the types of a <code>Property</code>.
788     *
789     * <p>The values are as specified by XMLA.
790     * For example, XMLA specifies MD_PROPTYPE_CAPTION with ordinal 0x21,
791     * which corresponds to the value {@link #CAPTION},
792     * whose {@link #xmlaOrdinal} is 0x21.
793     */
794    enum ContentType implements XmlaConstant {
795        REGULAR(0x00),
796        ID(0x01),
797        RELATION_TO_PARENT(0x02),
798        ROLLUP_OPERATOR(0x03),
799        ORG_TITLE(0x11),
800        CAPTION(0x21),
801        CAPTION_SHORT(0x22),
802        CAPTION_DESCRIPTION(0x23),
803        CAPTION_ABREVIATION(0x24),
804        WEB_URL(0x31),
805        WEB_HTML(0x32),
806        WEB_XML_OR_XSL(0x33),
807        WEB_MAIL_ALIAS(0x34),
808        ADDRESS(0x41),
809        ADDRESS_STREET(0x42),
810        ADDRESS_HOUSE(0x43),
811        ADDRESS_CITY(0x44),
812        ADDRESS_STATE_OR_PROVINCE(0x45),
813        ADDRESS_ZIP(0x46),
814        ADDRESS_QUARTER(0x47),
815        ADDRESS_COUNTRY(0x48),
816        ADDRESS_BUILDING(0x49),
817        ADDRESS_ROOM(0x4A),
818        ADDRESS_FLOOR(0x4B),
819        ADDRESS_FAX(0x4C),
820        ADDRESS_PHONE(0x4D),
821        GEO_CENTROID_X(0x61),
822        GEO_CENTROID_Y(0x62),
823        GEO_CENTROID_Z(0x63),
824        GEO_BOUNDARY_TOP(0x64),
825        GEO_BOUNDARY_LEFT(0x65),
826        GEO_BOUNDARY_BOTTOM(0x66),
827        GEO_BOUNDARY_RIGHT(0x67),
828        GEO_BOUNDARY_FRONT(0x68),
829        GEO_BOUNDARY_REAR(0x69),
830        GEO_BOUNDARY_POLYGON(0x6A),
831        PHYSICAL_SIZE(0x71),
832        PHYSICAL_COLOR(0x72),
833        PHYSICAL_WEIGHT(0x73),
834        PHYSICAL_HEIGHT(0x74),
835        PHYSICAL_WIDTH(0x75),
836        PHYSICAL_DEPTH(0x76),
837        PHYSICAL_VOLUME(0x77),
838        PHYSICAL_DENSITY(0x78),
839        PERSON_FULL_NAME(0x82),
840        PERSON_FIRST_NAME(0x83),
841        PERSON_LAST_NAME(0x84),
842        PERSON_MIDDLE_NAME(0x85),
843        PERSON_DEMOGRAPHIC(0x86),
844        PERSON_CONTACT(0x87),
845        QTY_RANGE_LOW(0x91),
846        QTY_RANGE_HIGH(0x92),
847        FORMATTING_COLOR(0xA1),
848        FORMATTING_ORDER(0xA2),
849        FORMATTING_FONT(0xA3),
850        FORMATTING_FONT_EFFECTS(0xA4),
851        FORMATTING_FONT_SIZE(0xA5),
852        FORMATTING_SUB_TOTAL(0xA6),
853        DATE(0xB1),
854        DATE_START(0xB2),
855        DATE_ENDED(0xB3),
856        DATE_CANCELED(0xB4),
857        DATE_MODIFIED(0xB5),
858        DATE_DURATION(0xB6),
859        VERSION(0xC1);
860
861        private final int xmlaOrdinal;
862        private static final DictionaryImpl<ContentType> DICTIONARY =
863            DictionaryImpl.forClass(ContentType.class);
864
865        private ContentType(int xmlaOrdinal) {
866            this.xmlaOrdinal = xmlaOrdinal;
867        }
868
869        public String xmlaName() {
870            return "MD_PROPTYPE_" + name();
871        }
872
873        public String getDescription() {
874            return null;
875        }
876
877        public int xmlaOrdinal() {
878            return xmlaOrdinal;
879        }
880
881        /**
882         * Per {@link org.olap4j.metadata.XmlaConstant}, returns a dictionary
883         * of all values of this enumeration.
884         *
885         * @return Dictionary of all values
886         */
887        public static Dictionary<ContentType> getDictionary() {
888            return DICTIONARY;
889        }
890    }
891}
892
893// End Property.java