Package businesslogic

Examples of businesslogic.RInterface


      }
      else
      {
        //RInterface initialisieren
        //-----------------------------------------------
        m_rinterface = new RInterface(true);
        //-----------------------------------------------
       
        CentralityEntity t_ce = m_centralities.get(t_selection);
       
        try {
          m_rinterface.keyActorPlot(t_ce);
        } catch (Exception e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        }
      }
     

     
     
    }
    if(e.getActionCommand() == "b_start")
      { 
        int add_months = Integer.parseInt(((Row)cb_interval.getSelectedItem()).getId());
        long projectid = Long.parseLong(((Row)cb_choose_project.getSelectedItem()).getId());
       
        List <DateTime>l_dates = new ArrayList<DateTime>();
       
        //Fixed start and enddate with given interval
        if(chb_fix_date.isSelected() == true)
        {
         
          DateTime startdate = null, enddate = null;
 
          try {
            startdate = new DateTime(df.parse(t_begin_date.getText()));
            enddate = new DateTime(df.parse(t_end_date.getText()));
          } catch (ParseException e1) {
            JOptionPane.showMessageDialog(null, "Please check dates!", "Warning", JOptionPane.OK_OPTION);
            e1.printStackTrace();
            return;
          }
         
          while (startdate.isBefore(enddate))
          {
            l_dates.add(startdate);
            startdate = startdate.plusMonths(add_months);
          }
         
          l_dates.add(enddate);
        }
       
        //List with dates
        else if (chb_custom_date.isSelected() == true)
        {
            // Get number of items in the list
            int size = lb_dates.getModel().getSize();
           
            // Get all item objects
            for (int i=0; i<size; i++) {
                try {
              l_dates.add(new DateTime(df.parse((String)lb_dates.getModel().getElementAt(i))));
            } catch (ParseException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
            }
               
            }
        }
       
       
        //Calculate measures with given dates
        for(int i = 0; i < l_dates.size()-1; i++)
        {
          DateTime begin = l_dates.get(i);
          DateTime end = null;
          CentralityEntity l_ce = null;
         
         
          if (i == l_dates.size()-2)
            end = l_dates.get(i+1);
          else
            end = l_dates.get(i+1).minusDays(1);
         
          //Matchingtable is relevant to map ID's of vertices beginning with 0 and should be the same for analysis over period of time
//          if(m_matchingtable == null)
//          {
//            m_matchingtable = new Hashtable<Double, Double>();
//            l_ce = new CentralityEntity(begin, end, Long.parseLong(((Row)cb_choose_project.getSelectedItem()).getId()), m_keepmatrices, m_matchingtable);
//          }
//
//          else
          l_ce = new CentralityEntity(begin, end, Long.parseLong(((Row)cb_choose_project.getSelectedItem()).getId()), m_keepmatrices);
         
           //Bug Report List
          if(chb_scr_bugreports.isSelected() == true)
            l_ce.fillMatrixBugReports();
         
          //Forum
//          if(chb_src_forum.isSelected() == true)
//            l_ce.fillMatrixForum();
         
          //Sourceforge Checkins
          if(chb_scr_sourcforgecheckins.isSelected() == true)
            l_ce.fillMatrixSFCheckins();
         
          //RInterface initialisieren
          //-----------------------------------------------
          m_rinterface = new RInterface();
          //-----------------------------------------------
         
         
          //Calculate Centrality
          if(l_ce.calculateCentrality() == true)
View Full Code Here

TOP

Related Classes of businesslogic.RInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.