チェンジセット 33 : BH13SPARQLBuilder/src/hozo

差分発生行の前後
無視リスト:
更新日時:
2014/01/31 10:20:45 (11 年 前)
更新者:
kozaki
ログメッセージ:
 
ファイル:
1 変更

凡例:

変更なし
追加
削除
  • BH13SPARQLBuilder/src/hozo/sparql/gui/SparqlBuilderPanel.java

    r24 r33  
    2828        JTextField jtf_start_class; 
    2929        JTextField jtf_end_class; 
     30        JTextField jtf_mode; 
     31        JCheckBox jcb_count_ins; 
     32         
    3033        JTextArea jta_query; 
    3134        MapFactory map; 
     
    112115                this.setLayout(new GridLayout(3,1)); 
    113116                JPanel jp1 = new JPanel(); 
     117                jp1.setLayout(new BorderLayout()); 
    114118                 
    115119                jtf_start_class = new JTextField(40); 
    116120                //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); 
    120124                JButton jb_start =  new JButton("Select"); 
    121                 jp1.add(jb_start); 
     125                jp1.add(jb_start,BorderLayout.EAST); 
    122126                jb_start.addActionListener(new ActionListener(){ 
    123127 
     
    134138                 
    135139                JPanel jp2 = new JPanel(); 
     140                jp2.setLayout(new BorderLayout()); 
    136141                jtf_end_class = new JTextField(40); 
    137142            //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); 
    141147                JButton jb_end =  new JButton("Select"); 
    142148                jb_end.addActionListener(new ActionListener(){ 
     
    153159                 
    154160 
    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                 
    160173                JButton  jb_get_path = new JButton("Get Path"); 
    161174                jp3.add(jb_get_path); 
     
    175188                                        System.out.println("getPaths:::>>>>"+jtf_start_class.getText() 
    176189                                                        +"<===>"+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); 
    178201                                        System.out.println("RESULT:::>>>>"+path.length); 
    179202                                         
     
    208231                String classURL =""; 
    209232                try { 
    210                         SClass[] classes = this.getOWLQueryBuilderImpl().getOWLClasses(null, keyword); 
     233                        SClass[] classes = this.getOWLQueryBuilderImpl().getOWLClasses(null, keyword, false); 
    211234                        DefaultListModel model  = new DefaultListModel(); 
    212235                        for(int i=0;i<classes.length;i++){