tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;
//save to log content before import
final PrintWriter fLog = log;
final XSpreadsheets xSheets = xSheetDoc.getSheets();
log.println("Sheets before importing :") ;
String[] names = xSheets.getElementNames() ;
for (int i = 0; i < names.length; i++) {
log.println(" " + names[i]) ;
}
tEnv.addObjRelation("XDocumentHandler.ImportChecker",
new ifc.xml.sax._XDocumentHandler.ImportChecker() {
public boolean checkImport() {
fLog.println("Sheet names :") ;
String[] snames = xSheets.getElementNames() ;
for (int i = 0; i < snames.length; i++) {
fLog.println(" " + snames[i]) ;
}
return xSheets.hasByName(impValue) ;
}
}) ;
return tEnv;
} // finish method getTestEnvironment