チェンジセット 112 : BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/AcquiredStructureAnalyzer.java
- 更新日時:
- 2014/07/07 00:27:23 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/AcquiredStructureAnalyzer.java
r108 r112 175 175 176 176 // SELECT 177 queryStr.append("SELECT DISTINCT ?indPropCat ?c ?d ?p ?numLnkInsStart ?numLnkInsEnd ?numInsDom ?numInsRan ?numTriples ?isStartClsLim ?isEndClsLim\n");177 queryStr.append("SELECT DISTINCT ?indPropCat ?c ?dat ?d ?p ?numLnkInsStart ?numLnkInsEnd ?numInsDom ?numInsRan ?numTriples ?isStartClsLim ?isEndClsLim\n"); 178 178 179 179 // if (targetGraphURIs != null) { … … 191 191 queryStr.append(" ?cr <http://sparqlbuilder.org/startClass> <" + originClass + ">. \n"); 192 192 queryStr.append(" ?cr <http://sparqlbuilder.org/endClass> ?c. \n"); 193 queryStr.append(" ?cr <http://sparqlbuilder.org/property> ?p. \n"); 194 queryStr.append(" ?cr <http://sparqlbuilder.org/numberOfTriples> ?numTriples. \n"); 195 queryStr.append(" ?cr <http://sparqlbuilder.org/numberOfInstancesOfStartClass> ?numLnkInsStart. \n"); 196 queryStr.append(" ?cr <http://sparqlbuilder.org/numberOfInstancesOfEndClass> ?numLnkInsEnd. \n"); 197 queryStr.append(" ?cr <http://sparqlbuilder.org/startClassLimitedQ> ?isStartClsLim. \n"); 198 queryStr.append(" ?cr <http://sparqlbuilder.org/endClassLimitedQ> ?isEndClsLim. \n"); 199 queryStr.append("}\n"); 200 queryStr.append(" UNION\n"); 201 queryStr.append(" {"); 202 queryStr.append(" ?cr <http://sparqlbuilder.org/startClass> <" + originClass + ">. \n"); 203 queryStr.append(" ?cr <http://sparqlbuilder.org/endDatatype> ?dat. \n"); 193 204 queryStr.append(" ?cr <http://sparqlbuilder.org/property> ?p. \n"); 194 205 queryStr.append(" ?cr <http://sparqlbuilder.org/numberOfTriples> ?numTriples. \n"); … … 247 258 Resource pro = sol.getResource("p"); 248 259 String clsURI = null; 260 String datURI = null; 249 261 if (pro != null) { 250 262 int indPropCat = 4; … … 257 269 Resource ccls = sol.getResource("c"); 258 270 Resource dcls = sol.getResource("d"); 271 Resource dat = sol.getResource("dat"); 259 272 Direction direction = null; 260 273 if(ccls != null && dcls == null ){ … … 266 279 direction = Direction.reverse; 267 280 clsURI = dcls.getURI(); 281 }else{ 282 if( ccls == null && dat != null && dcls == null ){ 283 clsURI = null; 284 direction = Direction.forward; 285 datURI = dat.getURI(); 286 } 268 287 } 269 288 } … … 309 328 } 310 329 311 ClassLink cl = new ClassLink(proURI, clsURI, d irection,330 ClassLink cl = new ClassLink(proURI, clsURI, datURI, direction, 312 331 numTriples, numInsDom, numInsRan, numLnkInsStart, numLnkInsEnd, isStartClsLim, isEndClsLim); 313 332 solCLs.add(cl);