Examples of Node


Examples of javax.xml.soap.Node

           
           
            if (sh != null) {
              Iterator it = sh.getChildElements();
              while (it.hasNext()) {
                Node node = (Node) it.next();
                System.out.println("Name: " + node.getNodeName() + " - Value: " + node.getValue());
              }
            }
      }
    } catch (Exception e) {
      e.printStackTrace();

Examples of jcgp.backend.population.Node

     
      resources.println("[Parser] Parsing file: " + file.getAbsolutePath() + "...");
     
      int gene;
      Connection newConnection;
      Node changingNode;
      // for all nodes, columns first
      for (int c = 0; c < resources.columns(); c++) {
        for (int r = 0; r < resources.rows(); r++) {
          // store the changing node
          changingNode = chromosome.getNode(r, c);

          // for every connection
          for (int i = 0; i < resources.arity(); i++) {
            // get connection number from the .chr file
            gene = in.nextInt();
            if (gene < resources.inputs()) {
              // connection was an input
              newConnection = chromosome.getInput(gene);
            } else {
              // connection was another node, calculate which from its number
              newConnection = chromosome.getNode((gene - resources.inputs()) % resources.rows(),
                  (gene - resources.inputs()) / resources.rows());
            }
            changingNode.setConnection(i, newConnection);
          }

          // set the function, straight indexing should work - this is not entirely
          // safe, but it is not viable to check for functionset compatibility
          changingNode.setFunction(resources.getFunction(in.nextInt()));
        }
      }

      // outputs
      for (int o = 0; o < resources.outputs(); o ++) {

Examples of jease.cmf.domain.Node

  public NavigationTreeRenderer(ActionListener dropListener) {
    this.dropListener = dropListener;
  }

  public void render(Treeitem treeitem, Object value) throws Exception {
    Node node = (Node) value;
    treeitem.setLabel(node.getId());
    treeitem.setTooltiptext(node.getType());
    treeitem.setImage(JeaseSession.getConfig().getIcon(node));
    treeitem.setValue(node);
    if (dropListener != null) {
      if (!Arrays.contains(JeaseSession.getRoots(), node)) {
        treeitem.getTreerow().setDraggable(Node.class.getSimpleName());

Examples of jodd.lagarto.dom.Node

            nodeSelector = new NodeSelector(doc);
        }
        List<Node> elements = nodeSelector.select(expression);
        int size = elements.size();
        for (int i = 0; i < size; i++) {
            Node element = elements.get(i);
            if (matchNumber <=0 || found != matchNumber) {
                result.add(extractValue(attribute, element));
                found++;
            } else {
                break;

Examples of joshua.prefix_tree.Node

    Assert.assertTrue(simplePrefixTree.root.children.containsKey(sourceVocab.getID("it")));
    Assert.assertTrue(simplePrefixTree.root.children.containsKey(sourceVocab.getID("makes")));
    Assert.assertTrue(simplePrefixTree.root.children.containsKey(sourceVocab.getID("him")));
    Assert.assertTrue(simplePrefixTree.root.children.containsKey(PrefixTree.X));
   
    Node root_it = simplePrefixTree.root.children.get(sourceVocab.getID("it"));
    Node root_makes = simplePrefixTree.root.children.get(sourceVocab.getID("makes"));
    Node root_him = simplePrefixTree.root.children.get(sourceVocab.getID("him"));
    Node root_X = simplePrefixTree.root.children.get(PrefixTree.X);
   
    Assert.assertNotNull(root_it);
    Assert.assertNotNull(root_makes);
    Assert.assertNotNull(root_him);
    Assert.assertNotNull(root_X);
   
    /////////////////////////////
   
    Assert.assertEquals(root_it.children.size(), 2);
   
    Assert.assertTrue(root_it.children.containsKey(sourceVocab.getID("makes")));
    Assert.assertTrue(root_it.children.containsKey(PrefixTree.X));
   
    Node root_it_makes = root_it.children.get(sourceVocab.getID("makes"));
    Node root_it_X = root_it.children.get(PrefixTree.X);
       
    Assert.assertNotNull(root_it_makes);
    Assert.assertNotNull(root_it_X);

    /////////////////////////////
   
    Assert.assertEquals(root_makes.children.size(), 2);
   
    Assert.assertTrue(root_makes.children.containsKey(sourceVocab.getID("him")));
    Assert.assertTrue(root_makes.children.containsKey(PrefixTree.X));
   
    Node root_makes_him = root_makes.children.get(sourceVocab.getID("him"));
    Node root_makes_X = root_makes.children.get(PrefixTree.X);
       
    Assert.assertNotNull(root_makes_him);
    Assert.assertNotNull(root_makes_X);
   
    /////////////////////////////
   
    Assert.assertEquals(root_X.children.size(), 2);

    Assert.assertTrue(root_X.children.containsKey(sourceVocab.getID("makes")));
    Assert.assertTrue(root_X.children.containsKey(sourceVocab.getID("him")));
   
    Node root_X_makes = root_X.children.get(sourceVocab.getID("makes"));
    Node root_X_him = root_X.children.get(sourceVocab.getID("him"));
       
    Assert.assertNotNull(root_X_makes);
    Assert.assertNotNull(root_X_him);
   
    /////////////////////////////
   
    Assert.assertEquals(root_him.children.size(), 0);
       
    /////////////////////////////
    // Level 3 in the tree
    /////////////////////////////   
   
    Assert.assertEquals(root_it_makes.children.size(), 2);
   
    Assert.assertTrue(root_it_makes.children.containsKey(sourceVocab.getID("him")));
    Assert.assertTrue(root_it_makes.children.containsKey(PrefixTree.X));
   
    Node root_it_makes_him = root_it_makes.children.get(sourceVocab.getID("him"));
    Node root_it_makes_X = root_it_makes.children.get(PrefixTree.X);
       
    Assert.assertNotNull(root_it_makes_him);
    Assert.assertNotNull(root_it_makes_X);

    /////////////////////////////
   
    Assert.assertEquals(root_it_X.children.size(), 1);
   
    Assert.assertTrue(root_it_X.children.containsKey(sourceVocab.getID("him")));
   
    Node root_it_X_him = root_it_X.children.get(sourceVocab.getID("him"));
       
    Assert.assertNotNull(root_it_X_him);

    /////////////////////////////
   
    Assert.assertEquals(root_makes_him.children.size(), 0);
   
    /////////////////////////////
   
    Assert.assertEquals(root_makes_X.children.size(), 0);
   
    /////////////////////////////
   
    Assert.assertEquals(root_X_him.children.size(), 0);
   
    /////////////////////////////
   
    Assert.assertEquals(root_X_makes.children.size(), 2);
   
    Assert.assertTrue(root_X_makes.children.containsKey(sourceVocab.getID("him")));
    Assert.assertTrue(root_X_makes.children.containsKey(PrefixTree.X));
   
    Node root_X_makes_him = root_makes.children.get(sourceVocab.getID("him"));
    Node root_X_makes_X = root_makes.children.get(PrefixTree.X);
       
    Assert.assertNotNull(root_X_makes_him);
    Assert.assertNotNull(root_X_makes_X);
   
    /////////////////////////////

Examples of js.dom.Node

        /**
         * {@inheritDoc}
         */
        @Override
        public void apply() {
            Node created = child.materialize();

            if (this.index == null) {
                parent.append(created);
            } else {
                parent.insertBefore(created, index);

Examples of kgp.model.Node

      new HashSet<String>((Arrays.asList(new String[] {"tagOne", "tagTwo"}))));
 
  @Test
  public void addNodeTest() {
    coreService.addNode(nodeToBeAdded);
    Node node = nodeDao.findByName(nodeToBeAdded.getName());
    assertNotNull(node);
    log.info("addNodeTest()\n"+node);
  }

Examples of kodkod.ast.Node

    final AbstractReplacer inliner = new AbstractReplacer(annotated.sharedNodes()) {
      private RelationPredicate source =  null;     
      protected <N extends Node> N cache(N node, N replacement) {
        if (replacement instanceof Formula) {
          if (source==null) {
            final Node nsource = annotated.sourceOf(node);
            if (replacement!=nsource)
              sources.put(replacement, nsource);
          } else {
            sources.put(replacement, source);
          }

Examples of ldif.entity.Node

        v.add(null);
        return v;
      }
     
      private Node createNode(Vector<String> node, String graph) {
        Node ldifNode = null;
        if(node.get(0)==LITERAL)        return Node.createLiteral(node.get(1), graph);
        else if(node.get(0)==DTLITERAL) return Node.createTypedLiteral(node.get(1), node.get(2), graph);
        else if(node.get(0)==LTLITERAL) return Node.createLanguageLiteral(node.get(1), node.get(2), graph);
        else if(node.get(0)==URINODE)   return Node.createUriNode(node.get(1), graph);
        else if(node.get(0)==BLANKNODE) return Node.createBlankNode(node.get(1), graph);

Examples of li.cil.oc.api.network.Node

        SimpleComponentTickHandler.schedule((TileEntity) self);
    }

    public static void invalidate(final SimpleComponentImpl self) {
        self.invalidate_OpenComputers();
        final Node node = node(self);
        if (node != null) {
            node.remove();
            nodes.remove(self);
        }
    }
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.