// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Fan.java
// public class Fan {
// 	public final String name;
// 	public final Double value;
// 
// 	public Fan(String name, Double value) {
// 		this.name = name;
// 		this.value = value;
// 	}
// }
// 
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Load.java
// public class Load {
// 	public final String name;
// 	public final Double value;
// 
// 	public Load(String name, Double value) {
// 		this.name = name;
// 		this.value = value;
// 	}
// }
// 
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Sensors.java
// public class Sensors {
// 	public final List<Temperature> temperatures;
// 	public final List<Fan> fans;
// 	public final List<Load> loads;
// 
// 	public Sensors(List<Temperature> temperatures, List<Fan> fans, List<Load> loads) {
// 		this.temperatures = temperatures;
// 		this.fans = fans;
// 		this.loads = loads;
// 	}
// }
// 
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Temperature.java
// public class Temperature {
// 	public final String name;
// 	public final Double value;
// 
// 	public Temperature(String name, Double value) {
// 		this.name = name;
// 		this.value = value;
// 	}
// }


import java.text.NumberFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import com.profesorfalken.jsensors.model.components.*;
import com.profesorfalken.jsensors.model.sensors.Fan;
import com.profesorfalken.jsensors.model.sensors.Load;
import com.profesorfalken.jsensors.model.sensors.Sensors;
import com.profesorfalken.jsensors.model.sensors.Temperature;

	private Gpu getGpu(String gpuData) {
		return new Gpu(getName(gpuData), getSensors(gpuData));
	}

	private Disk getDisk(String diskData) {
		return new Disk(getName(diskData), getSensors(diskData));
	}

	private Mobo getMobo(String moboData) {
		return new Mobo(getName(moboData), getSensors(moboData));
	}

	private static String getName(String componentData) {
		String name = null;

		String[] dataLines = componentData.split("\\r?\\n");
		for (final String dataLine : dataLines) {
			if (dataLine.startsWith("Label")) {
				name = dataLine.split(":")[1].trim();
				break;
			}
		}

		return name;
	}

	private Sensors getSensors(String componentData) {
		List<Temperature> temperatures = new ArrayList<Temperature>();
		List<Fan> fans = new ArrayList<Fan>();
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Fan.java
// public class Fan {
// 	public final String name;
// 	public final Double value;
// 
// 	public Fan(String name, Double value) {
// 		this.name = name;
// 		this.value = value;
// 	}
// }
// 
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Load.java
// public class Load {
// 	public final String name;
// 	public final Double value;
// 
// 	public Load(String name, Double value) {
// 		this.name = name;
// 		this.value = value;
// 	}
// }
// 
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Sensors.java
// public class Sensors {
// 	public final List<Temperature> temperatures;
// 	public final List<Fan> fans;
// 	public final List<Load> loads;
// 
// 	public Sensors(List<Temperature> temperatures, List<Fan> fans, List<Load> loads) {
// 		this.temperatures = temperatures;
// 		this.fans = fans;
// 		this.loads = loads;
// 	}
// }
// 
// Path: src/main/java/com/profesorfalken/jsensors/model/sensors/Temperature.java
// public class Temperature {
// 	public final String name;
// 	public final Double value;
// 
// 	public Temperature(String name, Double value) {
// 		this.name = name;
// 		this.value = value;
// 	}
// }


// Path: src/main/java/com/profesorfalken/jsensors/manager/SensorsManager.java
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import com.profesorfalken.jsensors.model.components.*;
import com.profesorfalken.jsensors.model.sensors.Fan;
import com.profesorfalken.jsensors.model.sensors.Load;
import com.profesorfalken.jsensors.model.sensors.Sensors;
import com.profesorfalken.jsensors.model.sensors.Temperature;


	private Gpu getGpu(String gpuData) {
		return new Gpu(getName(gpuData), getSensors(gpuData));
	}

	private Disk getDisk(String diskData) {
		return new Disk(getName(diskData), getSensors(diskData));
	}

	private Mobo getMobo(String moboData) {
		return new Mobo(getName(moboData), getSensors(moboData));
	}

	private static String getName(String componentData) {
		String name = null;

		String[] dataLines = componentData.split("\\r?\\n");
		for (final String dataLine : dataLines) {
			if (dataLine.startsWith("Label")) {
				name = dataLine.split(":")[1].trim();
				break;
			}
		}

		return name;
	}

	private Sensors getSensors(String componentData) {
		List<Temperature> temperatures = new ArrayList<Temperature>();
		List<Fan> fans = new ArrayList<Fan>();
		List<Load> loads = new ArrayList<Load>();