差分発生行の前後
無視リスト:
更新日時:
2015/05/15 16:30:46 (9 年 前)
更新者:
atsuko
ログメッセージ:

パスのソートのロジック変更

ファイル:
1 変更

凡例:

変更なし
追加
削除
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java

    r251 r252  
    9191        List<List<ClassLink>> paths = searchPaths(startClass, endClass); 
    9292 
    93         NavigableSet<Path> sortedpath = new TreeSet<Path>(); 
     93        List<Path> sortedpaths = new LinkedList<Path>(); 
    9494        ListIterator<List<ClassLink>> pit = paths.listIterator(); 
    9595        int j = 0; 
     
    110110            int rankwidth = (int) ( ( min * nsteps )/ crrpath.size() ); 
    111111            path.setWidth(rankwidth); 
    112             sortedpath.add(path); 
     112            sortedpaths.add(path); 
    113113            j++; 
    114114        } 
    115115        Path[] patharray = new Path[paths.size()]; 
    116         Iterator<Path> pait = sortedpath.descendingIterator(); 
     116        Collections.sort(sortedpaths); 
     117        Iterator<Path> pait = sortedpaths.listIterator(); 
    117118        int i = 0; 
    118119        while ( pait.hasNext() ){ 
    119             patharray[i] = pait.next(); 
     120            patharray[paths.size()-i-1] = pait.next(); 
    120121            i++; 
    121122        } 
     
    411412   private boolean checkPath(String startClass, List<ClassLink> paths){ 
    412413       // KOKO 
    413        return false; 
     414       return true; 
    414415   } 
    415416   // old codes