Examples of DNVEntity


Examples of net.wigis.graph.dnv.DNVEntity

      // layoutStatus = "Running Recommendation layout.";

      Map<Integer, DNVEntity> users = graph.getNodesByType( level, "user" );
      if( users != null && users.size() > 0 )
      {
        DNVEntity userNode = users.values().iterator().next();
        if( userNode != null )
        {
          ((RecommendationLayoutInterface)layoutMethod).runLayout( graph, (DNVNode)userNode, level, 0, 0, recommendationCircle );
        }
      }
View Full Code Here

Examples of net.wigis.graph.dnv.DNVEntity

   * @param labelPrefix
   *            the label prefix
   */
  private static void addEdge( String[] line, DNVGraph graph, String currentYear, String labelPrefix )
  {
    DNVEntity fromNode = getNode( line, graph, 0, currentYear );
    DNVEntity toNode = getNode( line, graph, 1, currentYear );
    DNVEdge edge = new DNVEdge( graph );
    edge.setFrom( (DNVNode)fromNode );
    edge.setTo( (DNVNode)toNode );
    edge.setLabel( labelPrefix + line[2].trim() );
    String score[] = line[2].trim().split( ":" );
View Full Code Here

Examples of net.wigis.graph.dnv.DNVEntity

   *            the current year
   * @return the node
   */
  private static DNVEntity getNode( String[] line, DNVGraph graph, int index, String currentYear )
  {
    DNVEntity node = graph.getNodeByBbId( line[index].trim() );
    if( node == null )
    {
      node = new DNVNode( graph );
      node.setLabel( line[index].trim() );
      node.setBbId( line[index].trim() );
      ( (DNVNode)node ).setPosition( (float)( Math.random() * 100.0 ), (float)( Math.random() * 100.0 ) );
      node.setProperty( "time", currentYear );
      ( (DNVNode)node ).setRadius( 1 );
      ImageGetter ig = new ImageGetter( (DNVNode)node, line[index].trim() + " flag" );
      ig.run();
      String[] colors = countryToColor.get( line[index].trim() );
      if( colors != null && colors.length >= 2 )
      {
        node.setColor( colors[0] );
        node.setOutlineColor( colors[1] );
        node.setLabelColor( colors[1] );
        node.setLabelOutlineColor( colors[0] );
      }
      graph.addNode( 0, node );
    }
    return node;
  }
View Full Code Here

Examples of net.wigis.graph.dnv.DNVEntity

   *            the graph
   * @return the node
   */
  private static DNVEntity getNode( String bbid, DNVGraph graph )
  {
    DNVEntity node = graph.getNodeByBbId( bbid );
    if( node == null )
    {
      node = new DNVNode( graph );
      node.setLabel( bbid );
      node.setBbId( bbid );
      node.setColor( "#33FF33" );
      ( (DNVNode)node ).setPosition( (float)( Math.random() * 100.0 ), (float)( Math.random() * 100.0 ) );
      graph.addNode( 0, node );
    }
    return node;
  }
View Full Code Here

Examples of net.wigis.graph.dnv.DNVEntity

   *            the graph
   * @return the node
   */
  private static DNVEntity getNode( String bbid, DNVGraph graph )
  {
    DNVEntity node = graph.getNodeByBbId( bbid );
    if( node == null )
    {
      node = new DNVNode( graph );
      node.setLabel( bbid );
      node.setBbId( bbid );
      ( (DNVNode)node ).setPosition( (float)( Math.random() * 100.0 ), (float)( Math.random() * 100.0 ) );
      graph.addNode( 0, node );
    }
    return node;
  }
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.