Examples of Node


Examples of org.graphstream.graph.Node

    return 0.0;
  }

  private void renderShipment(Graph g, Shipment shipment, Label label, boolean renderShipments) {

    Node n1 = g.addNode(makeId(shipment.getId(),shipment.getPickupLocationId()));
    if(label.equals(Label.ID)) n1.addAttribute("ui.label", shipment.getId());
    n1.addAttribute("x", shipment.getPickupCoord().getX());
    n1.addAttribute("y", shipment.getPickupCoord().getY());
    n1.setAttribute("ui.class", "pickup");

    Node n2 = g.addNode(makeId(shipment.getId(),shipment.getDeliveryLocationId()));
    if(label.equals(Label.ID)) n2.addAttribute("ui.label", shipment.getId());
    n2.addAttribute("x", shipment.getDeliveryCoord().getX());
    n2.addAttribute("y", shipment.getDeliveryCoord().getY());
    n2.setAttribute("ui.class", "delivery");

    if(renderShipments){
      Edge s = g.addEdge(shipment.getId(), makeId(shipment.getId(),shipment.getPickupLocationId()),
          makeId(shipment.getId(),shipment.getDeliveryLocationId()), true);
      s.addAttribute("ui.class", "shipment");

Examples of org.graylog2.cluster.Node

    @Path("/{radioId}")
    @ApiResponses(value = {
            @ApiResponse(code = 404, message = "Radio not found.")
    })
    public String radio(@ApiParam(name = "radioId", required = true) @PathParam("radioId") String radioId) {
        Node radio = null;
        try {
            radio = nodeService.byNodeId(radioId);
        } catch (NodeNotFoundException e) {
            LOG.error("Radio <{}> not found.", radioId);
            throw new WebApplicationException(404);

Examples of org.graylog2.restclient.models.Node

    @Test
    public void testTransportAddressPathNormalization() {
        setupNodes(AddressNodeId.create("http://localhost:65535"));
        api.setHttpClient(client);
        final Node node = serverNodes.any();
        assertEquals("transport address should have no path", "http://localhost:65535", node.getTransportAddress());
    }

Examples of org.hibernate.hql.ast.tree.Node

      if ("Foo".equals(n.getText()))
      {
        if (foundFoo)
          fail("Already found 'Foo'!");
        foundFoo = true;
        Node node = (Node)n;
        assertEquals(1,node.getLine());
        assertEquals(6,node.getColumn());
      }
      else if ("name".equals(n.getText()))
      {
        if (foundName)
          fail("Already found 'name'!");
        foundName = true;
        Node node = (Node)n;
        assertEquals(2,node.getLine());
        assertEquals(9,node.getColumn());
      }
    }
    assertTrue(foundFoo);
    assertTrue(foundName);
  }

Examples of org.hibernate.test.id.uuid.sqlrep.Node

  }

  public void testUsage() {
    Session session = openSession();
    session.beginTransaction();
    Node root = new Node( "root" );
    session.save( root );
    assertNotNull( root.getId() );
    Node child = new Node( "child", root );
    session.save( child );
    assertNotNull( child.getId() );
    session.getTransaction().commit();
    session.close();

    session = openSession();
    session.beginTransaction();
    Node node = (Node) session.get( Node.class, root.getId() );
    assertNotNull( node );
    node = (Node) session.get( Node.class, child.getId() );
    assertNotNull( node );
    session.getTransaction().commit();
    session.close();

    session = openSession();
    session.beginTransaction();
    // test joining
    node = (Node) session.createQuery( "from Node n join fetch n.parent where n.parent is not null" ).uniqueResult();
    assertNotNull( node );
    assertNotNull( node.getParent() );
    session.getTransaction().commit();
    session.close();

    session = openSession();
    session.beginTransaction();

Examples of org.hivedb.meta.Node

  }

  private Map<Integer, SessionFactory> buildSessionFactoryMap(ShardedSessionFactory factory, Collection<Node> nodes) {
    Map<Integer, SessionFactory> factoryMap = new HashMap<Integer, SessionFactory>();
    for(SessionFactory f : factory.getSessionFactories()) {
      Node node = matchNodeToFactoryUrl(extractFactoryURL(f), nodes);
      factoryMap.put(node.getId(), f);
    }
    return factoryMap;
  }

Examples of org.htmlparser.Node

    StringBuffer prvContent = new StringBuffer();
    try {
      parser.setEncoding(Globals.ENC_8859_1);
      parser.setInputHTML(html);
      NodeList nodes = parser.extractAllNodesThatMatch(nfilter);
      Node node = null;
      for(int i=0;i<nodes.size();i++){
        if(prvContent.length() >= max_count){
          if(node instanceof TagNode){
            TagNode tmp_node = (TagNode)node;
            boolean isEnd = tmp_node.isEndTag();
            if(!isEnd){
              prvContent.setLength(prvContent.length()-tmp_node.getText().length()-2);
            }
          }
          //��������δ�رյı�ǩ
          Node parent = node;
          //System.out.println("current node is . "+parent.getText());
          do{
            parent = parent.getParent()
            //System.out.println("parent = "+parent);         
            if(parent==null) break;
            if(!(parent instanceof TagNode)) continue;
            //System.out.println("Parent node is no ended. "+parent.getText());
            prvContent.append(((TagNode)parent).getEndTag().toHtml());

Examples of org.infinispan.tree.Node

   public void testGetChildAPI() {

      Node<Object, Object> rootNode = cache.getRoot();

      // creates a Node<Object, Object> with fqn /a/b/c
      Node childA = rootNode.addChild(A);
      childA.addChild(B).addChild(C);

      rootNode.getChild(A).put("key", "value");
      rootNode.getChild(A).getChild(B).put("key", "value");
      rootNode.getChild(A).getChild(B).getChild(C).put("key", "value");

Examples of org.infoglue.cms.net.Node

      logger.info("repositoryId:" + repositoryId);
           
            ContentVO contentVO = ContentControllerProxy.getController().getRootContentVO(repositoryId, this.request.getRemoteUser());
           
            logger.info("contentVO:" + contentVO.getContentId() + " " + contentVO.getName());
            Node node = new Node();
            node.setId(contentVO.getContentId());
            node.setName(contentVO.getName());
            node.setIsBranch(contentVO.getIsBranch());
           
            List nodes = new ArrayList();
            nodes.add(node);
            responseEnvelope.setNodes(nodes);
        }

Examples of org.jamesii.core.math.parsetree.Node

    assertTrue(res2.getValue().compareTo(true) == 0);
  }

  @Override
  public void testClone() {
    Node cond = new ValueNode<>(true);
    Node then = new ValueNode<>(5);
    Node els = new ValueNode<>(7);
    IfThenElseNode ifN = new IfThenElseNode(cond, then, els);

    Node n2 = null;
    try {
      n2 = (Node) ifN.clone();
    } catch (CloneNotSupportedException e) {
      fail(e.getMessage());
    }
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.