int level) {
String value = null;
String type = null;
if (node.getCaseValue() != null) {
ProductDimension nodeCaseValue = node.getCaseValue();
type = nodeCaseValue.getProductDimensionType();
if (nodeCaseValue instanceof ProductCanonicalCondition) {
value = String.valueOf(((ProductCanonicalCondition) nodeCaseValue).getCondition());
} else if (nodeCaseValue instanceof ProductBiddingCategory) {
ProductBiddingCategory productBiddingCategory = (ProductBiddingCategory) nodeCaseValue;
value = String.format("%s(%s)", productBiddingCategory.getType(),
productBiddingCategory.getValue());
} else if (nodeCaseValue instanceof ProductBrand){
ProductBrand productBrand = (ProductBrand) nodeCaseValue;
value = productBrand.getValue();
} else {
value = nodeCaseValue.toString();
}
}
System.out.printf("%sid: %d, type: %s, value: %s%n", Strings.repeat(" ", level), node.getId(),
type, value);