OracleConnection connection = new OracleConnection("zhixian-machine.xml");
connection.openConnection();
UserSession session = connection.openSession();
OracleDataWarehouse dw = new OracleDataWarehouse("SIMONE","DW_2");
dw.loadObject(connection);
//create oracle dimension
RelationalTable timeDimension = new RelationalTable("TIMEDIMENSIONTEST");
timeDimension.loadObject(connection);
OracleLevel yearLevel = new OracleLevel("YEAR 3",timeDimension,"YEAR");
yearLevel.setDescription("the year of shipment");
OracleLevel monthLevel = new OracleLevel("MONTH 3",timeDimension,"MONTH");
monthLevel.setDescription("the month of shipment");
OracleHierarchy hier = new OracleHierarchy("TIME HIER 3",timeDimension);
hier.setDescription("the Time Dimension main hier");
hier.addLevel(yearLevel);
hier.addLevel(monthLevel);
OracleDimension timeDim = new OracleDimension("TIME DIM 3",hier);
timeDim.setDescription("Time Dimension Descr");
//add it to the oracle data warehouse
dw.addDimension(timeDim);
timeDim.loadObject(connection);
//release database objects
dw.releaseObject();
connection.closeSession(session);
connection.closeConnection();
}
catch (Exception e) {