[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

Re: [ba-ohs-talk] TouchGraph used on backlink DB


Nice, I am surprised to see how simple that was.  For some reason it seemed 
like a more involved process "on paper".    (01)

Too bad about the long node names.  The new version has node id's (which 
are strings), as well as labels, so minor changes to the code below would 
yield nicer node names.  Which gives me an idea...    (02)

As long as we are hacking, why not change the line
      String firststr = line.substring(0, midspace-1);
to
      String firststr = line.substring(line.indexOf("msg"), midspace-1);
or
      String firststr = line.substring(line.indexOf("ba-"), midspace-1);
to avoid confusion between the two lists.    (03)

I wonder how useful the results of such a visualization would be, 
though.  The advantage that Wiki's like Langreaiter.com has over email 
lists, is that any time a concept is mentioned it automatically gets a 
hyperlink.  The backlink DB however, only contains explicit 
hyperlinks.  So, in the case where one replies to an annoucement of a link 
without including the link itself ( for instance, this email lack(ed) a 
link to the backlink database http://www.bootstrap.org/lists/backlinks.txt 
) A connection would not be made between the reply and the original post.    (04)

It's still cool though, thanks Peter.    (05)

--Alex    (06)

At 10:09 PM 12/14/01 +0000, Peter Jones wrote:
>OK this works:
>
>public void getBDBGraph()
>  {
>     String line = "";
>
>     try
>     {
>         BufferedReader bdbReader = new BufferedReader(new
>FileReader("C:\\Temp\\backlinks.txt"));
>         while(line != null)
>         {
>            line = bdbReader.readLine();
>            if(line == null) {continue;}
>               System.out.println(line);
>            int midspace = line.indexOf(9); //hunts TAB chars
>            if(midspace != -1)
>            {
>               System.out.println("midspace: " + midspace);
>               int linelngth= line.length();
>               String firststr = line.substring(0, midspace-1);
>               String secondstr= line.substring(midspace+1, linelngth);
>                  Node r = tgPanel.getGES().findNode(firststr);
>                  if(r == null)
>                  {
>                     r = new Node(firststr);
>                     tgPanel.addNode(r);
>                  }
>
>                  Node n = tgPanel.getGES().findNode(secondstr);
>                  if(n == null)
>                  {
>                     n = new Node(secondstr);
>                     tgPanel.addNode(n);
>                  }
>
>                  if(tgPanel.findEdge(r, n)==null)
>                  {
>                     tgPanel.addEdge(r, n, 4000);
>                  }
>
>                }
>             }
>          }
>       catch(IOException exc)
>       {
>          System.out.println("getBDBGraph: " + exc);
>       }
>
>    }
>
>--
>Cheers,
>Peter    (07)