Author: truesweetman
Date: Wed Aug 27 15:38:22 2008
New Revision: 2644

Modified:
   trunk/src/ca/sqlpower/architect/olap/MondrianModel.java
   trunk/src/ca/sqlpower/architect/olap/xml-to-java-classes.xsl

Log:
Objects have been added to getChildren() for all OLAPObjects in order to get CubeUsages to appear on the tree so they can be synchronized and deleted (both not yet implemented for CubeUsage).

Modified: trunk/src/ca/sqlpower/architect/olap/MondrianModel.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/olap/MondrianModel.java     (original)
+++ trunk/src/ca/sqlpower/architect/olap/MondrianModel.java Wed Aug 27 15:38:22 2008
@@ -1140,6 +1140,10 @@

         children.addAll(namedSets);

+        if (fact != null) {
+               children.add(fact);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -1593,6 +1597,10 @@

         children.addAll(namedSets);

+        if (cubeUsage != null) {
+               children.add(cubeUsage);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -2847,6 +2855,10 @@

         children.addAll(memberReaderParameters);

+        if (relation != null) {
+               children.add(relation);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -3415,6 +3427,26 @@

         children.addAll(properties);

+        if (keyExp != null) {
+               children.add(keyExp);
+        }
+
+        if (nameExp != null) {
+               children.add(nameExp);
+        }
+
+        if (ordinalExp != null) {
+               children.add(ordinalExp);
+        }
+
+        if (parentExp != null) {
+               children.add(parentExp);
+        }
+
+        if (closure != null) {
+               children.add(closure);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -4037,6 +4069,10 @@

         children.addAll(memberProperties);

+        if (measureExp != null) {
+               children.add(measureExp);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -4318,6 +4354,10 @@

         children.addAll(memberProperties);

+        if (formulaElement != null) {
+               children.add(formulaElement);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -5573,6 +5613,10 @@

         children.addAll(aggTables);

+        if (filter != null) {
+               children.add(filter);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -6667,6 +6711,10 @@

         children.addAll(levels);

+        if (factcount != null) {
+               children.add(factcount);
+        }
+
         return Collections.unmodifiableList(children);
     }

@@ -8325,6 +8373,10 @@
         List<OLAPObject> children = new ArrayList<OLAPObject>();

         children.addAll(schemaGrants);
+
+        if (union != null) {
+               children.add(union);
+        }

         return Collections.unmodifiableList(children);
     }

Modified: trunk/src/ca/sqlpower/architect/olap/xml-to-java-classes.xsl
==============================================================================
--- trunk/src/ca/sqlpower/architect/olap/xml-to-java-classes.xsl        
(original)
+++ trunk/src/ca/sqlpower/architect/olap/xml-to-java-classes.xsl Wed Aug 27 15:38:22 2008
@@ -244,6 +244,11 @@
List&lt;OLAPObject&gt; children = new ArrayList&lt;OLAPObject&gt;();
         <xsl:for-each select="Array">
         children.addAll(<xsl:value-of select="@name"/>);
+        </xsl:for-each>
+        <xsl:for-each select="Object">
+        if (<xsl:value-of select="@name"/> != null) {
+               children.add(<xsl:value-of select="@name"/>);
+        }
         </xsl:for-each>
         return Collections.unmodifiableList(children);
     }

Reply via email to