- 更新日時:
- 2014/07/01 14:19:29 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r82 r90 35 35 } 36 36 37 public LinkAndPath(ClassLink classLink, List<ClassLink> path, String ori nalClassURI, boolean converge){37 public LinkAndPath(ClassLink classLink, List<ClassLink> path, String originalClassURI, boolean converge){ 38 38 this.classLink = classLink; 39 39 this.path = path; … … 49 49 this.endClass = endClass; 50 50 addNode(endClass); 51 nsteps = 3;51 nsteps = 10; 52 52 limit = 1000; 53 th = 0;54 concut = 2.0;55 divcut = - 2.0;53 //th = 0; 54 //concut = 2.0; 55 //divcut = - 2.0; 56 56 } 57 57 … … 83 83 private List<List<ClassLink>> searchPaths(RDFSchemaAnalyzer rdfsa, boolean countLinks){ 84 84 List<List<ClassLink>> paths = new ArrayList<>(); 85 ClassLink crrLink = new ClassLink(null,startClass,Direction.both,0,0,0,0,0);86 85 List<LinkAndPath> lp = new LinkedList<>(); 87 lp.add(new LinkAndPath( crrLink, new LinkedList<ClassLink>()));86 lp.add(new LinkAndPath(new ClassLink("",startClass,Direction.both,0,0,0,0,0), new LinkedList<ClassLink>(), "", false)); 88 87 try{ 89 88 for ( int i = 0; i < nsteps; i++ ){ … … 92 91 while ( lit.hasNext() ){ 93 92 LinkAndPath crrlp = lit.next(); 94 ClassLink[] classLinks = null; 95 classLinks = rdfsa.getNextClass(null, crrlp.classLink.getLinkedClassURI(), limit, countLinks); 93 ClassLink[] classLinks = rdfsa.getNextClass(null, crrlp.classLink.getLinkedClassURI(), limit, countLinks); 96 94 for ( int j = 0 ; j < classLinks.length; j++ ){ 97 95 List<ClassLink> crrpath = new LinkedList<>(crrlp.path); … … 104 102 continue; 105 103 } 106 nextlp.add(new LinkAndPath(classLinks[j],crrpath)); 104 if ( crrlp.classLink.getPropertyURI().equals(classLinks[j].getPropertyURI()) && 105 crrlp.classLink.getDirection() != classLinks[j].getDirection() && 106 crrlp.originalClassURI.equals( classLinks[j].getLinkedClassURI()) ){ 107 continue; 108 } 109 110 nextlp.add(new LinkAndPath(classLinks[j], crrpath, crrlp.classLink.getLinkedClassURI(), false)); 107 111 } 108 112 }