Subversion

2lt

?curdirlinks? - Rev 1

?prevdifflink? - Blame


   public static void main(String[] args) throws Exception {
        long start = System.currentTimeMillis();
        JavaQuery q = new JavaQuery();
        SchemaAwareConfiguration conf = new SchemaAwareConfiguration();
        conf.addSchemaSource( new StreamSource("../../examples/imdbNoTVDir.xsd"));
        q.setConfiguration(conf);
        
        System.out.println("xml\t"+(System.currentTimeMillis()-start));
        
        DynamicQueryContext context = new DynamicQueryContext(conf);
        context.setContextItem(conf.buildDocument(new StreamSource(args[0])));
        q.setDynamicContext(context);
        
        System.out.println("run\t"+(System.currentTimeMillis()-start));
        
        try{
        Result result = new StreamResult(new PrintStream("out"));
        Properties props = new Properties(); 
        q.run(result, props);
        } catch (Exception e) {e.printStackTrace();}
         
        System.out.println("total\t"+(System.currentTimeMillis()-start));
    }

}

Theme by Vikram Singh | Powered by WebSVN v2.3.3