congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
UIMAFramework.newDefaultResourceManager
Code IndexAdd Tabnine to your IDE (free)

How to use
newDefaultResourceManager
method
in
org.apache.uima.UIMAFramework

Best Java code snippets using org.apache.uima.UIMAFramework.newDefaultResourceManager (Showing top 20 results out of 315)

origin: org.apache.uima/uimaj-as-core

/**
 * Creates and returns a new default Resource Manager
 * 
 * @return ResourceManager - new instance of a default ResourceManager
 */
public static ResourceManager produceResourceManager() {
 return UIMAFramework.newDefaultResourceManager();
}
origin: org.apache.uima/uimaj-cpe

public CPMImpl() throws Exception {
 this(UIMAFramework.newDefaultResourceManager());
}
origin: CLLKazan/UIMA-Ext

public static File resolveFile(String path, ResourceManager resMgr)
    throws URISyntaxException, MalformedURLException {
  Preconditions.checkArgument(path != null);
  if (resMgr == null) {
    resMgr = UIMAFramework.newDefaultResourceManager();
  }
  URL modelBaseURL = resMgr.resolveRelativePath(path);
  if (modelBaseURL == null)
    throw new IllegalStateException(format(
        "Can't resolve path %s using an UIMA relative path resolver", path));
  return new File(modelBaseURL.toURI());
}
origin: apache/uima-uimaj

/**
 * @see org.apache.uima.analysis_engine.AnalysisEngineDescription#getDelegateAnalysisEngineSpecifiers()
 */
public Map<String, ResourceSpecifier> getDelegateAnalysisEngineSpecifiers() throws InvalidXMLException {
 resolveDelegateAnalysisEngineImports(UIMAFramework.newDefaultResourceManager(), false);
 return Collections.unmodifiableMap(mDelegateAnalysisEngineSpecifiers);
}
origin: org.apache.uima/ruta-core

private void initializeResourceManager() {
 if (context instanceof UimaContextAdmin) {
  UimaContextAdmin uca = (UimaContextAdmin) context;
  ResourceManager rm = uca.getResourceManager();
  if (rm != null) {
   resourceManager = rm;
  }
 }
 if (resourceManager == null) {
  resourceManager = UIMAFramework.newDefaultResourceManager();
 }
}
origin: apache/uima-uimaj

public void doFullValidation() throws ResourceInitializationException {
 doFullValidation(UIMAFramework.newDefaultResourceManager());
}
origin: edu.utah.bmi.nlp/nlp-core

public ResourceManager createResourceManager() {
  ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
  try {
    resourceManager.setExtensionClassPath(this.getClass().getClassLoader(), classPath, true);
  } catch (MalformedURLException e1) {
    error.newError(IError.ERROR, getString("Internal Error", null), e1);
  }
  return resourceManager;
}
origin: apache/uima-uimaj

public void resolveImports() throws InvalidXMLException {
 if (getImport() != null) {
  resolveImports(UIMAFramework.newDefaultResourceManager());      
 }
}
origin: apache/uima-uimaj

/**
 * @see TypeSystemDescription#resolveImports()
 */
// allow these calls to be done multiple times on this same object, in different threads
public synchronized void resolveImports() throws InvalidXMLException {
 if (getImports().length == 0) {
  resolveImports(null, null);
 } else {
  resolveImports(new TreeSet<String>(), UIMAFramework.newDefaultResourceManager());
 }
}
origin: apache/uima-uimaj

/**
 * @see TypeSystemDescription#resolveImports()
 */
// support multithreading,
// avoid object creation if already resolved
public synchronized void resolveImports() throws InvalidXMLException {
 if (getImports().length == 0) {
  resolveImports(null, null);
 } else {
  resolveImports(new TreeSet<String>(), UIMAFramework.newDefaultResourceManager());
 }
}
origin: apache/uima-uimaj

public synchronized void resolveImports() throws InvalidXMLException {
 if (getImports().length == 0) {
  resolveImports(null, null);
 } else {
  resolveImports(new TreeSet<String>(), UIMAFramework.newDefaultResourceManager());
 }
}
origin: apache/uima-uimaj

public synchronized void resolveImports() throws InvalidXMLException {
 if (getImports().length == 0) {
  resolveImports(null, null);
 } else {
  resolveImports(new TreeSet<String>(), UIMAFramework.newDefaultResourceManager());
 }
}
origin: org.apache.uima/ruta-core

