Package org.apache.uima.resource.metadata

Examples of org.apache.uima.resource.metadata.ExternalResourceBinding


      extRes.setResourceSpecifier(uriSpec);
      extRes.setName("Resource1");
      extRes.setDescription("Test");
      resMgrCfg.setExternalResources(new ExternalResourceDescription[] { extRes });

      ExternalResourceBinding binding = UIMAFramework.getResourceSpecifierFactory()
              .createExternalResourceBinding();
      binding.setKey("ResourceKey");
      binding.setResourceName("Resource1");
      mTestDesc.setResourceManagerConfiguration(resMgrCfg);
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
View Full Code Here


   *          the resource key to bind.
   * @return the description.
   */
  public static ExternalResourceBinding createExternalResourceBinding(final String aKey,
          final String aResourceKey) {
    ExternalResourceBinding extResBind = new ExternalResourceBinding_impl();
    extResBind.setResourceName(aResourceKey);
    extResBind.setKey(aKey);
    return extResBind;
  }
View Full Code Here

    for (ExternalResourceDescription r : aResMgrCfg.getExternalResources()) {
      resources.put(r.getName(), r);
    }

    // For the current resource, add resource and binding
    ExternalResourceBinding extResBind = createExternalResourceBinding(aBindTo, aRes);
    bindings.put(extResBind.getKey(), extResBind);
    resources.put(aRes.getName(), aRes);

    // Handle nested resources
    bindNestedResources(aRes, bindings, resources);
View Full Code Here

    for (ExternalResourceDescription r : extRes.getExternalResources()) {
      resources.put(r.getName(), r);
    }

    // For the current resource, add resource and binding
    ExternalResourceBinding extResBind = createExternalResourceBinding(aBindTo, aNestedRes);
    bindings.put(extResBind.getKey(), extResBind);
    resources.put(aRes.getName(), aRes);

    // Handle nested resources
    bindNestedResources(aRes, bindings, resources);
View Full Code Here

   * @param aRes
   *          the resource that should be bound.
   */
  public static void bindExternalResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo,
          String aRes) {
    ExternalResourceBinding extResBind = createExternalResourceBinding(aBindTo, aRes);
    aResMgrCfg.addExternalResourceBinding(extResBind);
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.resource.metadata.ExternalResourceBinding

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.