decodes.tsdb.DeleteAllSites Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opendcs Show documentation
Show all versions of opendcs Show documentation
A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.
The newest version!
package decodes.tsdb;
import java.util.Iterator;
import decodes.db.Database;
import decodes.db.Site;
public class DeleteAllSites extends TsdbAppTemplate
{
public DeleteAllSites(String logname)
{
super(logname);
}
@Override
protected void runApp() throws Exception
{
Database db = Database.getDb();
db.siteList.read();
for(Iterator sit = db.siteList.iterator(); sit.hasNext(); )
{
Site s = sit.next();
Database.getDb().getDbIo().deleteSite(s);
}
}
public static void main( String[] args )
throws Exception
{
DeleteAllSites app = new DeleteAllSites("util.log");
app.execute(args);
}
}