Tabnine Logo
UIMAFramework.getXMLParser
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/tika

ResourceSpecifier aeSpecifier = UIMAFramework.getXMLParser()
    .parseResourceSpecifier(aeIputSource);
origin: org.apache.uima/textmarker-core

 protected AnalysisEngine loadEngineMyselfIS(String location) throws IOException,
     InvalidXMLException, ResourceInitializationException {
  InputStream locationIS = getClass().getClassLoader().getResourceAsStream(location);
  XMLInputSource in = new XMLInputSource(locationIS, null);
  ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
  AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
  return ae;
 }
}
origin: org.apache.ctakes/ctakes-core

/**
 * Parses and returns the descriptor for this collection reader. The descriptor is stored in the
 * uima.jar file and located using the ClassLoader.
 *
 * @return an object containing all of the information parsed from the descriptor.
 * @throws InvalidXMLException if the descriptor is invalid or missing
 */
public static CasConsumerDescription getDescription() throws InvalidXMLException {
  InputStream descStream = XmiWriterCasConsumerCtakes.class
      .getResourceAsStream( "XmiWriterCasConsumerCtakes.xml" );
  return UIMAFramework.getXMLParser().parseCasConsumerDescription(
      new XMLInputSource( descStream, null ) );
}
origin: org.apache.uima/uimaj-cpe

/**
 * Instantiates a ResourceSpecifier from a given URL.
 * 
 * @param aDescriptorUrl - URL of descriptor
 * @return - ResourceSpecifier
 * 
 * @throws Exception -
 */
public ResourceSpecifier getSpecifier(URL aDescriptorUrl) throws Exception {
 XMLInputSource in = new XMLInputSource(aDescriptorUrl);
 return UIMAFramework.getXMLParser().parseResourceSpecifier(in);
}
origin: apache/ctakes

public static AnalysisEngine getAE(File analysisEngineDescriptorFile) throws ResourceInitializationException {
  try {
    XMLInputSource xmlInputSource = new XMLInputSource(analysisEngineDescriptorFile);
    XMLParser xmlParser = UIMAFramework.getXMLParser();
    ResourceSpecifier resourceSpecifier = xmlParser.parseResourceSpecifier(xmlInputSource);
    AnalysisEngine analysisEngine = UIMAFramework.produceAnalysisEngine(resourceSpecifier);
    return analysisEngine;
  } catch (IOException ioe) {
    throw new ResourceInitializationException(ioe);
  } catch (InvalidXMLException ixe) {
    throw new ResourceInitializationException(ixe);
  }
}
origin: org.apache.ctakes/ctakes-utils

public static AnalysisEngine getAE(File analysisEngineDescriptorFile) throws ResourceInitializationException {
  try {
    XMLInputSource xmlInputSource = new XMLInputSource(analysisEngineDescriptorFile);
    XMLParser xmlParser = UIMAFramework.getXMLParser();
    ResourceSpecifier resourceSpecifier = xmlParser.parseResourceSpecifier(xmlInputSource);
    AnalysisEngine analysisEngine = UIMAFramework.produceAnalysisEngine(resourceSpecifier);
    return analysisEngine;
  } catch (IOException ioe) {
    throw new ResourceInitializationException(ioe);
  } catch (InvalidXMLException ixe) {
    throw new ResourceInitializationException(ixe);
  }
}
origin: org.apache.uima/uimaj-as-core

private void addProcessingResourceMetadata(String mapkey, String aDescriptorName)
    throws Exception {
 AnalysisEngineDescription specifier = UIMAFramework.getXMLParser()
     .parseAnalysisEngineDescription(new XMLInputSource(new File(aDescriptorName)));
 AnalysisEngineMetaData meta = specifier.getAnalysisEngineMetaData();
 addMetadata(meta);
 processingResourceMap.put(mapkey, meta);
}
origin: nlpie/biomedicus

 public static CpeDescription loadCpeDescription(Path path) throws BiomedicusException {
  CpeDescription cpeDescription;
  try {
   XMLInputSource inputSource = new XMLInputSource(path.toFile());
   cpeDescription = UIMAFramework.getXMLParser().parseCpeDescription(inputSource);
  } catch (InvalidXMLException | IOException e) {
   throw new BiomedicusException(e);
  }
  return cpeDescription;
 }
}
origin: apache/uima-uimaj

private void resolveImport(URL aURL, Collection<String> aAlreadyImportedURLs,
    Collection<ExternalResourceDescription> aResultResources, Collection<ExternalResourceBinding> aResultBindings, ResourceManager aResourceManager)
    throws InvalidXMLException, IOException {
 XMLInputSource input = new XMLInputSource(aURL);
 ResourceManagerConfiguration desc = UIMAFramework.getXMLParser()
     .parseResourceManagerConfiguration(input);
 desc.resolveImports(aAlreadyImportedURLs, aResourceManager);
 aResultResources.addAll(Arrays.asList(desc.getExternalResources()));
 aResultBindings.addAll(Arrays.asList(desc.getExternalResourceBindings()));
}
origin: nlpie/biomedicus

