Author: [EMAIL PROTECTED]
Date: Wed Sep  3 10:05:45 2008
New Revision: 2681

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

Log:
Added a copy constructor to the Mondrian objects and the OLAPObject.

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 Sep 3 10:05:45 2008
@@ -24,6 +24,21 @@
     public Schema() {
     }

+    /**
+     * Creates a new Schema with all
+     * attributes copied from the given Schema.
+     */
+    public Schema(Schema original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.measuresCaption = original.getMeasuresCaption();
+       
+       this.defaultRole = original.getDefaultRole();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Schema:");
@@ -738,6 +753,21 @@
     public CubeDimension() {
     }

+    /**
+     * Creates a new CubeDimension with all
+     * attributes copied from the given CubeDimension.
+     */
+    public CubeDimension(CubeDimension original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.caption = original.getCaption();
+       
+       this.foreignKey = original.getForeignKey();
+       
+    }
+

     /**  */
     private String /* */ name;
@@ -866,6 +896,27 @@
     public Cube() {
     }

+    /**
+     * Creates a new Cube with all
+     * attributes copied from the given Cube.
+     */
+    public Cube(Cube original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.caption = original.getCaption();
+       
+       this.defaultMeasure = original.getDefaultMeasure();
+       
+       this.cache = original.getCache();
+       
+       this.enabled = original.getEnabled();
+       
+       this.fact = original.getFact();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Cube:");
@@ -1416,6 +1467,25 @@
     public VirtualCube() {
     }

+    /**
+     * Creates a new VirtualCube with all
+     * attributes copied from the given VirtualCube.
+     */
+    public VirtualCube(VirtualCube original) {
+       super(original);
+       
+       this.enabled = original.getEnabled();
+       
+       this.name = original.getName();
+       
+       this.defaultMeasure = original.getDefaultMeasure();
+       
+       this.caption = original.getCaption();
+       
+       this.cubeUsage = original.getCubeUsage();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("VirtualCube:");
@@ -1943,6 +2013,15 @@
     public CubeUsages() {
     }

+    /**
+     * Creates a new CubeUsages with all
+     * attributes copied from the given CubeUsages.
+     */
+    public CubeUsages(CubeUsages original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("CubeUsages:");
@@ -2102,6 +2181,19 @@
     public CubeUsage() {
     }

+    /**
+     * Creates a new CubeUsage with all
+     * attributes copied from the given CubeUsage.
+     */
+    public CubeUsage(CubeUsage original) {
+       super(original);
+       
+       this.cubeName = original.getCubeName();
+       
+ this.ignoreUnrelatedDimensions = original.getIgnoreUnrelatedDimensions();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("CubeUsage:");
@@ -2207,6 +2299,19 @@
     public VirtualCubeDimension() {
     }

+    /**
+     * Creates a new VirtualCubeDimension with all
+     * attributes copied from the given VirtualCubeDimension.
+     */
+    public VirtualCubeDimension(VirtualCubeDimension original) {
+       super(original);
+       
+       this.cubeName = original.getCubeName();
+       
+       this.name = original.getName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("VirtualCubeDimension:");
@@ -2316,6 +2421,21 @@
     public VirtualCubeMeasure() {
     }

+    /**
+     * Creates a new VirtualCubeMeasure with all
+     * attributes copied from the given VirtualCubeMeasure.
+     */
+    public VirtualCubeMeasure(VirtualCubeMeasure original) {
+       super(original);
+       
+       this.cubeName = original.getCubeName();
+       
+       this.name = original.getName();
+       
+       this.visible = original.getVisible();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("VirtualCubeMeasure:");
@@ -2441,6 +2561,21 @@
     public DimensionUsage() {
     }

+    /**
+     * Creates a new DimensionUsage with all
+     * attributes copied from the given DimensionUsage.
+     */
+    public DimensionUsage(DimensionUsage original) {
+       super(original);
+       
+       this.source = original.getSource();
+       
+       this.level = original.getLevel();
+       
+       this.usagePrefix = original.getUsagePrefix();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("DimensionUsage:");
@@ -2577,6 +2712,23 @@
     public Dimension() {
     }

+    /**
+     * Creates a new Dimension with all
+     * attributes copied from the given Dimension.
+     */
+    public Dimension(Dimension original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.type = original.getType();
+       
+       this.caption = original.getCaption();
+       
+       this.usagePrefix = original.getUsagePrefix();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Dimension:");
@@ -2831,6 +2983,37 @@
     public Hierarchy() {
     }

+    /**
+     * Creates a new Hierarchy with all
+     * attributes copied from the given Hierarchy.
+     */
+    public Hierarchy(Hierarchy original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.hasAll = original.getHasAll();
+       
+       this.allMemberName = original.getAllMemberName();
+       
+       this.allMemberCaption = original.getAllMemberCaption();
+       
+       this.allLevelName = original.getAllLevelName();
+       
+       this.primaryKey = original.getPrimaryKey();
+       
+       this.primaryKeyTable = original.getPrimaryKeyTable();
+       
+       this.defaultMember = original.getDefaultMember();
+       
+       this.memberReaderClass = original.getMemberReaderClass();
+       
+       this.caption = original.getCaption();
+       
+       this.relation = original.getRelation();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Hierarchy:");
@@ -3318,6 +3501,55 @@
     public Level() {
     }

+    /**
+     * Creates a new Level with all
+     * attributes copied from the given Level.
+     */
+    public Level(Level original) {
+       super(original);
+       
+       this.approxRowCount = original.getApproxRowCount();
+       
+       this.name = original.getName();
+       
+       this.table = original.getTable();
+       
+       this.column = original.getColumn();
+       
+       this.nameColumn = original.getNameColumn();
+       
+       this.ordinalColumn = original.getOrdinalColumn();
+       
+       this.parentColumn = original.getParentColumn();
+       
+       this.nullParentValue = original.getNullParentValue();
+       
+       this.type = original.getType();
+       
+       this.uniqueMembers = original.getUniqueMembers();
+       
+       this.levelType = original.getLevelType();
+       
+       this.hideMemberIf = original.getHideMemberIf();
+       
+       this.formatter = original.getFormatter();
+       
+       this.caption = original.getCaption();
+       
+       this.captionColumn = original.getCaptionColumn();
+       
+       this.keyExp = original.getKeyExp();
+       
+       this.nameExp = original.getNameExp();
+       
+       this.ordinalExp = original.getOrdinalExp();
+       
+       this.parentExp = original.getParentExp();
+       
+       this.closure = original.getClosure();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Level:");
@@ -4032,6 +4264,21 @@
     public Closure() {
     }

+    /**
+     * Creates a new Closure with all
+     * attributes copied from the given Closure.
+     */
+    public Closure(Closure original) {
+       super(original);
+       
+       this.parentColumn = original.getParentColumn();
+       
+       this.childColumn = original.getChildColumn();
+       
+       this.table = original.getTable();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Closure:");
@@ -4195,6 +4442,25 @@
     public Property() {
     }

+    /**
+     * Creates a new Property with all
+     * attributes copied from the given Property.
+     */
+    public Property(Property original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.column = original.getColumn();
+       
+       this.type = original.getType();
+       
+       this.formatter = original.getFormatter();
+       
+       this.caption = original.getCaption();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Property:");
@@ -4355,6 +4621,33 @@
     public Measure() {
     }

+    /**
+     * Creates a new Measure with all
+     * attributes copied from the given Measure.
+     */
+    public Measure(Measure original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.column = original.getColumn();
+       
+       this.datatype = original.getDatatype();
+       
+       this.formatString = original.getFormatString();
+       
+       this.aggregator = original.getAggregator();
+       
+       this.formatter = original.getFormatter();
+       
+       this.caption = original.getCaption();
+       
+       this.visible = original.getVisible();
+       
+       this.measureExp = original.getMeasureExp();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Measure:");
@@ -4724,6 +5017,29 @@
     public CalculatedMember() {
     }

+    /**
+     * Creates a new CalculatedMember with all
+     * attributes copied from the given CalculatedMember.
+     */
+    public CalculatedMember(CalculatedMember original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.formatString = original.getFormatString();
+       
+       this.caption = original.getCaption();
+       
+       this.formula = original.getFormula();
+       
+       this.dimension = original.getDimension();
+       
+       this.visible = original.getVisible();
+       
+       this.formulaElement = original.getFormulaElement();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("CalculatedMember:");
@@ -5050,6 +5366,23 @@
     public CalculatedMemberProperty() {
     }

+    /**
+     * Creates a new CalculatedMemberProperty with all
+     * attributes copied from the given CalculatedMemberProperty.
+     */
+    public CalculatedMemberProperty(CalculatedMemberProperty original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.caption = original.getCaption();
+       
+       this.expression = original.getExpression();
+       
+       this.value = original.getValue();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("CalculatedMemberProperty:");
@@ -5212,6 +5545,21 @@
     public NamedSet() {
     }

+    /**
+     * Creates a new NamedSet with all
+     * attributes copied from the given NamedSet.
+     */
+    public NamedSet(NamedSet original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.formula = original.getFormula();
+       
+       this.formulaElement = original.getFormulaElement();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("NamedSet:");
@@ -5380,6 +5728,15 @@
     public Formula() {
     }

+    /**
+     * Creates a new Formula with all
+     * attributes copied from the given Formula.
+     */
+    public Formula(Formula original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Formula:");
@@ -5461,6 +5818,19 @@
     public MemberReaderParameter() {
     }

+    /**
+     * Creates a new MemberReaderParameter with all
+     * attributes copied from the given MemberReaderParameter.
+     */
+    public MemberReaderParameter(MemberReaderParameter original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.value = original.getValue();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("MemberReaderParameter:");
@@ -5559,6 +5929,15 @@
     public RelationOrJoin() {
     }

+    /**
+     * Creates a new RelationOrJoin with all
+     * attributes copied from the given RelationOrJoin.
+     */
+    public RelationOrJoin(RelationOrJoin original) {
+       super(original);
+       
+    }
+


        @Override
@@ -5626,6 +6005,15 @@
     public Relation() {
     }

+    /**
+     * Creates a new Relation with all
+     * attributes copied from the given Relation.
+     */
+    public Relation(Relation original) {
+       super(original);
+       
+    }
+


        @Override
@@ -5699,6 +6087,17 @@
     public View() {
     }

+    /**
+     * Creates a new View with all
+     * attributes copied from the given View.
+     */
+    public View(View original) {
+       super(original);
+       
+       this.alias = original.getAlias();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("View:");
@@ -5879,6 +6278,17 @@
     public SQL() {
     }

+    /**
+     * Creates a new SQL with all
+     * attributes copied from the given SQL.
+     */
+    public SQL(SQL original) {
+       super(original);
+       
+       this.dialect = original.getDialect();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("SQL:");
@@ -5979,6 +6389,27 @@
     public Join() {
     }

+    /**
+     * Creates a new Join with all
+     * attributes copied from the given Join.
+     */
+    public Join(Join original) {
+       super(original);
+       
+       this.leftAlias = original.getLeftAlias();
+       
+       this.leftKey = original.getLeftKey();
+       
+       this.rightAlias = original.getRightAlias();
+       
+       this.rightKey = original.getRightKey();
+       
+       this.left = original.getLeft();
+       
+       this.right = original.getRight();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Join:");
@@ -6228,6 +6659,23 @@
     public Table() {
     }

+    /**
+     * Creates a new Table with all
+     * attributes copied from the given Table.
+     */
+    public Table(Table original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.schema = original.getSchema();
+       
+       this.alias = original.getAlias();
+       
+       this.filter = original.getFilter();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Table:");
@@ -6572,6 +7020,21 @@
     public InlineTable() {
     }

+    /**
+     * Creates a new InlineTable with all
+     * attributes copied from the given InlineTable.
+     */
+    public InlineTable(InlineTable original) {
+       super(original);
+       
+       this.alias = original.getAlias();
+       
+       this.columnDefs = original.getColumnDefs();
+       
+       this.rows = original.getRows();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("InlineTable:");
@@ -6770,6 +7233,15 @@
     public ColumnDefs() {
     }

+    /**
+     * Creates a new ColumnDefs with all
+     * attributes copied from the given ColumnDefs.
+     */
+    public ColumnDefs(ColumnDefs original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("ColumnDefs:");
@@ -6931,6 +7403,19 @@
     public ColumnDef() {
     }

+    /**
+     * Creates a new ColumnDef with all
+     * attributes copied from the given ColumnDef.
+     */
+    public ColumnDef(ColumnDef original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.type = original.getType();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("ColumnDef:");
@@ -7034,6 +7519,15 @@
     public Rows() {
     }

+    /**
+     * Creates a new Rows with all
+     * attributes copied from the given Rows.
+     */
+    public Rows(Rows original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Rows:");
@@ -7196,6 +7690,15 @@
     public Row() {
     }

+    /**
+     * Creates a new Row with all
+     * attributes copied from the given Row.
+     */
+    public Row(Row original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Row:");
@@ -7358,6 +7861,17 @@
     public Value() {
     }

+    /**
+     * Creates a new Value with all
+     * attributes copied from the given Value.
+     */
+    public Value(Value original) {
+       super(original);
+       
+       this.column = original.getColumn();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Value:");
@@ -7462,6 +7976,19 @@
     public AggTable() {
     }

+    /**
+     * Creates a new AggTable with all
+     * attributes copied from the given AggTable.
+     */
+    public AggTable(AggTable original) {
+       super(original);
+       
+       this.ignorecase = original.getIgnorecase();
+       
+       this.factcount = original.getFactcount();
+       
+    }
+

     /**
                 Whether or not the match should ignore case.
@@ -7917,6 +8444,17 @@
     public AggName() {
     }

+    /**
+     * Creates a new AggName with all
+     * attributes copied from the given AggName.
+     */
+    public AggName(AggName original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggName:");
@@ -8004,6 +8542,17 @@
     public AggPattern() {
     }

+    /**
+     * Creates a new AggPattern with all
+     * attributes copied from the given AggPattern.
+     */
+    public AggPattern(AggPattern original) {
+       super(original);
+       
+       this.pattern = original.getPattern();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggPattern:");
@@ -8186,6 +8735,21 @@
     public AggExclude() {
     }

+    /**
+     * Creates a new AggExclude with all
+     * attributes copied from the given AggExclude.
+     */
+    public AggExclude(AggExclude original) {
+       super(original);
+       
+       this.pattern = original.getPattern();
+       
+       this.name = original.getName();
+       
+       this.ignorecase = original.getIgnorecase();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggExclude:");
@@ -8307,6 +8871,17 @@
     public AggColumnName() {
     }

+    /**
+     * Creates a new AggColumnName with all
+     * attributes copied from the given AggColumnName.
+     */
+    public AggColumnName(AggColumnName original) {
+       super(original);
+       
+       this.column = original.getColumn();
+       
+    }
+

     /**
                 The name of the fact count column.
@@ -8393,6 +8968,15 @@
     public AggFactCount() {
     }

+    /**
+     * Creates a new AggFactCount with all
+     * attributes copied from the given AggFactCount.
+     */
+    public AggFactCount(AggFactCount original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggFactCount:");
@@ -8461,6 +9045,15 @@
     public AggIgnoreColumn() {
     }

+    /**
+     * Creates a new AggIgnoreColumn with all
+     * attributes copied from the given AggIgnoreColumn.
+     */
+    public AggIgnoreColumn(AggIgnoreColumn original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggIgnoreColumn:");
@@ -8532,6 +9125,19 @@
     public AggForeignKey() {
     }

+    /**
+     * Creates a new AggForeignKey with all
+     * attributes copied from the given AggForeignKey.
+     */
+    public AggForeignKey(AggForeignKey original) {
+       super(original);
+       
+       this.factColumn = original.getFactColumn();
+       
+       this.aggColumn = original.getAggColumn();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggForeignKey:");
@@ -8634,6 +9240,19 @@
     public AggLevel() {
     }

+    /**
+     * Creates a new AggLevel with all
+     * attributes copied from the given AggLevel.
+     */
+    public AggLevel(AggLevel original) {
+       super(original);
+       
+       this.column = original.getColumn();
+       
+       this.name = original.getName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggLevel:");
@@ -8736,6 +9355,19 @@
     public AggMeasure() {
     }

+    /**
+     * Creates a new AggMeasure with all
+     * attributes copied from the given AggMeasure.
+     */
+    public AggMeasure(AggMeasure original) {
+       super(original);
+       
+       this.column = original.getColumn();
+       
+       this.name = original.getName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("AggMeasure:");
@@ -8838,6 +9470,15 @@
     public Expression() {
     }

+    /**
+     * Creates a new Expression with all
+     * attributes copied from the given Expression.
+     */
+    public Expression(Expression original) {
+       super(original);
+       
+    }
+


        @Override
@@ -8905,6 +9546,19 @@
     public Column() {
     }

+    /**
+     * Creates a new Column with all
+     * attributes copied from the given Column.
+     */
+    public Column(Column original) {
+       super(original);
+       
+       this.table = original.getTable();
+       
+       this.name = original.getName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Column:");
@@ -9014,6 +9668,15 @@
     public ExpressionView() {
     }

+    /**
+     * Creates a new ExpressionView with all
+     * attributes copied from the given ExpressionView.
+     */
+    public ExpressionView(ExpressionView original) {
+       super(original);
+       
+    }
+

     /**  */
     private final List<SQL> expressions = new ArrayList<SQL>();
@@ -9180,6 +9843,15 @@
     public KeyExpression() {
     }

+    /**
+     * Creates a new KeyExpression with all
+     * attributes copied from the given KeyExpression.
+     */
+    public KeyExpression(KeyExpression original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("KeyExpression:");
@@ -9248,6 +9920,15 @@
     public ParentExpression() {
     }

+    /**
+     * Creates a new ParentExpression with all
+     * attributes copied from the given ParentExpression.
+     */
+    public ParentExpression(ParentExpression original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("ParentExpression:");
@@ -9316,6 +9997,15 @@
     public OrdinalExpression() {
     }

+    /**
+     * Creates a new OrdinalExpression with all
+     * attributes copied from the given OrdinalExpression.
+     */
+    public OrdinalExpression(OrdinalExpression original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("OrdinalExpression:");
@@ -9384,6 +10074,15 @@
     public NameExpression() {
     }

+    /**
+     * Creates a new NameExpression with all
+     * attributes copied from the given NameExpression.
+     */
+    public NameExpression(NameExpression original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("NameExpression:");
@@ -9452,6 +10151,15 @@
     public CaptionExpression() {
     }

+    /**
+     * Creates a new CaptionExpression with all
+     * attributes copied from the given CaptionExpression.
+     */
+    public CaptionExpression(CaptionExpression original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("CaptionExpression:");
@@ -9520,6 +10228,15 @@
     public MeasureExpression() {
     }

+    /**
+     * Creates a new MeasureExpression with all
+     * attributes copied from the given MeasureExpression.
+     */
+    public MeasureExpression(MeasureExpression original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("MeasureExpression:");
@@ -9591,6 +10308,19 @@
     public Role() {
     }

+    /**
+     * Creates a new Role with all
+     * attributes copied from the given Role.
+     */
+    public Role(Role original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.union = original.getUnion();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Role:");
@@ -9811,6 +10541,17 @@
     public Grant() {
     }

+    /**
+     * Creates a new Grant with all
+     * attributes copied from the given Grant.
+     */
+    public Grant(Grant original) {
+       super(original);
+       
+       this.access = original.getAccess();
+       
+    }
+

     /** Values correspond to Access. */
     private String /* */ access;
@@ -9901,6 +10642,15 @@
     public SchemaGrant() {
     }

+    /**
+     * Creates a new SchemaGrant with all
+     * attributes copied from the given SchemaGrant.
+     */
+    public SchemaGrant(SchemaGrant original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("SchemaGrant:");
@@ -10068,6 +10818,17 @@
     public CubeGrant() {
     }

+    /**
+     * Creates a new CubeGrant with all
+     * attributes copied from the given CubeGrant.
+     */
+    public CubeGrant(CubeGrant original) {
+       super(original);
+       
+       this.cube = original.getCube();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("CubeGrant:");
@@ -10331,6 +11092,17 @@
     public DimensionGrant() {
     }

+    /**
+     * Creates a new DimensionGrant with all
+     * attributes copied from the given DimensionGrant.
+     */
+    public DimensionGrant(DimensionGrant original) {
+       super(original);
+       
+       this.dimension = original.getDimension();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("DimensionGrant:");
@@ -10423,6 +11195,23 @@
     public HierarchyGrant() {
     }

+    /**
+     * Creates a new HierarchyGrant with all
+     * attributes copied from the given HierarchyGrant.
+     */
+    public HierarchyGrant(HierarchyGrant original) {
+       super(original);
+       
+       this.hierarchy = original.getHierarchy();
+       
+       this.topLevel = original.getTopLevel();
+       
+       this.bottomLevel = original.getBottomLevel();
+       
+       this.rollupPolicy = original.getRollupPolicy();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("HierarchyGrant:");
@@ -10668,6 +11457,19 @@
     public MemberGrant() {
     }

+    /**
+     * Creates a new MemberGrant with all
+     * attributes copied from the given MemberGrant.
+     */
+    public MemberGrant(MemberGrant original) {
+       super(original);
+       
+       this.member = original.getMember();
+       
+       this.access = original.getAccess();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("MemberGrant:");
@@ -10770,6 +11572,15 @@
     public Union() {
     }

+    /**
+     * Creates a new Union with all
+     * attributes copied from the given Union.
+     */
+    public Union(Union original) {
+       super(original);
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("Union:");
@@ -10931,6 +11742,17 @@
     public RoleUsage() {
     }

+    /**
+     * Creates a new RoleUsage with all
+     * attributes copied from the given RoleUsage.
+     */
+    public RoleUsage(RoleUsage original) {
+       super(original);
+       
+       this.roleName = original.getRoleName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("RoleUsage:");
@@ -11017,6 +11839,19 @@
     public UserDefinedFunction() {
     }

+    /**
+     * Creates a new UserDefinedFunction with all
+     * attributes copied from the given UserDefinedFunction.
+     */
+    public UserDefinedFunction(UserDefinedFunction original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.className = original.getClassName();
+       
+    }
+
        public String toString() {
                StringBuilder retStr = new StringBuilder();
                retStr.append("UserDefinedFunction:");
@@ -11121,6 +11956,25 @@
      * set to their defaults.
      */
     public Parameter() {
+    }
+
+    /**
+     * Creates a new Parameter with all
+     * attributes copied from the given Parameter.
+     */
+    public Parameter(Parameter original) {
+       super(original);
+       
+       this.name = original.getName();
+       
+       this.description = original.getDescription();
+       
+       this.type = original.getType();
+       
+       this.modifiable = original.getModifiable();
+       
+       this.defaultValue = original.getDefaultValue();
+       
     }

        public String toString() {

Modified: trunk/src/ca/sqlpower/architect/olap/OLAPObject.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/olap/OLAPObject.java        (original)
+++ trunk/src/ca/sqlpower/architect/olap/OLAPObject.java Wed Sep 3 10:05:45 2008
@@ -57,6 +57,11 @@
     protected OLAPObject() {
         pcs = new PropertyChangeSupport(this);
     }
+
+    protected OLAPObject(OLAPObject original) {
+        pcs = new PropertyChangeSupport(this);
+        this.parent = original.getParent();
+    }

     /**
      * Returns the current OLAPObject that is this object's parent. If this

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 Sep 3 10:05:45 2008
@@ -48,6 +48,17 @@
      */
     public <xsl:value-of select="@type"/>() {
     }
+
+    /**
+     * Creates a new <xsl:value-of select="@type"/> with all
+     * attributes copied from the given <xsl:value-of select="@type"/>.
+     */
+ public <xsl:value-of select="@type"/>(<xsl:value-of select="@type"/> original) {
+       super(original);
+       <xsl:for-each select="Attribute|Object">
+ this.<xsl:value-of select="@name"/> = original.get<xsl:call-template name="name-initcap"/>();
+       </xsl:for-each>
+    }

        public String toString() {
                StringBuilder retStr = new StringBuilder();
@@ -99,6 +110,17 @@
      * set to their defaults.
      */
     public <xsl:value-of select="@class"/>() {
+    }
+
+    /**
+     * Creates a new <xsl:value-of select="@class"/> with all
+     * attributes copied from the given <xsl:value-of select="@class"/>.
+     */
+ public <xsl:value-of select="@class"/>(<xsl:value-of select="@class"/> original) {
+       super(original);
+       <xsl:for-each select="Attribute|Object">
+ this.<xsl:value-of select="@name"/> = original.get<xsl:call-template name="name-initcap"/>();
+       </xsl:for-each>
     }

 <xsl:apply-templates/>

Reply via email to