Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MonitoringPoint {
- private String referenceTitle;
- private String coordinates;
- private Map<String, String> information;
- public MonitoringPoint(String referenceTitle, String coordinates, Map<String, String> information) {
- this.referenceTitle = referenceTitle;
- this.coordinates = coordinates;
- this.information = information;
- }
- public String getReferenceTitle() {
- return referenceTitle;
- }
- public String getCoordinates() {
- return coordinates;
- }
- public Map<String, String> getInformation() {
- return information;
- }
- }
- public class Check {
- private String category;
- private String unitsOfMeasurement;
- private String measurementFrequency;
- private Map<String, String> healthAndEnvironmentalRisks;
- public Check(String category, String unitsOfMeasurement, String measurementFrequency, Map<String, String> healthAndEnvironmentalRisks) {
- this.category = category;
- this.unitsOfMeasurement = unitsOfMeasurement;
- this.measurementFrequency = measurementFrequency;
- this.healthAndEnvironmentalRisks = healthAndEnvironmentalRisks;
- }
- public String getCategory() {
- return category;
- }
- public String getUnitsOfMeasurement() {
- return unitsOfMeasurement;
- }
- public String getMeasurementFrequency() {
- return measurementFrequency;
- }
- public Map<String, String> getHealthAndEnvironmentalRisks() {
- return healthAndEnvironmentalRisks;
- }
- }
- public class AnalysisLab {
- private String title;
- private Map<String, String> businessInformation;
- private List<Check> checks;
- public AnalysisLab(String title, Map<String, String> businessInformation, List<Check> checks) {
- this.title = title;
- this.businessInformation = businessInformation;
- this.checks = checks;
- }
- public String getTitle() {
- return title;
- }
- public Map<String, String> getBusinessInformation() {
- return businessInformation;
- }
- public List<Check> getChecks() {
- return checks;
- }
- }
- public class CheckRecord {
- private Date date;
- private Check check;
- private String results;
- public CheckRecord(Date date, Check check, String results) {
- this.date = date;
- this.check = check;
- this.results = results;
- }
- public Date getDate() {
- return date;
- }
- public Check getCheck() {
- return check;
- }
- public String getResults() {
- return results;
- }
- }
- public class System {
- private List<MonitoringPoint> monitoringPoints;
- private List<Check> checks;
- private List<AnalysisLab> analysisLabs;
- private List<CheckRecord> checkRecords;
- public System(List<MonitoringPoint> monitoringPoints, List<Check> checks, List<AnalysisLab> analysisLabs, List<CheckRecord> checkRecords) {
- this.monitoringPoints = monitoringPoints;
- this.checks = checks;
- this.analysisLabs = analysisLabs;
- this.checkRecords = checkRecords;
- }
- public List<MonitoringPoint> getMonitoringPoints() {
- return monitoringPoints;
- }
- public List<Check> getChecks() {
- return checks;
- }
- public List<AnalysisLab> getAnalysisLabs() {
- return analysisLabs;
- }
- public List<CheckRecord> getCheckRecords() {
- return checkRecords;
- }
- public void addMonitoringPoint(MonitoringPoint monitoringPoint) {
- monitoringPoints.add(monitoringPoint);
- }
- public void addCheck(Check check) {
- checks.add(check);
- }
- public void addAnalysisLab(AnalysisLab analysisLab) {
- analysisLabs.add(analysisLab);
- }
- public void addCheckRecord(CheckRecord checkRecord) {
- checkRecords.add(checkRecord);
- }
- public void editMonitoringPoint(MonitoringPoint monitoringPoint) {
- for (int i = 0; i < monitoringPoints.size(); i++) {
- if (monitoringPoints.get(i).getReferenceTitle().equals(monitoringPoint.getReferenceTitle())) {
- monitoringPoints.set(i, monitoringPoint);
- break;
- }
- }
- }
- public void editCheck(Check check) {
- for (int i = 0; i < checks.size(); i++) {
- if (checks.get(i).getCategory().equals(check.getCategory())) {
- checks.set(i, check);
- break;
- }
- }
- }
- public void editAnalysisLab(AnalysisLab analysisLab) {
- for (int i = 0; i < analysisLabs.size(); i++) {
- if (analysisLabs.get(i).getTitle().equals(analysisLab.getTitle())) {
- analysisLabs.set(i, analysisLab);
- break;
- }
- }
- }
- public void editCheckRecord(CheckRecord checkRecord) {
- for (int i = 0; i < checkRecords.size(); i++) {
- if (checkRecords.get(i).getCheck().getCategory().equals(checkRecord.getCheck().getCategory()) &&
- checkRecords.get(i).getDate().equals(checkRecord.getDate())) {
- checkRecords.set(i, checkRecord);
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement