diff --git a/checkFile.awk b/checkFile.awk index d594498..3a4daeb 100644 --- a/checkFile.awk +++ b/checkFile.awk @@ -192,7 +192,7 @@ FNR < headerCount { # beginning of multiline comment "/*" inComment = 1; gsub(/\/\*.*$/, "/* comment */", s); - if (strict > 0 && FNR > 1 && $0 !~ /\/\*\*/) { + if (strict > 0 && FNR > 1 && $0 !~ /\/\*\*/ && $0 !~ /^\/\*/) { error(fname, FNR, "Multi-line c-style comment not allowed"); } } else { @@ -285,6 +285,8 @@ FNR < headerCount { importGroup = "b"; } else if (thisImport ~ /^mondrian.*/) { importGroup = "bb"; + } else if (thisImport ~ /^org.olap4j.xmla.server.*/) { + importGroup = "bc"; } else if (thisImport ~ /^openjava.*/) { importGroup = "cc"; } else if (thisImport ~ /^org.apache.*/) { diff --git a/src/org/olap4j/metadata/Dimension.java b/src/org/olap4j/metadata/Dimension.java index 8db4f99..3f7057f 100644 --- a/src/org/olap4j/metadata/Dimension.java +++ b/src/org/olap4j/metadata/Dimension.java @@ -80,32 +80,88 @@ public interface Dimension extends MetadataElement { public enum Type implements XmlaConstant { /** * Indicates that the dimension is not related to time. + * + *
Corresponds to the XMLA constant
+ * MD_DIMTYPE_UNKNOWN(0)
.
Corresponds to the XMLA constant
+ * MD_DIMTYPE_TIME(1)
.
Corresponds to the XMLA constant
+ * MD_DIMTYPE_MEASURE(2)
.
MD_DIMTYPE_OTHER(3)
. */
OTHER(3),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_QUANTITATIVE(5)
. */
QUANTITATIVE(5),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_ACCOUNTS(6)
. */
ACCOUNTS(6),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_CUSTOMERS(7)
. */
CUSTOMERS(7),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_PRODUCTS(8)
. */
PRODUCTS(8),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_SCENARIO(9)
. */
SCENARIO(9),
- UTILITY(10),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_UTILIY(10)
(sic). */
+ UTILITY(10) {
+ public String xmlaName() {
+ // The XMLA constant is apparently mis-spelled.
+ // Who are we to question?
+ return "MD_DIMTYPE_UTILIY";
+ }
+ },
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_CURRENCY(11)
. */
CURRENCY(11),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_RATES(12)
. */
RATES(12),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_CHANNEL(13)
. */
CHANNEL(13),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_PROMOTION(14)
. */
PROMOTION(14),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_ORGANIZATION(15)
. */
ORGANIZATION(15),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_BILL_OF_MATERIALS(16)
. */
BILL_OF_MATERIALS(16),
+
+ /** Corresponds to the XMLA constant
+ * MD_DIMTYPE_GEOGRAPHY(17)
. */
GEOGRAPHY(17);
private final int xmlaOrdinal;
diff --git a/src/org/olap4j/metadata/Level.java b/src/org/olap4j/metadata/Level.java
index 775ce88..e7980c5 100644
--- a/src/org/olap4j/metadata/Level.java
+++ b/src/org/olap4j/metadata/Level.java
@@ -200,11 +200,17 @@ public enum Type implements XmlaConstant {
/**
* Indicates that the level is not related to time.
+ *
+ * Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_REGULAR(0x0000)
.
Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_ALL(0x0001)
.
Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_YEARS(0x0014)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_YEARS(0x0014), /** * Indicates that a level refers to half years. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_HALF_YEAR(0x0304)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_HALF_YEAR(0x0024), /** * Indicates that a level refers to quarters. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_QUARTERS(0x0044)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_QUARTERS(0x0044), /** * Indicates that a level refers to months. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_MONTHS(0x0084)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_MONTHS(0x0084), /** * Indicates that a level refers to weeks. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_WEEKS(0x0104)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_WEEKS(0x0104), /** * Indicates that a level refers to days. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_DAYS(0x0204)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_DAYS(0x0204), /** * Indicates that a level refers to hours. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_HOURS(0x0304)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_HOURS(0x0304), /** * Indicates that a level refers to minutes. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_MINUTES(0x0404)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_MINUTES(0x0404), /** * Indicates that a level refers to seconds. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_SECONDS(0x0804)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_SECONDS(0x0804), /** - * Indicates that a level refers to days. - * It must be used in a dimension whose type is - * {@link org.olap4j.metadata.Dimension.Type#TIME}. + * Indicates that a level refers to an unspecified time unit. + * + *Corresponds to the OLE DB for OLAP constant
+ * MDLEVEL_TYPE_TIME_UNDEFINED(0x1004)
.
It must be used in a dimension whose type is + * {@link org.olap4j.metadata.Dimension.Type#TIME}.
*/ TIME_UNDEFINED(0x1004), + /** Corresponds to XMLA constant + *MDLEVEL_TYPE_GEO_CONTINENT(0x2001)
. */
GEO_CONTINENT(0x2001),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_REGION(0x2002)
. */
GEO_REGION(0x2002),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_COUNTRY(0x2003)
. */
GEO_COUNTRY(0x2003),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_STATE_OR_PROVINCE(0x2004)
. */
GEO_STATE_OR_PROVINCE(0x2004),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_COUNTY(0x2005)
. */
GEO_COUNTY(0x2005),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_CITY(0x2006)
. */
GEO_CITY(0x2006),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_POSTALCODE(0x2007)
. */
GEO_POSTALCODE(0x2007),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_GEO_POINT(0x2008)
. */
GEO_POINT(0x2008),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_ORG_UNIT(0x1011)
. */
ORG_UNIT(0x1011),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_BOM_RESOURCE(0x1012)
. */
BOM_RESOURCE(0x1012),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_QUANTITATIVE(0x1013)
. */
QUANTITATIVE(0x1013),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_ACCOUNT(0x1014)
. */
ACCOUNT(0x1014),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_CUSTOMER(0x1021)
. */
CUSTOMER(0x1021),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_CUSTOMER_GROUP(0x1022)
. */
CUSTOMER_GROUP(0x1022),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_CUSTOMER_HOUSEHOLD(0x1023)
. */
CUSTOMER_HOUSEHOLD(0x1023),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_PRODUCT(0x1031)
. */
PRODUCT(0x1031),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_PRODUCT_GROUP(0x1032)
. */
PRODUCT_GROUP(0x1032),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_SCENARIO(0x1015)
. */
SCENARIO(0x1015),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_UTILITY(0x1016)
. */
UTILITY(0x1016),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_PERSON(0x1041)
. */
PERSON(0x1041),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_COMPANY(0x1042)
. */
COMPANY(0x1042),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_CURRENCY_SOURCE(0x1051)
. */
CURRENCY_SOURCE(0x1051),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_CURRENCY_DESTINATION(0x1052)
. */
CURRENCY_DESTINATION(0x1052),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_CHANNEL(0x1061)
. */
CHANNEL(0x1061),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_REPRESENTATIVE(0x1062)
. */
REPRESENTATIVE(0x1062),
+
+ /** Corresponds to XMLA constant
+ * MDLEVEL_TYPE_PROMOTION(0x1071)
. */
PROMOTION(0x1071);
private final int xmlaOrdinal;