Examples of NodeProxy


Examples of org.exist.dom.NodeProxy

      return args[0];
   
    NodeValue nv = (NodeValue) args[0].itemAt(0);
    if (!nv.isPersistentSet())
      return nv;
    NodeProxy node = (NodeProxy) nv;
   
    String matchStr = null;
    NodeId nodeId = null;
    try {
      for (EmbeddedXMLStreamReader reader = context.getBroker().getXMLStreamReader(node, true); reader.hasNext(); ) {
          int status = reader.next();
          if (status == XMLStreamConstants.CHARACTERS) {
            matchStr = reader.getText();
            nodeId = (NodeId) reader.getProperty(ExtendedXMLStreamReader.PROPERTY_NODE_ID);
            break;
          }
      }
    } catch (IOException e) {
      throw new XPathException(this, ErrorCodes.FOER0000, "Exception caught while reading document");
    } catch (XMLStreamException e) {
      throw new XPathException(this, ErrorCodes.FOER0000, "Exception caught while reading document");
    }
   
    if (nodeId != null) {
      Match match = new NGramMatch(getContextId(), node.getNodeId(), matchStr);
      match.addOffset(0, matchStr.length());
      node.addMatch(match);
    }
    return node;
  }
View Full Code Here

Examples of org.neo4j.kernel.impl.core.NodeProxy

            index.add(robin, "dummy", "value");

            ExecutionEngine engine = new ExecutionEngine(db);
            assertTrue(engine.execute("start n=node:layer3('withinDistance:[33.32, 44.44, 5.0]') return n").columnAs("n").hasNext());

            NodeProxy row = (org.neo4j.kernel.impl.core.NodeProxy) engine.execute("start n=node:layer3('withinDistance:[33.32, 44.44, 5.0]') return n").columnAs("n").next();
            assertEquals("robin", row.getProperty("name"));
            assertEquals("POINT(44.44 33.33)", row.getProperty("wkt"));

            //update the node
            robin.setProperty("wkt", "POINT(55.55 33.33)");
            index.add(robin, "dummy", "value");
            assertFalse(engine.execute("start n=node:layer3('withinDistance:[33.32, 44.44, 5.0]') return n").columnAs("n").hasNext());
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.