tagging-server/src/main/java/org/apache/opennlp/tagging_server/ServiceUtil.java [62:74]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static <T> T getService(ServiceReference modelService, Class<T> modelClazz) {
    
    T model;
    if (modelService != null) {
      BundleContext context = modelService.getBundle().getBundleContext();
      model = (T) context.getService(modelService);
    }
    else {
      throw new RuntimeException("Model does not exist!");
    }
    
    return model;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tagging-server/src/main/java/org/apache/opennlp/tagging_server/ModelUtil.java [38:50]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static <T> T getModel(ServiceReference modelService, Class<T> modelClazz) {
    
    T model;
    if (modelService != null) {
      BundleContext context = modelService.getBundle().getBundleContext();
      model = (T) context.getService(modelService);
    }
    else {
      throw new RuntimeException("Model does not exist!");
    }
    
    return model;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



