Package org.apache.uima.resource

Examples of org.apache.uima.resource.ConfigurationManager


      aAdditionalParams.put(Resource.PARAM_RESOURCE_MANAGER, resMgr);
    }
   
    // Share the configMgr so that (re)configure actions affect all instances
   
    ConfigurationManager configMgr = (ConfigurationManager) aAdditionalParams.get(Resource.PARAM_CONFIG_MANAGER);
    if (configMgr == null) {
      configMgr = UIMAFramework.newConfigurationManager();
      aAdditionalParams.put(Resource.PARAM_CONFIG_MANAGER, configMgr);
    }
   
View Full Code Here


   */
  public static void initialize(final Object component, final Map<String, Object> map)
          throws ResourceInitializationException {
    UimaContextAdmin context = UIMAFramework.newUimaContext(UIMAFramework.getLogger(),
            UIMAFramework.newDefaultResourceManager(), UIMAFramework.newConfigurationManager());
    ConfigurationManager cfgMgr = context.getConfigurationManager();
    cfgMgr.setSession(context.getSession());
    for (Entry<String, Object> e : map.entrySet()) {
      cfgMgr.setConfigParameterValue(context.getQualifiedContextName() + e.getKey(), e.getValue());
    }
    initialize(component, context);
  }
View Full Code Here

    String modelPath = (String) context.getConfigParameterValue(modelPathParam);
    if (modelPath != null) {
      URL modelClasspathURL = RelationExtractorAnnotator.class.getResource(modelPath);
      if (modelClasspathURL != null) {
        UimaContextAdmin contextAdmin = (UimaContextAdmin) context;
        ConfigurationManager manager = contextAdmin.getConfigurationManager();
        String qualifiedModelPathParam = contextAdmin.getQualifiedContextName() + modelPathParam;
        manager.setConfigParameterValue(qualifiedModelPathParam, modelClasspathURL.toString());
      }
    }
  }
View Full Code Here

   */
  public static void initialize(final Object component, final Map<String, Object> map)
          throws ResourceInitializationException {
    UimaContextAdmin context = UIMAFramework.newUimaContext(UIMAFramework.getLogger(),
            UIMAFramework.newDefaultResourceManager(), UIMAFramework.newConfigurationManager());
    ConfigurationManager cfgMgr = context.getConfigurationManager();
    cfgMgr.setSession(context.getSession());
    for (Entry<String, Object> e : map.entrySet()) {
      cfgMgr.setConfigParameterValue(context.getQualifiedContextName() + e.getKey(), e.getValue());
    }
    initialize(component, context);
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.resource.ConfigurationManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.