Package org.apache.uima.resource.metadata.impl

Examples of org.apache.uima.resource.metadata.impl.Import_impl.findAbsoluteUrl()


   */
  public static AnalysisEngineDescription createEngineDescription(String descriptorName,
          Object... configurationData) throws InvalidXMLException, IOException {
    Import_impl imprt = new Import_impl();
    imprt.setName(descriptorName);
    URL url = imprt.findAbsoluteUrl(UIMAFramework.newDefaultResourceManager());
    ResourceSpecifier specifier = ResourceCreationSpecifierFactory.createResourceCreationSpecifier(
            url, configurationData);
    return (AnalysisEngineDescription) specifier;
  }

View Full Code Here


    XMLInputSource input;

    if (aFileResource.startsWith(IMPORT_BY_NAME_PREFIX)) {
      Import theImport = new Import_impl();
      theImport.setName(aFileResource.substring(IMPORT_BY_NAME_PREFIX.length()));
      input = new XMLInputSource(theImport.findAbsoluteUrl(aResourceManager));
    } else {
      input = new XMLInputSource(aFileResource);
    }
    return input;
View Full Code Here

  public static String resolveByName(String input) {
    ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
    Import theImport = new Import_impl();
    theImport.setName(input);
    try {
      return theImport.findAbsoluteUrl(resourceManager).toExternalForm();
    } catch (InvalidXMLException e) {
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, XsltImportByName.class.getName(),
                "resolveByName", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                "UIMAEE_exception__WARNING", e);
View Full Code Here

  public static String resolveByName(String input) {
    ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
    Import theImport = new Import_impl();
    theImport.setName(input);
    try {
      return theImport.findAbsoluteUrl(resourceManager).toExternalForm();
    } catch (InvalidXMLException e) {
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, XsltImportByName.class.getName(),
                "resolveByName", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                "UIMAEE_exception__WARNING", new Object[] { e });
View Full Code Here

  public static String resolveByName(String input) {
    ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
    Import theImport = new Import_impl();
    theImport.setName(input);
    try {
      return theImport.findAbsoluteUrl(resourceManager).toExternalForm();
    } catch (InvalidXMLException e) {
      e.printStackTrace();
      return "ERROR converting import by name to absolute path";
    }
  }
View Full Code Here

     
      if (aFileResource.startsWith(IMPORT_BY_NAME_PREFIX))
      {
        Import theImport = new Import_impl();
        theImport.setName(aFileResource.substring(IMPORT_BY_NAME_PREFIX.length()));
        input = new XMLInputSource(theImport.findAbsoluteUrl(aResourceManager));
      }
      else
      {
        input = new XMLInputSource(aFileResource);
      }
View Full Code Here

   */
  public static AnalysisEngineDescription createEngineDescription(String descriptorName,
          Object... configurationData) throws InvalidXMLException, IOException {
    Import_impl imprt = new Import_impl();
    imprt.setName(descriptorName);
    URL url = imprt.findAbsoluteUrl(UIMAFramework.newDefaultResourceManager());
    ResourceSpecifier specifier = ResourceCreationSpecifierFactory.createResourceCreationSpecifier(
            url, configurationData);
    return (AnalysisEngineDescription) specifier;
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.