AutopsySLogVizModule/src/AutopsySLogVizModule/DataContentViewerSlogViz.java
/**
    * Calls SLogViz with the specified parameters.
    * 
    * @param index an array containing the indices of the list of previous file {@link prev}, which are to be plotted alongside the current Content {@link c}
    * @param state the integer representing one of the plots SLogViz offers
    * @param timeoffset a five digit String, starting with either a + or a -, followed by four numbers representing the time, e.g. +0200 for two hours
    */
Calls SLogViz with the specified parameters.

@param index an array containing the indices of the list of previous file  prev, which are to be plotted alongside the current Content  c
@param state the integer representing one of the plots SLogViz offers
@param timeoffset a five digit String, starting with either a + or a -, followed by four numbers representing the time, e.g. +0200 for two hours
Calls SLogViz with the specified parameters . @param index an array containing the indices of the list of previous file prev which are to be plotted alongside the current Content c @param state the integer representing one of the plots SLogViz offers @param timeoffset a five digit String starting with either a + or a - followed by four numbers representing the time e . g . + 0200 for two hours
private void callPython(int[] index, int state, String timeoffset) {
        try{
            String name = this.c.getName();
            if(name.endsWith(".gz")){
                name = name.substring(0, name.length()-3);
            }
            String pathArg = SLOGVIZ_FILE_PATH + File.separator + name;
            for(int index1 : index){
                pathArg += ",";
                name = this.prev.get(index1).getName();
                if(name.endsWith(".gz")){
                name = name.substring(0, name.length()-3);
                }
                pathArg += SLOGVIZ_FILE_PATH + File.separator + name;         
            }
            ProcessBuilder pb = new ProcessBuilder(PYTHON_COMMAND, "-m", "slogviz", "-f", pathArg, "-n", Integer.toString(state), "-t", timeoffset);
            File log = new File(SLOGVIZ_FILE_PATH + File.separator + ERROR_LOG_NAME);
            pb.redirectErrorStream(true);
            pb.redirectOutput(Redirect.appendTo(log));
            Process process = pb.start();
            logUsage(pathArg, state, timeoffset);
        }catch (IOException ex){
            Logger.getLogger(DataContentViewerSlogViz.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
private void callPython ( int [ ] index , int state , String timeoffset ) { try { String name = this . c . getName ( ) ; if ( name . endsWith ( ".gz" ) ) { name = name . substring ( 0 , name . length ( ) - 3 ) ; } String pathArg = SLOGVIZ_FILE_PATH + File . separator + name ; for ( int index1 : index ) { pathArg += "," ; name = this . prev . get ( index1 ) . getName ( ) ; if ( name . endsWith ( ".gz" ) ) { name = name . substring ( 0 , name . length ( ) - 3 ) ; } pathArg += SLOGVIZ_FILE_PATH + File . separator + name ; } ProcessBuilder pb = new ProcessBuilder ( PYTHON_COMMAND , "-m" , "slogviz" , "-f" , pathArg , "-n" , Integer . toString ( state ) , "-t" , timeoffset ) ; File log = new File ( SLOGVIZ_FILE_PATH + File . separator + ERROR_LOG_NAME ) ; pb . redirectErrorStream ( true ) ; pb . redirectOutput ( Redirect . appendTo ( log ) ) ; Process process = pb . start ( ) ; logUsage ( pathArg , state , timeoffset ) ; } catch ( IOException ex ) { Logger . getLogger ( DataContentViewerSlogViz . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } }
Calls SLogViz with the specified parameters.
Calls SLogViz with the specified parameters .