Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
c84c47f8
Commit
c84c47f8
authored
3 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
662eaa41
No related branches found
No related tags found
2 merge requests
!552
Production Release | nshmp-haz
,
!548
Resolves: Web service(s) for source model mining
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/gov/usgs/earthquake/nshmp/www/services/ServletUtil.java
+0
-37
0 additions, 37 deletions
...a/gov/usgs/earthquake/nshmp/www/services/ServletUtil.java
with
0 additions
and
37 deletions
src/main/java/gov/usgs/earthquake/nshmp/www/services/ServletUtil.java
+
0
−
37
View file @
c84c47f8
...
...
@@ -67,7 +67,6 @@ public class ServletUtil {
// private static List<HazardModel> HAZARD_MODELS = new ArrayList<>();
private
static
HazardModel
HAZARD_MODEL
;
private
static
final
String
MODEL_INFO
=
"model-info.json"
;
static
{
/* TODO modified for deagg-epsilon branch; should be context var */
...
...
@@ -86,10 +85,6 @@ public class ServletUtil {
.
create
();
}
// static List<HazardModel> hazardModels() {
// return List.copyOf(HAZARD_MODELS);
// }
static
HazardModel
model
()
{
return
HAZARD_MODEL
;
}
...
...
@@ -103,14 +98,6 @@ public class ServletUtil {
@EventListener
void
startup
(
StartupEvent
event
)
{
HAZARD_MODEL
=
loadModel
(
modelPath
);
// TODO should model path just be libs/model
// try {
// var modelFinder = new ModelFinder();
// Files.walkFileTree(modelPath, modelFinder);
// modelFinder.paths().forEach(path -> HAZARD_MODELS.add(loadModel(path)));
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
}
private
HazardModel
loadModel
(
Path
path
)
{
...
...
@@ -183,31 +170,7 @@ public class ServletUtil {
}
}
// private static class ModelFinder extends SimpleFileVisitor<Path> {
// private List<Path> paths;
//
// ModelFinder() {
// paths = new ArrayList<>();
// }
//
// List<Path> paths() {
// return List.copyOf(paths);
// }
//
// @Override
// public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) {
// var fileName = path.getFileName();
//
// if (fileName != null && fileName.toString().equals(MODEL_INFO)) {
// paths.add(path.getParent());
// }
//
// return FileVisitResult.CONTINUE;
// }
// }
private
static
class
PathConverter
implements
JsonSerializer
<
Path
>
{
@Override
public
JsonElement
serialize
(
Path
path
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment