237 | | private void setGraph(RDFSchemaAnalyzer rdfsa, boolean countLink){ |
238 | | // BFS |
239 | | |
240 | | |
241 | | //ClassLink[] classLinks = rdfsa.getNextClass(null, crrlp.classLink.getLinkedClassURI(), limit, countLinks); |
| 235 | public void setWholeGraph(RDFSchemaAnalyzer rdfsa){ |
| 236 | // setNodes |
| 237 | SClass[] classes = null; |
| 238 | try{ |
| 239 | classes = rdfsa.getOWLClasses(null, null, null, true); |
| 240 | }catch(Exception e){ |
| 241 | System.err.println(e); return; |
| 242 | } |
| 243 | for (int i = 0 ; i < classes.length; i++){ |
| 244 | addNode(classes[i].getClassURI()); |
| 245 | } |
| 246 | // setEdges |
| 247 | for (int i = 0 ; i < classes.length; i++){ |
| 248 | try{ |
| 249 | ClassLink[] classLinks = rdfsa.getNextClass(null, classes[i].getClassURI(), limit, true); |
| 250 | for (int j = 0 ; j < classLinks.length; j++){ |
| 251 | addEdge(i, labelednodes.get(classLinks[j].getLinkedClassURI()), |
| 252 | classLinks[j].getPropertyURI(), |
| 253 | classLinks[j].getDirection(), |
| 254 | classLinks[j].getNumOfLinkedInstances()); |
| 255 | } |
| 256 | }catch(Exception e){ |
| 257 | System.err.println(e); |
| 258 | } |
| 259 | } |