Package org.apache.uima.resource.metadata

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


    topDescriptorField = toolkit.createText(browsingGroup, "", SWT.READ_ONLY);
    topDescriptorField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
            | GridData.GRAB_HORIZONTAL));
    String topDescriptor = null;
    Import imp = aeService.getImportDescriptor();
    if (imp != null) {
      String descr = imp.getLocation();
      if (descr == null) {
        isImportByLocation = false;
        descr = imp.getName();
      } else {
        isImportByLocation = true;
      }
      topDescriptor = descr;     
    }
View Full Code Here


 
  /** ********************************************************************** */

  protected void updateTopDescriptor(String fileFullPath, boolean byLocation) {
    // Import by Location or by Name ?
    Import importDescriptor = null;
    try {
      if (byLocation) {
        // Import by Location
        importDescriptor = createLocationImport(fileFullPath);
      } else {
View Full Code Here

    if (sDescriptorRelativePath.indexOf("file:/") == -1 //$NON-NLS-1$
            && sDescriptorRelativePath.indexOf(":/") > -1) { //$NON-NLS-1$
      sDescriptorRelativePath = "file:/" + sDescriptorRelativePath; //$NON-NLS-1$
    }

    Import imp = new Import_impl();
    // fails on unix? URL url = new URL("file:/" + getDescriptorDirectory());
    // Set relative Path Base
    // a version that might work on all platforms
    URL url = new File(multiPageEditor.cde.getDescriptorDirectory()).toURL();
    ((Import_impl) imp).setSourceUrl(url);

    imp.setLocation(sDescriptorRelativePath);
    return imp;
  }
View Full Code Here

    prefetch.setSelection(aeService.getPrefetch());
    casPoolSize.setSelection(aeDeploymentDescription.getCasPoolSize());
    initialFsHeapSize.setSelection(aeDeploymentDescription.getInitialFsHeapSize());
   
    String topDescriptor = null;
    Import imp = aeService.getImportDescriptor();
    if (imp != null) {
      isImportByLocation = true;
      String descr = imp.getLocation();
      if (descr == null) {
        isImportByLocation = false;
        descr = imp.getName();
      }
      topDescriptor = descr;
      if (isImportByLocation) {
        importByNameOrLocation.setText("Location");
      } else {
View Full Code Here

    topDescriptorField = toolkit.createText(browsingGroup, "", SWT.READ_ONLY);
    topDescriptorField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
            | GridData.GRAB_HORIZONTAL));
    String topDescriptor = null;
    Import imp = aeService.getImportDescriptor();
    if (imp != null) {
      String descr = imp.getLocation();
      if (descr == null) {
        isImportByLocation = false;
        descr = imp.getName();
      } else {
        isImportByLocation = true;
      }
      topDescriptor = descr;     
    }
View Full Code Here

 
  /** ********************************************************************** */

  protected void updateTopDescriptor(String fileFullPath, boolean byLocation) {
    // Import by Location or by Name ?
    Import importDescriptor = null;
    try {
      if (byLocation) {
        // Import by Location
        importDescriptor = createLocationImport(fileFullPath);
      } else {
View Full Code Here

    if (sDescriptorRelativePath.indexOf("file:/") == -1 //$NON-NLS-1$
            && sDescriptorRelativePath.indexOf(":/") > -1) { //$NON-NLS-1$
      sDescriptorRelativePath = "file:/" + sDescriptorRelativePath; //$NON-NLS-1$
    }

    Import imp = new Import_impl();
    // fails on unix? URL url = new URL("file:/" + getDescriptorDirectory());
    // Set relative Path Base
    // a version that might work on all platforms
    URL url = new File(multiPageEditor.cde.getDescriptorDirectory()).toURL();
    ((Import_impl) imp).setSourceUrl(url);

    imp.setLocation(sDescriptorRelativePath);
    return imp;
  }
View Full Code Here

    prefetch.setSelection(aeService.getPrefetch());
    casPoolSize.setSelection(aeDeploymentDescription.getCasPoolSize());
    initialFsHeapSize.setSelection(aeDeploymentDescription.getInitialFsHeapSize());
   
    String topDescriptor = null;
    Import imp = aeService.getImportDescriptor();
    if (imp != null) {
      isImportByLocation = true;
      String descr = imp.getLocation();
      if (descr == null) {
        isImportByLocation = false;
        descr = imp.getName();
      }
      topDescriptor = descr;
      if (isImportByLocation) {
        importByNameOrLocation.setText("Location");
      } else {
View Full Code Here

public class XsltImportByName {
  private static final Class CLASS_NAME = XsltImportByName.class;

  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

    AnalysisEngineDescription desc = UIMAFramework.getResourceSpecifierFactory()
            .createAnalysisEngineDescription();
    desc.setPrimitive(false);

    // import pear specifiers
    Import impPear1 = UIMAFramework.getResourceSpecifierFactory().createImport();
    File import1 = new File(instPear1.getComponentPearDescPath());
    impPear1.setLocation(import1.toURI().getPath());

    // import main pear descriptor
    Import impPear2 = UIMAFramework.getResourceSpecifierFactory().createImport();
    File import2 = new File(instPear2.getComponentPearDescPath());
    impPear2.setLocation(import2.toURI().getPath());

    // add delegates as imports
    Map delegates = desc.getDelegateAnalysisEngineSpecifiersWithImports();
    delegates.put("Pear1", impPear1);
    delegates.put("Pear2", impPear2);
View Full Code Here

TOP

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

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.