ApplicationConfig.java [src/java/d] 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-2017, 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 d;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import csip.Config;

import java.util.HashSet;
import java.util.Set;
import javax.servlet.ServletContext;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Context;

/**
 *
 * @author User
 */
@javax.ws.rs.ApplicationPath("")
public class ApplicationConfig extends Application {

  @Context
  private ServletContext context;

  @Override
  public Set<Class<?>> getClasses() {
    Set<Class<?>> resources = new HashSet<>();

    addRestResourceClasses(resources);

    Config.register(resources, context);
    return resources;
  }

//  private void addRestResourceClassesNRCS(Set<Class<?>> resources) {
//    resources.add(csip.ArchiveService.class);
//    resources.add(csip.CatalogService.class);
//    resources.add(csip.ControlService.class);
//    resources.add(csip.QueryService.class);
//    resources.add(csip.ReportService.class);
//    resources.add(csip.UIService.class);
//    //resources.add(d.erosion.soil01_soils1_3.V1_3.class);
//    //resources.add(d.erosion.soil01_soils1_3.V1_3_1.class);
//    resources.add(d.soils.rse02_wepot.V2_0.class);
//    resources.add(d.soils.rse02_wepot.V2_1.class);
//    //resources.add(d.soils.survey.soildetail.V1_0.class);
//    //resources.add(d.soils.survey.soildetail.V1_0.class);
//    //resources.add(d.soils.survey.soildetail.V1_0.class);
//    resources.add(d.soils.wqm02_wqmsoilparams.V2_0.class);
//    resources.add(d.soils.wqm21_wqmnutrientslpsrp.V2_0.class);
//    resources.add(d.soils.wwe01_wwesoilparams.V1_0.class);
//    resources.add(d.soils.wwe01_wwesoilparams.V1_1.class);
//    resources.add(d.soils.wwe01_wwesoilparams.V1_2.class);
//    resources.add(d.soils.wwe02_wepssoilinput.V1_0.class);
//    resources.add(d.soils.wwe02_wepssoilinput.V2_0.class);
//    resources.add(d.soils.wwe03_rusle2soilinput.V1_0.class);
//    resources.add(d.soils.wwe04_weppsoilinput.V1_0.class);
//  }
  /**
   * Do not modify addRestResourceClasses() method. It is automatically
   * re-generated by NetBeans REST support to populate given list with all
   * resources defined in the project.
   */
  private void addRestResourceClasses(Set<Class<?>> resources) {
    resources.add(csip.ArchiveService.class);
    resources.add(csip.CatalogService.class);
    resources.add(csip.ControlService.class);
    resources.add(csip.DynamicPyModelDataService.class);
    resources.add(csip.GzipWriterInterceptor.class);
    resources.add(csip.QueryService.class);
    resources.add(csip.ReportService.class);
    resources.add(csip.UIService.class);
    resources.add(d.csm_soils.V1_0.class);
    resources.add(d.soils.aggsoilparams.V1_0.class);
    resources.add(d.soils.basic.V2_0.class);
    resources.add(d.soils.basic.V2_1.class);
    resources.add(d.soils.fpp01_fppsoilparams.V1_0.class);
    resources.add(d.soils.fpp01_fppsoilparams.V2_0.class);
    resources.add(d.soils.rc03_rcsoilparams.V1_0.class);
    resources.add(d.soils.rse02_wepot.V2_0.class);
    resources.add(d.soils.rse02_wepot.V2_1.class);
    resources.add(d.soils.rse02_wepot.V3_0.class);
    resources.add(d.soils.rse02_wepot.V3_1.class);
    resources.add(d.soils.topthree.V1_0.class);
    resources.add(d.soils.wqm02_wqmsoilparams.V2_0.class);
    resources.add(d.soils.wqm02_wqmsoilparams.V2_1.class);
    resources.add(d.soils.wqm21_wqmnutrientslpsrp.V2_0.class);
    resources.add(d.soils.wwe01_wwesoilparams.V1_0.class);
    resources.add(d.soils.wwe01_wwesoilparams.V1_1.class);
    resources.add(d.soils.wwe01_wwesoilparams.V1_2.class);
    resources.add(d.soils.wwe01_wwesoilparams.V2_0.class);
    resources.add(d.soils.wwe01_wwesoilparams.V2_1.class);
    resources.add(d.soils.wwe01_wwesoilparams.V2_2.class);
    resources.add(d.soils.wwe02_wepssoilinput.V1_0.class);
    resources.add(d.soils.wwe02_wepssoilinput.V2_0.class);
    resources.add(d.soils.wwe02_wepssoilinput.V2_1.class);
    resources.add(d.soils.wwe02_wepssoilinput.V3_0.class);
    resources.add(d.soils.wwe03_rusle2soilinput.V1_0.class);
    resources.add(d.soils.wwe04_weppsoilinput.V1_0.class);
    resources.add(d.soils.wwe04_weppsoilinput.V2_0.class);
    resources.add(d.swatc.V1_0.class);
    resources.add(d.swatplus.V1_0.class);
  }
}