Examples of nodes()


Examples of com.ibm.sbt.util.JsonNavigator.nodes()

                HandlerJson json= new HandlerJson();
                JsonJavaObject result = (JsonJavaObject)svc.get(getServiceUrl(),parameters,json).getData();
                if(result!=null) {
                    if(StringUtil.isNotEmpty(splitPath)) {
                        JsonNavigator nav = new JsonNavigator(result);
                        List<Object> nodes = nav.nodes(splitPath);
                        if(nodes!=null) {
                            data=nodes.toArray();
                        }
                    }
                }
View Full Code Here

Examples of com.jcabi.xml.XML.nodes()

            );
            final Directives dirs = new Directives().xpath("/github/gists")
                .add("gist")
                .add("id").set(number).up()
                .add("files");
            final List<XML> files = xml.nodes(
                String.format("%s/files/file", this.xpath())
            );
            for (final XML file : files) {
                final String filename = file.xpath("filename/text()").get(0);
                // @checkstyle MultipleStringLiterals (3 lines)
View Full Code Here

Examples of com.jcabi.xml.XML.nodes()

    @Test
    public void convertsXmlToJson() throws Exception {
        final XML xml = new XMLDocument(
            "<user><name>Jeff</name><dept><title>IT</title></dept></user>"
        );
        final JsonObject json = new JsonNode(xml.nodes("user").get(0)).json();
        MatcherAssert.assertThat(json, Matchers.notNullValue());
        MatcherAssert.assertThat(
            json.getString("name"),
            Matchers.equalTo("Jeff")
        );
View Full Code Here

Examples of com.jcabi.xml.XMLDocument.nodes()

    @Test
    public void convertsXmlToJson() throws Exception {
        final XML xml = new XMLDocument(
            "<user><name>Jeff</name><dept><title>IT</title></dept></user>"
        );
        final JsonObject json = new JsonNode(xml.nodes("user").get(0)).json();
        MatcherAssert.assertThat(json, Matchers.notNullValue());
        MatcherAssert.assertThat(
            json.getString("name"),
            Matchers.equalTo("Jeff")
        );
View Full Code Here

Examples of com.tll.util.PropertyPath.nodes()

          if(pname.indexOf('.') > 0) {
            pquery = query;
            // descend one time for each node in the pname (which may be a dot
            // notated property path)
            final PropertyPath path = new PropertyPath(pname);
            for(final String node : path.nodes()) {
              pquery = pquery.descend(node);
            }
          }
          else {
            pquery = query.descend(pname);
View Full Code Here

Examples of com.xmlcalabash.model.InlineBinding.nodes()

            }

            pipe = start.getBinding(pnbinding.getStep(), pnbinding.getPort());
        } else if (binding.getBindingType() == Binding.INLINE_BINDING) {
            InlineBinding ibinding = (InlineBinding) binding;
            pipe = new ReadableInline(runtime, ibinding.nodes(), ibinding.getExcludedNamespaces());
        } else if (binding.getBindingType() == Binding.EMPTY_BINDING) {
            pipe = new ReadableDocument(runtime);
        } else if (binding.getBindingType() == Binding.DOCUMENT_BINDING) {
            DocumentBinding dbinding = (DocumentBinding) binding;
            pipe = runtime.getConfigurer().getXMLCalabashConfigurer().makeReadableDocument(runtime, dbinding);
View Full Code Here

Examples of diva.graph.GraphModel.nodes()

    protected Object copyComposite(Object origComposite) {
        GraphModel model = getLayoutTarget().getGraphModel();
        Object copyComposite = _local.createComposite(null);
        HashMap map = new HashMap();

        for (Iterator i = model.nodes(origComposite); i.hasNext();) {
            Object origNode = i.next();

            if (getLayoutTarget().isNodeVisible(origNode)) {
                Rectangle2D r = getLayoutTarget().getBounds(origNode);
                LevelInfo inf = new LevelInfo();
View Full Code Here

Examples of net.kuujo.copycat.test.TestCluster.nodes()

    cluster.start();

    node1.await().leaderElected();

    int leaderCount = 0;
    for (TestNode node : cluster.nodes()) {
      if (node.instance().isLeader()) {
        leaderCount++;
      }
    }
View Full Code Here

Examples of org.apache.kafka.common.Cluster.nodes()

        this.metadataFetchInProgress = false;
        MetadataResponse response = new MetadataResponse(body);
        Cluster cluster = response.cluster();
        // don't update the cluster if there are no valid nodes...the topic we want may still be in the process of being
        // created which means we will get errors and no nodes until it exists
        if (cluster.nodes().size() > 0)
            this.metadata.update(cluster, now);
        else
            log.trace("Ignoring empty metadata response with correlation id {}.", header.correlationId());
    }
View Full Code Here

Examples of org.eclipse.jetty.deploy.graph.Path.nodes()

        Node toNode = lifecycle.getNodeByName(to);
        Path actual = lifecycle.getPath(fromNode,toNode);
        String msg = "LifeCycle path from " + from + " to " + to;
        Assert.assertNotNull(msg + " should never be null",actual);

        if (expected.size() != actual.nodes())
        {
            System.out.println();
            System.out.printf("/* from '%s' -> '%s' */%n",from,to);
            System.out.println("/* Expected Path */");
            for (String path : expected)
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.