Exemplo n.º 1
0
        static String test(String query)
        {
            MyDiagnosticHandler diagnosticHandler = new MyDiagnosticHandler();

            InMemoryStore store = InMemoryStore.getInstance();
            Zorba         zorba = Zorba.getInstance(store);

            XQuery        xquery   = zorba.compileQuery(query, diagnosticHandler);
            StringBuilder sbuilder = new StringBuilder();
            Iterator      iter     = xquery.iterator();

            iter.open();
            Item item = new Item();

            while (iter.next(item))
            {
                sbuilder.Append(item.getStringValue());
            }
            iter.close();
            iter.Dispose();
            xquery.destroy();
            xquery.Dispose();

            zorba.shutdown();
            InMemoryStore.shutdown(store);

            return(sbuilder.ToString());
        }
Exemplo n.º 2
0
        static String test(String query)
        {
            MyDiagnosticHandler diagnosticHandler = new MyDiagnosticHandler();

            InMemoryStore store = InMemoryStore.getInstance();
            Zorba zorba = Zorba.getInstance(store);

            XQuery xquery = zorba.compileQuery(query, diagnosticHandler);
            StringBuilder sbuilder = new StringBuilder();
            Iterator iter = xquery.iterator();
            iter.open();
            Item item = new Item();
            while (iter.next(item)) {
              sbuilder.Append(item.getStringValue());
            }
            iter.close();
            iter.Dispose();
            xquery.destroy();
            xquery.Dispose();

            zorba.shutdown();
            InMemoryStore.shutdown(store);

            return sbuilder.ToString();
        }
Exemplo n.º 3
0
        static String test(String query)
        {
            MyDiagnosticHandler diagnosticHandler = new MyDiagnosticHandler();

            InMemoryStore store = InMemoryStore.getInstance();
            Zorba         zorba = Zorba.getInstance(store);

            XQuery xquery = zorba.compileQuery(query, diagnosticHandler);

            StringBuilder sbuilder = new StringBuilder();

            sbuilder.Append(xquery.execute());

            xquery.destroy();
            xquery.Dispose();

            zorba.shutdown();
            InMemoryStore.shutdown(store);

            return(sbuilder.ToString());
        }
Exemplo n.º 4
0
        static String test(String query)
        {
            MyDiagnosticHandler diagnosticHandler = new MyDiagnosticHandler();

            InMemoryStore store = InMemoryStore.getInstance();
            Zorba zorba = Zorba.getInstance(store);

            XQuery xquery = zorba.compileQuery(query, diagnosticHandler);

            StringBuilder sbuilder = new StringBuilder();
            sbuilder.Append(xquery.execute());

            xquery.destroy();
            xquery.Dispose();

            zorba.shutdown();
            InMemoryStore.shutdown(store);

            return sbuilder.ToString();
        }