* 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;
}