チェンジセット 33 : BH13SPARQLBuilder/src/hozo/sparql
- 更新日時:
- 2014/01/31 10:20:45 (11 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
BH13SPARQLBuilder/src/hozo/sparql/gui/SparqlBuilderPanel.java
r24 r33 28 28 JTextField jtf_start_class; 29 29 JTextField jtf_end_class; 30 JTextField jtf_mode; 31 JCheckBox jcb_count_ins; 32 30 33 JTextArea jta_query; 31 34 MapFactory map; … … 112 115 this.setLayout(new GridLayout(3,1)); 113 116 JPanel jp1 = new JPanel(); 117 jp1.setLayout(new BorderLayout()); 114 118 115 119 jtf_start_class = new JTextField(40); 116 120 //jtf_start_class.setText("http://dbpedia.org/ontology/Artist"); 117 jtf_start_class = new JTextField("http://purl.jp/bio/10/lsd/ontology/201209#EnglishCode");118 jp1.add(new JLabel("Start Class:") );119 jp1.add(jtf_start_class );121 jtf_start_class.setText("http://purl.jp/bio/10/lsd/ontology/201209#EnglishCode"); 122 jp1.add(new JLabel("Start Class:"),BorderLayout.WEST); 123 jp1.add(jtf_start_class,BorderLayout.CENTER); 120 124 JButton jb_start = new JButton("Select"); 121 jp1.add(jb_start );125 jp1.add(jb_start,BorderLayout.EAST); 122 126 jb_start.addActionListener(new ActionListener(){ 123 127 … … 134 138 135 139 JPanel jp2 = new JPanel(); 140 jp2.setLayout(new BorderLayout()); 136 141 jtf_end_class = new JTextField(40); 137 142 //jtf_end_class.setText("http://dbpedia.org/ontology/Award"); 138 jtf_end_class = new JTextField("http://purl.jp/bio/10/lsd/ontology/201209#JapaneseEntry"); 139 jp2.add(new JLabel("End Class:")); 140 jp2.add(jtf_end_class); 143 jtf_end_class.setText("http://purl.jp/bio/10/lsd/ontology/201209#JapaneseEntry"); 144 145 jp2.add(new JLabel("End Class:"),BorderLayout.WEST); 146 jp2.add(jtf_end_class,BorderLayout.CENTER); 141 147 JButton jb_end = new JButton("Select"); 142 148 jb_end.addActionListener(new ActionListener(){ … … 153 159 154 160 155 jp2.add(jb_end); 156 157 158 159 JPanel jp3 = new JPanel(); 161 jp2.add(jb_end,BorderLayout.EAST); 162 163 164 165 JPanel jp3 = new JPanel(); 166 jtf_mode = new JTextField(3); 167 jtf_mode.setText("0"); 168 jp3.add(jtf_mode); 169 170 jcb_count_ins = new JCheckBox("Count Ins.",false); 171 jp3.add(jcb_count_ins); 172 160 173 JButton jb_get_path = new JButton("Get Path"); 161 174 jp3.add(jb_get_path); … … 175 188 System.out.println("getPaths:::>>>>"+jtf_start_class.getText() 176 189 +"<===>"+jtf_end_class.getText()); 177 Path[] path = getOWLQueryBuilderImpl().getPaths(jtf_start_class.getText(), jtf_end_class.getText()); 190 String mode_str = jtf_mode.getText(); 191 int mode = Integer.parseInt(mode_str); 192 if(mode!=0 && mode!=1){ 193 mode = 0; 194 } 195 196 boolean count_ins = jcb_count_ins.isSelected(); 197 198 Path[] path = getOWLQueryBuilderImpl().getPaths( 199 jtf_start_class.getText(), jtf_end_class.getText(), 200 mode, count_ins); 178 201 System.out.println("RESULT:::>>>>"+path.length); 179 202 … … 208 231 String classURL =""; 209 232 try { 210 SClass[] classes = this.getOWLQueryBuilderImpl().getOWLClasses(null, keyword );233 SClass[] classes = this.getOWLQueryBuilderImpl().getOWLClasses(null, keyword, false); 211 234 DefaultListModel model = new DefaultListModel(); 212 235 for(int i=0;i<classes.length;i++){