チェンジセット 67 : BH13SPARQLBuilder/src/org
- 更新日時:
- 2014/04/21 17:43:03 (11 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r53 r67 9 9 * @author atsuko 10 10 */ 11 import java.util.*; 11 import java.util.ArrayList; 12 import java.util.LinkedList; 13 import java.util.List; 14 import java.util.ListIterator; 12 15 13 16 public class OWLClassGraph extends LabeledMultiDigraph{ … … 21 24 22 25 public class LinkAndPath{ 26 String originalClassURI; // originalClasssURI -classLink.propertyURI-> classLink.linkedClassURL 23 27 ClassLink classLink; 24 28 List<ClassLink> path; 25 29 boolean converge; 30 26 31 public LinkAndPath(ClassLink classLink, List<ClassLink> path){ 27 32 this.classLink = classLink; … … 30 35 } 31 36 32 public LinkAndPath(ClassLink classLink, List<ClassLink> path, boolean converge){37 public LinkAndPath(ClassLink classLink, List<ClassLink> path, String orinalClassURI, boolean converge){ 33 38 this.classLink = classLink; 34 39 this.path = path; 40 this.originalClassURI = originalClassURI; 35 41 this.converge = converge; 36 42 } … … 50 56 } 51 57 58 /* 52 59 public void generateGraph(List<List<ClassLink>> paths){ 53 60 ListIterator<List<ClassLink>> pit = paths.listIterator(); … … 61 68 } 62 69 } 70 */ 63 71 64 72 public Path[] getPaths(OWLQueryBuilderImpl qb, int mode, boolean countLink){ … … 67 75 paths = searchPaths(qb, mode, countLink); 68 76 }else if ( mode == 2 ){ 69 paths = searchPathsWithCut(qb); 77 paths = searchPathsWithCut(qb); 70 78 }else{ 71 79 System.err.println("Mode is not correct"); … … 154 162 continue; 155 163 } 164 if (classLinks[j].getNumOfLinks() <= th ){ 165 continue; //cut by the number of instances 166 } 167 // Divergence & Convergence Decision 156 168 boolean con = false; 157 169 boolean div = false; … … 163 175 } 164 176 if ( crrlp.converge == true && div == true ){ // converge & 縲diverge 165 continue; // cut 166 } 167 nextlp.add(new LinkAndPath(classLinks[j], crrpath, con)); 177 continue; // cut by the differences of entropies 178 } 179 // crr & next are the same arcs 180 if ( crrlp.classLink.getPropertyURI().equals(classLinks[j].getPropertyURI()) && 181 crrlp.classLink.getDirection() != classLinks[j].getDirection() && 182 crrlp.originalClassURI.equals( classLinks[j].getLinkedClassURI()) ){ 183 continue; 184 } 185 186 nextlp.add(new LinkAndPath(classLinks[j], crrpath, crrlp.classLink.getLinkedClassURI(), con)); 168 187 } 169 188 }