public static CollectionReaderDescription loadCollectionReaderDescription(Path path)
  throws BiomedicusException {
 CollectionReaderDescription collectionReaderDescription;
 try {
  XMLInputSource aInput = new XMLInputSource(path.toFile());
  collectionReaderDescription = UIMAFramework.getXMLParser()
    .parseCollectionReaderDescription(aInput);
 } catch (IOException | InvalidXMLException e) {
  throw new BiomedicusException(e);
 }
 return collectionReaderDescription;
}
origin: org.apache.uima/uimaj-as-core

public void setMetadata(String aDescriptorName) throws Exception {
 AnalysisEngineDescription specifier = UIMAFramework.getXMLParser()
     .parseAnalysisEngineDescription(new XMLInputSource(new File(aDescriptorName)));
 AnalysisEngineMetaData meta = specifier.getAnalysisEngineMetaData();
 addMetadata(meta);
}
origin: org.apache.ctakes/ctakes-assertion

private static CAS getTypeSystemFromDescriptor(String descriptor) throws InvalidXMLException, IOException, ResourceInitializationException, CASException {
  XMLParser xmlParser = UIMAFramework.getXMLParser();
  AnalysisEngineDescription tsDesc = xmlParser.parseAnalysisEngineDescription(new XMLInputSource(descriptor));
  return CasCreationUtils.createCas(tsDesc);
}

origin: apache/ctakes

private static CAS getTypeSystemFromDescriptor(String descriptor) throws InvalidXMLException, IOException, ResourceInitializationException, CASException {
  XMLParser xmlParser = UIMAFramework.getXMLParser();
  AnalysisEngineDescription tsDesc = xmlParser.parseAnalysisEngineDescription(new XMLInputSource(descriptor));
  return CasCreationUtils.createCas(tsDesc);
}
 
origin: org.apache.ctakes/ctakes-assertion

private static CAS getTypeSystemFromDescriptor(String descriptor) throws InvalidXMLException, IOException, ResourceInitializationException, CASException {
  XMLParser xmlParser = UIMAFramework.getXMLParser();
  AnalysisEngineDescription tsDesc = xmlParser.parseAnalysisEngineDescription(new XMLInputSource(descriptor));
  return CasCreationUtils.createCas(tsDesc);
}
 
origin: org.apache.uima/textmarker-core

protected AnalysisEngine loadEngineMyself(String location) throws IOException,
    InvalidXMLException, ResourceInitializationException {
 XMLInputSource in = new XMLInputSource(location);
 ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
 AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
 return ae;
}
origin: org.apache.uima/uimaj-ep-configurator

@Override
protected String getDescriptionFromImport(String source) throws InvalidXMLException, IOException {
 TypeSystemDescription parsedImportItem = UIMAFramework.getXMLParser()
     .parseTypeSystemDescription(new XMLInputSource(source));
 return parsedImportItem.getDescription();
}
origin: apache/ctakes

private static CAS getTypeSystemFromDescriptor(String descriptor) throws InvalidXMLException, IOException, ResourceInitializationException, CASException {
  XMLParser xmlParser = UIMAFramework.getXMLParser();
  AnalysisEngineDescription tsDesc = xmlParser.parseAnalysisEngineDescription(new XMLInputSource(descriptor));
  return CasCreationUtils.createCas(tsDesc);
}

origin: org.apache.uima/uimaj-ep-configurator

/**
 * used when hovering.
 *
 * @param source the source
 * @return the description from import
 * @throws InvalidXMLException the invalid XML exception
 * @throws IOException Signals that an I/O exception has occurred.
 */
@Override
protected String getDescriptionFromImport(String source) throws InvalidXMLException, IOException {
 FsIndexCollection parsedImportItem = UIMAFramework.getXMLParser().parseFsIndexCollection(
     new XMLInputSource(source));
 return parsedImportItem.getDescription();
}
origin: org.apache.uima/ruta-core

private TypeSystemDescription getTypeSystemDescriptor(URL url, RutaBuildOptions option,
    ResourceManager rm) throws InvalidXMLException, IOException {
 TypeSystemDescription tsdesc = UIMAFramework.getXMLParser()
     .parseTypeSystemDescription(new XMLInputSource(url));
 if (option.isResolveImports()) {
  tsdesc.resolveImports(rm);
 }
 return tsdesc;
}
origin: org.apache.uima/uima-ducc-cli

private void initializeByDD() throws Exception {
  String mid = "initializeByDD";
  String dd = properties.getProperty(AllInOne.ProcessDD);
  File ddFile = getFile(dd);
  DDParser ddParser = new DDParser(ddFile);
  String ddImport = ddParser.getDDImport();
  mh.frameworkDebug(cid, mid, ddImport);
  File uimaFile = getFile(ddImport);
  XMLInputSource xis = new XMLInputSource(uimaFile);
  ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(xis);
  ae = UIMAFramework.produceAnalysisEngine(specifier);
}

org.apache.uimaUIMAFrameworkgetXMLParser

Javadoc

Get a reference to the UIMA XMLParser, which is used to parse ResourceSpecifier objects from their XML representations.

Popular methods of UIMAFramework

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

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • CodeWhisperer 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