- 更新日時:
- 2014/01/30 10:59:12 (11 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r3 r8 41 41 42 42 public Path[] getPaths(OWLQueryBuilderImpl qb){ 43 //List<List<ClassLink>> paths = searchPathsFromOWL(qb);44 List<List<ClassLink>> paths = searchPathsFromInstances(qb);43 List<List<ClassLink>> paths = searchPathsFromOWL(qb); 44 //List<List<ClassLink>> paths = searchPathsFromInstances(qb); 45 45 Path[] patharray = new Path[paths.size()]; 46 46 ListIterator<List<ClassLink>> pit = paths.listIterator(); … … 51 51 List<ClassLink> path = pit.next(); 52 52 patharray[i].setClassLinks(path); 53 ListIterator<ClassLink> cit = path.listIterator(); 54 int min = Integer.MAX_VALUE; 55 while ( cit.hasNext() ){ 56 ClassLink cl = cit.next(); 57 if ( cl.getNumOfLinks() < min ){ 58 min = cl.getNumOfLinks(); 59 } 60 } 61 patharray[i].setWidth(min); 53 62 i++; 54 63 } … … 66 75 private List<List<ClassLink>> searchPathsEngine(OWLQueryBuilderImpl qb, int mode){ 67 76 List<List<ClassLink>> paths = new ArrayList<List<ClassLink>>(); 68 ClassLink crrLink = new ClassLink(null,startClass,Direction.both );77 ClassLink crrLink = new ClassLink(null,startClass,Direction.both,0); 69 78 List<LinkAndPath> lp = new LinkedList<LinkAndPath>(); 70 79 lp.add(new LinkAndPath(crrLink, new LinkedList<ClassLink>()));