public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
/** * Convert string map to XProperties */ public static List<XProperty> xPropertiesFromMap(Map<String, String> map) { List<XProperty> xpList = new ArrayList<XProperty>(); if (map != null && !map.isEmpty()) { for (Map.Entry<String, String> e : map.entrySet()) { XProperty property = XCF.createXProperty(); property.setName(e.getKey()); property.setValue(e.getValue()); xpList.add(property); } } return xpList; }
public static List<XProperty> xPropertyFromMap(Map<String, String> map) { List<XProperty> xpList = new ArrayList<XProperty>(); if (map != null && !map.isEmpty()) { for (Map.Entry<String, String> e : map.entrySet()) { XProperty property = new XProperty(); property.setName(e.getKey()); property.setValue(e.getValue()); xpList.add(property); } } return xpList; }
dimension.setJoinChains(new XJoinChains()); dimension.setProperties(new XProperties().withProperty( new XProperty().withName(MetastoreUtil.getDimTimedDimensionKey(dimName)).withValue("dt")) ); XDimAttribute xd1 = cubeObjectFactory.createXDimAttribute(); xp1.setName("dimension.foo"); xp1.setValue("dim.bar"); dimension.getProperties().getProperty().add(xp1); return dimension;
public XProperty withValue(String value) { setValue(value); return this; }
public XProperty withName(String value) { setName(value); return this; }
/** * Create an instance of {@link XProperty } * */ public XProperty createXProperty() { return new XProperty(); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public String toString() { final ToStringStrategy strategy = new YAMLToStringStrategy(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public XProperty withValue(String value) { setValue(value); return this; }
public XProperty withName(String value) { setName(value); return this; }
/** * Create an instance of {@link XProperty } * */ public XProperty createXProperty() { return new XProperty(); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public String toString() { final ToStringStrategy strategy = new YAMLToStringStrategy(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
/** * Convert string map to XProperties */ public static List<XProperty> xPropertiesFromMap(Map<String, String> map) { List<XProperty> xpList = new ArrayList<XProperty>(); if (map != null && !map.isEmpty()) { for (Map.Entry<String, String> e : map.entrySet()) { XProperty property = XCF.createXProperty(); property.setName(e.getKey()); property.setValue(e.getValue()); xpList.add(property); } } return xpList; }
public static XCube createXCubeWithDummyMeasure(final String cubeName, final Optional<String> dateColName, final XDimAttributes xDimAttributes, final XMeasures xMeasures) { XBaseCube cube = new XBaseCube(); cube.setName(cubeName); cube.setDimAttributes(xDimAttributes); cube.setMeasures(xMeasures); if (dateColName.isPresent()) { XProperty xp = new XProperty(); xp.setName("cube."+cubeName+".timed.dimensions.list"); xp.setValue(dateColName.get()); XProperties xProperties = new XProperties(); xProperties.getProperty().add(xp); cube.setProperties(xProperties); } return cube; } public static XDimAttribute createXDimAttribute(final String name, final Optional<DateTime> startDate,
/** * Convert JAXB properties to Map<String, String> * * @param xProperties * @return {@link Map} */ public static Map<String, String> mapFromXProperties(XProperties xProperties) { Map<String, String> properties = new HashMap<String, String>(); if (xProperties != null && !xProperties.getProperty().isEmpty()) { for (XProperty xp : xProperties.getProperty()) { properties.put(xp.getName(), xp.getValue()); } } return properties; }
public static XProperties xPropertiesFromMap(Map<String, String> map) { ObjectFactory xCF = new ObjectFactory(); if (map != null && !map.isEmpty()) { XProperties xp = xCF.createXProperties(); List<XProperty> xpList = xp.getProperty(); for (Map.Entry<String, String> e : map.entrySet()) { XProperty property = xCF.createXProperty(); property.setName(e.getKey()); property.setValue(e.getValue()); xpList.add(property); } return xp; } return null; }