V1_0.java [src/java/m/crp/smwepp] Revision: default  Date:
/*
 * $Id$
 *
 * This file is part of the Cloud Services Integration Platform (CSIP),
 * a Model-as-a-Service framework, API, and application suite.
 *
 * 2012-2019, OMSLab, Colorado State University.
 *
 * OMSLab licenses this file to you under the MIT license.
 * See the LICENSE file in the project root for more information.
 */
package m.crp.smwepp;

import crp.utils.ANN_ModelDataService;
import csip.ServiceException;
import csip.utils.SimpleCache;
import csip.annotations.Description;
import csip.annotations.Name;
import csip.annotations.Resource;
import csip.annotations.ResourceType;
import javax.ws.rs.Path;

/**
 *
 * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
 */
@Name("WEPP SM")
@Description("WEPP surrogate model.")
@Path("m/smwepp/1.0")
@Resource(file = "/data/wepp_wa_grant_20200123.zip", id = "wepp_wa_grant_20200123", type = ResourceType.ARCHIVE)
@Resource(file = "/data/wepp_ms_yazoo_20200123.zip", id = "wepp_ms_yazoo_20200123", type = ResourceType.ARCHIVE)
public class V1_0 extends ANN_ModelDataService {

  static SimpleCache<String, ANN_Network> anns = new SimpleCache<>();

  @Override
  protected ANN_Network getAnnList() throws ServiceException {
    return anns.get(annName, a -> getANNs("wepp_" + annName));
  }
}