-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add hazardDatasets field to TornadoDataset model (#257)
* Remove LdapClient and refactor methods in Authorizer class in interface * Warning changes * add hazardDatasets field to TornadoDataset model * modify eqmodel to send hazardDataset instead of rasterDataset * add hazardDatasets to tornadoModel as well * remove unused imports * fix post tonado and remote unused imports * remove test files * use addTornadoHazardDataset instead of setHazardDatasets --------- Co-authored-by: Ya-Lan Yang <[email protected]>
- Loading branch information
1 parent
aeb0c94
commit 5c87be5
Showing
9 changed files
with
128 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ain/java/edu/illinois/ncsa/incore/service/hazard/models/tornado/TornadoHazardDataset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package edu.illinois.ncsa.incore.service.hazard.models.tornado; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import dev.morphia.annotations.Embedded; | ||
|
||
@Embedded | ||
public class TornadoHazardDataset { | ||
private String datasetId; | ||
private String demandType; | ||
private String demandUnits; | ||
private Double threshold = null; | ||
|
||
public String getDatasetId() { | ||
return datasetId; | ||
} | ||
|
||
public String getDemandType() { | ||
return demandType; | ||
} | ||
|
||
public String getDemandUnits() { | ||
return demandUnits; | ||
} | ||
|
||
public Double getThreshold() { | ||
return threshold; | ||
} | ||
|
||
public void setDatasetId(String datasetId) { | ||
this.datasetId = datasetId; | ||
} | ||
|
||
public void setDemandType(String demandType) { | ||
this.demandType = demandType; | ||
} | ||
|
||
public void setDemandUnits(String demandUnits) { | ||
this.demandUnits = demandUnits; | ||
} | ||
|
||
public void setThreshold(Double threshold) { | ||
this.threshold = threshold; | ||
} | ||
|
||
@JsonIgnore | ||
public String getThresholdJsonString(){ | ||
return String.format("{'%s': {'value': %s, 'unit': '%s'}}", | ||
this.demandType, this.threshold, this.demandUnits); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters