Examples of NodeSelector


Examples of org.exist.xquery.NodeSelector

        assertEquals(9492, set.getLength());
    }
   
    @Test
    public void descendantOrSelfSelector() throws XPathException {
        NodeSelector selector = new DescendantOrSelfSelector(seqSpeech.toNodeSet(), -1);
        NameTest test = new NameTest(Type.ELEMENT, new QName("SPEECH", ""));
        NodeSet set = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, seqSpeech.getDocumentSet(), test.getName(), selector);
       
        assertEquals(2628, set.getLength());
    }
View Full Code Here

Examples of org.exist.xquery.NodeSelector

        assertEquals(2628, set.getLength());
    }
   
    @Test
    public void ancestorSelector() throws XPathException {
        NodeSelector selector = new AncestorSelector(seqSpeech.toNodeSet(), -1, false, true);
        NameTest test = new NameTest(Type.ELEMENT, new QName("ACT", ""));
        NodeSet set = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, seqSpeech.getDocumentSet(),  test.getName(), selector);
       
        assertEquals(15, set.getLength());
    }
View Full Code Here

Examples of org.exist.xquery.NodeSelector

    }
   
    @Test
    public void ancestorSelector_self() throws XPathException {
        NodeSet ns = seqSpeech.toNodeSet();
        NodeSelector selector = new AncestorSelector(ns, -1, true, true);
        NameTest test = new NameTest(Type.ELEMENT, new QName("SPEECH", ""));
        NodeSet set = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, seqSpeech.getDocumentSet(), test.getName(), selector);
       
        assertEquals(2628, set.getLength());
    }
View Full Code Here

Examples of org.exist.xquery.NodeSelector

    @Test
    public void descendantSelector() throws XPathException, SAXException, PermissionDeniedException {
        Sequence seq = executeQuery(broker, "//SCENE", 72, null);
        NameTest test = new NameTest(Type.ELEMENT, new QName("SPEAKER", ""));
        NodeSelector selector = new DescendantSelector(seq.toNodeSet(), -1);
        NodeSet set = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, seq.getDocumentSet(), test.getName(), selector);
       
        assertEquals(2639, set.getLength());
    }
View Full Code Here

Examples of org.exist.xquery.NodeSelector

        try {
            broker = pool.get(null);
            final MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(this);
            final NodeProxy p = new NodeProxy(this, root.getNodeId(), root.getInternalAddress());
            final NodeSelector selector = new DescendantSelector(p, Expression.NO_CONTEXT_ID);
            return broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, docs, qname, selector, null);
        } catch (final Exception e) {
            LOG.warn("Exception while finding elements: " + e.getMessage(), e);
        } finally {
            pool.release(broker);
View Full Code Here

Examples of org.freeplane.view.swing.ui.mindmapmode.NodeSelector

      insertNodeLink = new JMenuItem(TextUtils.getText("SetNodeLink.text"));
      insertNodeLink.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent e) {
          final AttributeTable table = AttributePopupMenu.this.table;
          final Object oldValue = table.getValueAt(row, col);
          final NodeSelector nodeSelector = new NodeSelector();
          nodeSelector.show(table, new INodeSelector() {
            public void nodeSelected(NodeModel node) {
              if(node == null)
                return;
              final String inputValue = "#" + node.getID();
              try {
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.