チェンジセット 161 : SPARQLBuilderWWW
- 更新日時:
- 2014/09/25 16:08:57 (10 年 前)
- パス:
- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL
- ファイル:
-
- 2 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r159 r161 9 9 * @author atsuko 10 10 */ 11 import java.util. ArrayList;12 import java.util.LinkedList;13 import java.util.List;14 import java.util.ListIterator;11 import java.util.*; 12 //import java.util.LinkedList; 13 //import java.util.List; 14 //import java.util.ListIterator; 15 15 16 16 public class OWLClassGraph extends LabeledMultiDigraph{ … … 55 55 public Path[] getPaths(RDFSchemaAnalyzer rdfsa, boolean countLink){ 56 56 List<List<ClassLink>> paths = null; 57 paths = searchPaths(rdfsa, countLink); 58 Path[] patharray = new Path[paths.size()];57 paths = searchPaths(rdfsa, countLink); 58 NavigableSet<Path> sortedpath = new TreeSet<Path>(); 59 59 ListIterator<List<ClassLink>> pit = paths.listIterator(); 60 int i = 0;61 60 while ( pit.hasNext() ){ 62 patharray[i]= new Path();63 path array[i].setStartClass(startClass);64 List<ClassLink> path = pit.next();65 path array[i].setClassLinks(path);66 ListIterator<ClassLink> cit = path.listIterator();61 Path path = new Path(); 62 path.setStartClass(startClass); 63 List<ClassLink> crrpath = pit.next(); 64 path.setClassLinks(crrpath); 65 ListIterator<ClassLink> cit = crrpath.listIterator(); 67 66 int min = Integer.MAX_VALUE; 68 67 while ( cit.hasNext() ){ … … 72 71 } 73 72 } 74 patharray[i].setWidth(min); 73 path.setWidth(min); 74 sortedpath.add(path); 75 } 76 Path[] patharray = new Path[paths.size()]; 77 Iterator<Path> pait = sortedpath.descendingIterator(); 78 int i = 0; 79 while ( pait.hasNext() ){ 80 patharray[i] = pait.next(); 75 81 i++; 76 82 } … … 222 228 } 223 229 */ 224 private int getMinCutOfPath(){225 int min = Integer.MAX_VALUE;226 //KOKO227 return min;228 }229 230 230 231 } -
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/Path.java
r133 r161 14 14 * @version 29.01.2014 15 15 */ 16 public class Path {16 public class Path implements Comparable<Path>{ 17 17 18 18 /** … … 112 112 } 113 113 114 @Override 115 public int compareTo(Path path) { 116 return this.width - path.getWidth(); 117 //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 118 } 119 114 120 }