V1_0.java [src/java/m/crp/smweps] 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.smweps;

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

/**
 *
 * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
 */
@Name("WEPS SM")
@Description("WEPS surrogate model.")
@Path("m/smweps/1.0")
@Resource(file = "/data/weps_wa_grant_20200210.zip", id = "weps_wa_grant_20200210", type = ResourceType.ARCHIVE)
@Resource(file = "/data/weps_ms_yazoo_20200210.zip", id = "weps_ms_yazoo_20200210", 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("weps_" + annName));
  }
}