public void createDimension(XDimension dim) throws LensException { createDimension(JAXBUtils.dimensionFromXDimension(dim)); } /**
/** * Create dimension defined by attributes and properties * * @param name Name of the dimension * @param attributes Attributes of the dimension * @param properties Properties of the dimension * @param weight Weight of the dimension * @throws LensException */ public void createDimension(String name, Set<CubeDimAttribute> attributes, Map<String, String> properties, double weight) throws LensException { Dimension dim = new Dimension(name, attributes, properties, weight); createDimension(dim); }
public void createDimension(XDimension dim) throws LensException { createDimension(JAXBUtils.dimensionFromXDimension(dim)); }
/** * Create dimension defined by attributes and properties * * @param name Name of the dimension * @param attributes Attributes of the dimension * @param properties Properties of the dimension * @param weight Weight of the dimension * @throws LensException */ public void createDimension(String name, Set<CubeDimAttribute> attributes, Map<String, String> properties, double weight) throws LensException { Dimension dim = new Dimension(name, attributes, properties, weight); createDimension(dim); }
@Override public void createDimension(LensSessionHandle sessionid, XDimension dimension) throws LensException { try (SessionContext ignored = new SessionContext(sessionid)){ getClient(sessionid).createDimension(dimension); log.info("Created dimension " + dimension.getName()); } }
public <T extends Equals & HashCode & ToString> void createEntity(T entity) throws LensException { if (entity instanceof XStorage) { createStorage((XStorage) entity); } else if (entity instanceof XCube) { createCube((XCube)entity); } else if (entity instanceof XDimension) { createDimension((XDimension) entity); } else if (entity instanceof XFact) { createFactTable((XFact) entity); } else if (entity instanceof XDimensionTable) { createCubeDimensionTable((XDimensionTable) entity); } else if (entity instanceof XSegmentation) { createSegmentation((XSegmentation) entity); } else { throw new LensException("Unable to create entity " + entity + " as it's unrecognizable: "+ entity.getClass()); } }
public <T extends Equals & HashCode & ToString> void createEntity(T entity) throws LensException { if (entity instanceof XStorage) { createStorage((XStorage) entity); } else if (entity instanceof XCube) { createCube((XCube) entity); } else if (entity instanceof XDimension) { createDimension((XDimension) entity); } else if (entity instanceof XFact) { createFactTable((XFact) entity); } else if (entity instanceof XDimensionTable) { createCubeDimensionTable((XDimensionTable) entity); } else if (entity instanceof XSegmentation) { createSegmentation((XSegmentation) entity); } else { throw new LensException("Unable to create entity " + entity + " as it's unrecognizable: " + entity.getClass()); } }
@Test(priority = 1) public void testDimension() throws Exception { client.createDimension(zipDim); client.createDimension(cityDim); client.createDimension(stateDim); client.createDimension(countryDim);