public class SchemaParser extends TestCase {
protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {
XInterface oObj = null;
XSimpleFileAccess simpleAccess = null;
XInputStream xStream = null;
String filename = null;
try {
oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
.createInstance("com.sun.star.comp.configuration.backend.xml.SchemaParser");
Object fileacc = ((XMultiServiceFactory)tParam.getMSF()).createInstance("com.sun.star.comp.ucb.SimpleFileAccess");
simpleAccess = (XSimpleFileAccess)
UnoRuntime.queryInterface(XSimpleFileAccess.class,fileacc);
filename = util.utils.getOfficeURL((XMultiServiceFactory)tParam.getMSF())+"/../share/registry/schema/org/openoffice/Setup.xcs";
log.println("Going to parse: "+filename);
xStream = simpleAccess.openFileRead(filename);
} catch (com.sun.star.uno.Exception e) {
}
log.println("Implementation name: "+ util.utils.getImplName(oObj));