use of org.apache.asterix.external.classad.ClassAdUnParser in project asterixdb by apache.
the class FunctionalTester method print_expr.
/*********************************************************************
* Function: print_expr
* Purpose:
*
* @throws HyracksDataException
*********************************************************************/
public static void print_expr(ExprTree tree, State state, Parameters parameters, ClassAdObjectPool objectPool) throws HyracksDataException {
AMutableCharArrayString output = new AMutableCharArrayString();
if (state.format == PrintFormat.print_Compact) {
ClassAdUnParser unparser = new ClassAdUnParser(objectPool);
unparser.unparse(output, tree);
} else if (state.format == PrintFormat.print_Pretty) {
PrettyPrint unparser = new PrettyPrint(objectPool);
unparser.unparse(output, tree);
} else if (state.format == PrintFormat.print_XML) {
/*
* ClassAdXMLUnParser unparser = new
* ClassAdXMLUnParser();
* unparser.SetCompactSpacing(true);
* unparser.Unparse(output, tree);
* } else if (state.format ==
* PrintFormat.print_XMLPretty) {
* ClassAdXMLUnParser unparser = new
* ClassAdXMLUnParser();
* unparser.SetCompactSpacing(false);
* unparser.Unparse(output, tree);
*/
}
System.out.println(output);
}
Aggregations