forked from sopac/cifdp-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.jsp
22 lines (22 loc) · 801 Bytes
/
data.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<%@page language="java" contentType="text/plain" pageEncoding="UTF-8" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%
String path = "/home/sachin/Documents/CIFDP_FORECAST_2021/inundation/";
String sites[] = {"Cuvu", "Komave", "Korotogo", "MauiBay"};
//String sites[] = {"Cuvu", "Komave", "Korotogo"};
ArrayList<String> res = new ArrayList<String>();
File fpath = new File(path);
for (File f : fpath.listFiles()){
String fn = f.getName().replaceAll("_", "-").replace("Runup-", "").trim();
for (String s : sites){
if (fn.contains(s)){
if (fn.contains("-final.nc") || fn.contains(".png")){
res.add(fn.replace("-final.nc", ""));
}
}
}
}
Collections.sort(res);
for (String r : res) out.println(r);
%>