Package org.metrapp.customalgorithms

Source Code of org.metrapp.customalgorithms.Client

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package org.metrapp.customalgorithms;

import java.util.LinkedList;
import org.metrapp.dataModel.DataFrame;
import org.metrapp.dataModel.StringDataFrame;
import rcaller.RCaller;
import rcaller.RCode;

/**
*
* @author Ilija
*/
public class Client {
   
    private AlgorithmFactory af;
   
    public Client(AlgorithmFactory af1){
        af = af1;
    }
   
    public static void main(String[] args) {
       
        DataFrame d = new StringDataFrame();
        RCaller caller = new RCaller();
        RCode code = new RCode();    
        Client client;
       
        DateAlgorithmFactory daf = new DateAlgorithmFactory();
        client = new Client(daf);
       
        System.out.println("Creating algorithm for dates...");
        client.create(d, caller, code, null);
       
        TimeAlgorithmFactory taf = new TimeAlgorithmFactory();
        client = new Client(taf);
       
        System.out.println("Creating algorithm for time...");
        client.create(d, caller, code, null);      
       
       
    }
   
    public void create(DataFrame d, RCaller caller, RCode code, LinkedList<String> parameters){
        af.createRCodeVariableReductionAlgorithm();
        af.createFilter(d, caller, code, parameters);
        af.createRCodeVariableReductionAlgorithm();
    }
}
TOP

Related Classes of org.metrapp.customalgorithms.Client

TOP
Copyright © 2018 www.massapi.com. 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.