- 更新日時:
- 2014/10/28 16:50:31 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/LabeledMultiDigraph.java
r133 r201 21 21 String label; 22 22 Direction direction; 23 Integer ntriples; 24 25 public LabeledEdge(Integer node, String label, Direction direction, Integer ntriples){ 26 this.node = node; 27 this.label = label; 28 this.direction = direction; 29 this.ntriples = ntriples; 30 } 23 31 } 24 32 … … 30 38 31 39 public void addNode(String label){ 40 labelednodes.put(label, labels.size()); 32 41 labels.add(label); 33 42 adjlist.add(new LinkedList<LabeledEdge>()); 34 43 } 35 44 45 public void addEdge(Integer node1, Integer node2, String elabel, Direction direction, Integer ntriples){ 46 if ( labels.size() < node1 || labels.size() < node2 ){ 47 System.err.println("Error for Edge Addition: No Node for the Edge"); 48 return; 49 } 50 LabeledEdge edge = new LabeledEdge(node2, elabel, direction, ntriples); 51 adjlist.get(node1).add(edge); 52 } 36 53 }