Package org.zorbaxquery.api

Examples of org.zorbaxquery.api.Iterator.open()


    //System.err.println("ZorbaReducer: binding value: " + buf.toString());
    // log.info("binding value: " + buf.toString());

    // execute query and get iterator
    Iterator iter = xquery.iterator();
    iter.open();

    // loop over all items
    Item item = new Item();
    Text keyData = new Text();
    keyData.set("zero");
View Full Code Here


    System.err.println("ZorbaMapper: binding value: " + value);
    //log.info("binding value: " + value.toString());

    // execute query and get iterator
    Iterator iter = xquery.iterator();
    iter.open();
   
    //loop over all items.
    Item item = new Item();
    Text keyData = new Text();
       
View Full Code Here

    Store store = InMemoryStore.getInstance();
    Zorba zorba = Zorba.getInstance(store);
    XQuery xquery = zorba.compileQuery("declare variable $input external; for $x in $input//b return $x");
    xquery.setVariableAsDocument("input", "test.xml", "<a><b>Hallo</b><b>Lukas</b><b>1</b></a>");
    Iterator iter = xquery.iterator();
    iter.open();
    Item item = new Item();
    while(iter.next(item)){
      String test = item.getStringValue();
      System.out.println(test);
    }
View Full Code Here

    Zorba zorba = Zorba.getInstance(store);
    String query = "declare variable $test external;" + "$test//b";
    XQuery xquery = zorba.compileQuery(query);
    xquery.setVariableAsDocument("test", filename, value);
    Iterator iter = xquery.iterator();
    iter.open();
    Item item = new Item();
    while (iter.next(item)) {
      String itemStr = item.serialize();
      System.out.println(itemStr);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.