public ResourceManager getResourceManager() {
  if (resourceManager != null) {
    return resourceManager;
  } else {
    RutaBlock parent = owner.getParent();
    if (parent != null) {
      return parent.getEnvironment().getResourceManager();
    }
  }
  // at least return default resource manager
  return UIMAFramework.newDefaultResourceManager();
}
origin: org.dkpro.lab/dkpro-lab-uima

  @Override
  public void write(OutputStream aStream)
    throws Exception
  {
    AnalysisEngineDescription analysisDesc = getAnalysisEngineDescription(aContext);
    // FIXME should use the same resource manager here
    // as the engine uses!
    analysisDesc.resolveImports(UIMAFramework.newDefaultResourceManager());
    analysisDesc.toXML(aStream);
  }
});
origin: org.apache.uima/ruta-core

private ResourceManager getResourceManager(RutaBuildOptions options) {
 ResourceManager rm = null;
 if (options.getClassLoader() != null) {
  rm = new ResourceManager_impl(options.getClassLoader());
 } else {
  rm = UIMAFramework.newDefaultResourceManager();
 }
 return rm;
}
origin: org.apache.uima/uimaj-cpe

/**
 * Create a new CPEFactory on which we will later call parse(String) to parse a CPE descriptor.
 *
 * @param aResourceManager the a resource manager
 */
public CPEFactory(ResourceManager aResourceManager) {
 if (aResourceManager == null) {
  aResourceManager = UIMAFramework.newDefaultResourceManager();
 }
 uimaContext = UIMAFramework.newUimaContext(UIMAFramework.getLogger(), aResourceManager,
     UIMAFramework.newConfigurationManager());
}
origin: org.apache.uima/uimaj-as-core

private String resolveToAbsolutePath(Import theImport) {
  ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
  try {
    return theImport.findAbsoluteUrl(resourceManager).toExternalForm();
  } catch (Exception e) {
    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, WarmUpDataProvider.class.getName(),
          "resolveToAbsolutePath", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", e);
    }
    return "ERROR converting import by name to absolute path";
  }
}
origin: de.tudarmstadt.ukp.dkpro.lab/de.tudarmstadt.ukp.dkpro.lab.uima

  @Override
  public void write(OutputStream aStream)
    throws Exception
  {
    AnalysisEngineDescription analysisDesc = getAnalysisEngineDescription(aContext);
    // FIXME should use the same resource manager here
    // as the engine uses!
    analysisDesc.resolveImports(UIMAFramework.newDefaultResourceManager());
    analysisDesc.toXML(aStream);
  }
});
origin: apache/uima-uimaj

public Map<String, ResourceSpecifier> getAllComponentSpecifiers(ResourceManager aResourceManager) throws InvalidXMLException {
 if (aResourceManager == null) {
  aResourceManager = UIMAFramework.newDefaultResourceManager();
 }
 resolveImports(aResourceManager);
 Map<String, ResourceSpecifier> map = new LinkedHashMap<String, ResourceSpecifier>(mDelegateAnalysisEngineSpecifiers);
 if (getFlowControllerDeclaration() != null) {
  map.put(getFlowControllerDeclaration().getKey(), getFlowControllerDeclaration()
      .getSpecifier());
 }
 return Collections.unmodifiableMap(map);
}
origin: org.apache.uima/ConceptMapper

public void initCPM() throws DictionaryLoaderException {
 try {
  ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
  String dp = System.getProperty("uima.datapath");
  if (null != dp) {
   resMgr.setDataPath(dp);
  }
  ae = UIMAFramework.produceAnalysisEngine(aeSpecifier);
  cas = ae.newCAS();
 } catch (ResourceInitializationException e) {
  throw new DictionaryLoaderException(e);
 } catch (MalformedURLException e) {
   throw new DictionaryLoaderException(e);
 }
}
org.apache.uimaUIMAFrameworknewDefaultResourceManager

Javadoc

Gets a new instance of the default ResourceManager used by this implementation. An application can configure this ResourceManager and then pass it to the #produceAnalysisEngine(ResourceSpecifier,ResourceManager,Map) method.

Popular methods of UIMAFramework

  • getXMLParser
  • produceAnalysisEngine
  • getLogger
  • getResourceSpecifierFactory
  • newConfigurationManager
  • newUimaContext
  • produceCollectionReader
  • produceCollectionProcessingEngine
  • getDefaultPerformanceTuningProperties
  • produceCasConsumer
  • getVersionString
  • produceResource
  • getVersionString,
  • produceResource,
  • _getBuildRevision,
  • _getDefaultPerformanceTuningProperties,
  • _getLogger,
  • _getMajorVersion,
  • _getMinorVersion,
  • _getResourceFactory,
  • _getResourceSpecifierFactory

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JList (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now