Examples of Node


Examples of eu.scape_project.planning.model.tree.Node

     * @param Node
     *            to attach the Node to.
     * @return New attached Node.
     */
    public Node addNewNode(Node node) {
        Node newNode = new Node();
        node.addChild(newNode);
        // this node has been changed()
        node.touch();
        return newNode;
    }

Examples of fi.luomus.commons.xml.Document.Node

    for (Node resource : document.getRootNode()) {
      String id = resource.getNode("id").getContents();
      StringBuilder desc = new StringBuilder();
      List<Node> childNodes = resource.getChildNodes();
      for (int index : fieldIndexes) {
        Node resourceChild = childNodes.get(index);
        String contents = resourceChild.getContents();
        if (contents == null) continue;
        desc.append(contents).append(", ");
      }
      Utils.removeLastChar(desc);
      Utils.removeLastChar(desc);

Examples of fiftyone.mobile.detection.entities.Node

            orderedNodes.addAll(nodes);
            Collections.sort(orderedNodes, nodeComparator);
            Iterator<Node> nodeIterator = orderedNodes.iterator();

            // Get the first node and add all the signature indexes.
            Node node = nodeIterator.next();
            final PossibleSignatures linkedList = buildInitialList(
                    node.getRankedSignatureIndexes());

            // Count the number of times each signature index occurs.
            while (nodeIterator.hasNext()) {
                node = nodeIterator.next();
                maxCount = getClosestSignaturesForNode(
                        node.getRankedSignatureIndexes(),
                        linkedList,
                        maxCount,
                        iteration);
                iteration++;
            }

Examples of flex2.compiler.mxml.dom.Node

    Set checkNodes = (Set)unit.getContext().removeAttribute(MxmlCompiler.CHECK_NODES);
    if (checkNodes != null && !checkNodes.isEmpty())
    {
      for (Iterator iter = checkNodes.iterator(); iter.hasNext(); )
      {
        Node node = (Node)iter.next();
        ThreadLocalToolkit.log(new AnalyzerAdapter.CouldNotResolveToComponent(node.image), unit.getSource());
      }
    }
        return ThreadLocalToolkit.errorCount() > 0;
  }

Examples of fr.tm.elibel.smartqvt.qvtast.Node

    //
    if (args.length == 0) {
      System.out.println("Enter a list of file paths or URIs that have content like this:");
      try {
        Resource resource = resourceSet.createResource(URI.createURI("http:///My.qvtast"));
        Node root = QvtAstFactory.eINSTANCE.createNode();
        resource.getContents().add(root);
        resource.save(System.out, null);
      }
      catch (IOException exception) {
        exception.printStackTrace();

Examples of freenet.node.Node

    return name;
  }

  @Override
  public short getPriorityClass() {
    Node node = updater.node;
    if(node.updateIsUrgent())
      return UserAlert.CRITICAL_ERROR;
    if(updater.inFinalCheck() || updater.canUpdateNow() || !updater.isArmed())
      return UserAlert.ERROR;
    else
      return UserAlert.MINOR;

Examples of fuse.zipfs.util.Node

      throw new FuseException("Read Only").initErrno(FuseException.EACCES);
   }

   public FuseStat getattr(String path) throws FuseException
   {
      Node node = tree.lookupNode(path);
      ZipEntry entry = null;
      if (node == null || (entry = (ZipEntry)node.getValue()) == null)
         throw new FuseException("No Such Entry").initErrno(FuseException.ENOENT);

      FuseStat stat = new FuseStat();

      stat.mode = entry.isDirectory() ? FuseFtype.TYPE_DIR | 0755 : FuseFtype.TYPE_FILE | 0644;

Examples of game.Node

    else if(e.getSource() == save)
    {

      String filename = getFile("Save");
     
      Node mapNode = new Node("map");
      mapNode.addSubnode("width",""+lvlWidth);
      mapNode.addSubnode("height",""+lvlHeight);
      mapNode.addSubnode("name",name.getText());
      for(int x = 0; x < lvlWidth; x++)
        for (int y = 0; y < lvlHeight; y++)
          mapNode.addSubnode( tiles[x][y].asNode() );
         
      try
      {
        OutputStream os = new FileOutputStream(filename);
        mapNode.tryWriteOn(os);
        os.flush();
        os.close();
      }
      catch (Exception ex) { }
     
      JOptionPane.showMessageDialog(this,  "Save complete", "Done", JOptionPane.PLAIN_MESSAGE);
    }
    else if(e.getSource() == load)
    {
      try{
        String filename = getFile("Load");
        Node mapNode = Node.parseFrom(new FileInputStream(filename));
        name.setText(mapNode.contentOf("name"));
        int w = new Integer( mapNode.contentOf("width"));
        int h = new Integer( mapNode.contentOf("height"));
        resizeMap(w,h,-1);
       
       
       
        for(Node tileNode: mapNode.subnodes("tile"))
        {
          Tile t = Tile.fromNode(tileNode);
         
          tiles[t.getX()][t.getY()] = t;
        }

Examples of games.stendhal.server.core.pathfinder.Node

    final SpeakerNPC mermaid = new SpeakerNPC("Nicklesworth") {

      @Override
      protected void createPath() {
        final List<Node> nodes = new LinkedList<Node>();
        nodes.add(new Node(8, 92));
        nodes.add(new Node(9, 92));       
        nodes.add(new Node(9, 93));
        nodes.add(new Node(11, 93));
        nodes.add(new Node(11, 94));
        nodes.add(new Node(13, 94));
        nodes.add(new Node(13, 96));
        nodes.add(new Node(14, 96));
        nodes.add(new Node(14, 98));
        nodes.add(new Node(16, 98));       
        nodes.add(new Node(16, 97));
        nodes.add(new Node(15, 97));
        nodes.add(new Node(15, 95));
        nodes.add(new Node(14, 95));
        nodes.add(new Node(14, 94));
        nodes.add(new Node(13, 94));
        nodes.add(new Node(13, 93));
        nodes.add(new Node(12, 93));
        nodes.add(new Node(12, 92));
        nodes.add(new Node(10, 92));
        nodes.add(new Node(10, 91));
        nodes.add(new Node(9, 91));
        nodes.add(new Node(9, 82));
        nodes.add(new Node(8, 82));
        setPath(new FixedPath(nodes, true));

      }

      @Override

Examples of gistoolkit.common.Node

        }
    }
    /** Set up the configuration of this server. */
    public Node getNode()throws Exception{
        // There may be several services involved in a single server.
        Node tempNode = new Node(SERVER_TAG);
        for (int i=0; i<myServices.size(); i++){
            tempNode.addChild( ((Service) myServices.elementAt(i)).getNode());
        }
        return tempNode;
    }
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.