package com.inspect.algmodel;

import java.net.URL;
import java.net.URLConnection;

public class AlgModelUtils {
   String ip = "192.168.1.100";
   String port = "5000";
   String tokenUrl;
   String recogParamsUrl;
   String historyVersionUrl;
   String updateAlgorithmVersionUrl;
   String updateProgressUrl;

   public AlgModelUtils() {
      this.tokenUrl = "http://" + this.ip + ":" + this.port + "/recogApi/token";
      this.recogParamsUrl = "http://" + this.ip + ":" + this.port + "/runRecogApi/recogParams";
      this.historyVersionUrl = "http://" + this.ip + ":" + this.port + "/recogApi/historyVersion";
      this.updateAlgorithmVersionUrl = "http://" + this.ip + ":" + this.port + "/recogApi/updateAlgorithmVersion";
      this.updateProgressUrl = "http://" + this.ip + ":" + this.port + "/recogApi/updateProgress";
   }

   public void token() {
      URLConnection conn = null;
      URL realUrl = null;

      try {
         realUrl = new URL(this.tokenUrl);
         conn = realUrl.openConnection();
         conn.setRequestProperty("Content--Type", "application/json;charset=UTF-8");
      } catch (Exception e) {
         e.printStackTrace();
      }

   }

   public void recogParams() {
   }

   public void historyVersion() {
   }

   public void updateAlgorithmVersion() {
   }

   public void updateProgress() {
   }
}
