Package org.apache.uima.resource.metadata

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


      fileName = fileName.substring(i + 1);
    if (fileName.charAt(0) == '.')
      fileName = fileName.substring(1);
    int partStart = 0;

    Import imp = UIMAFramework.getResourceSpecifierFactory().createImport();
    ResourceManager rm = editor.createResourceManager();

    for (;;) {
      imp.setName(fileName.substring(partStart));
      try {
        imp.findAbsoluteUrl(rm);
      } catch (InvalidXMLException e) {
        partStart = fileName.indexOf('.', partStart) + 1;
        if (0 == partStart)
          return imp; // not found -outer code will catch error later
        continue;
View Full Code Here


    if (null == item) {
      return;
    }

    String thisKey = item.getText(1);
    Import imp = (Import) getDelegateAnalysisEngineSpecifiersWithImports().get(thisKey);

    bDisableToolTipHelp = true;
    requestPopUpOverImport(imp, filesTable, event);
    bDisableToolTipHelp = false;
  }
View Full Code Here

    filesTable.setToolTipText(sDesc);
  }

  private boolean addDelegate(String fileName, String shortName, String keyName,
          boolean isImportByName) {
    Import imp;
    Map delegatesWithImport = getDelegateAnalysisEngineSpecifiersWithImports();

    // if the delegate is not a remote, read / parse it and add ae to
    // the delegate hash map
    // -- also add the import
View Full Code Here

   *
   * @param fileName
   * @param keyName
   */
  private void addFile(Object o, String keyName) {
    Import impItem = (Import) o;
    String fileName = impItem.getLocation();
    if (null == fileName || (0 == fileName.length()))
      fileName = impItem.getName();
    // create new TableItem
    TableItem item = new TableItem(filesTable, SWT.NONE);
    item.setImage(TAEConfiguratorPlugin.getImage(TAEConfiguratorPlugin.IMAGE_ANNOTATOR));
    item.setText(0, fileName);
    item.setText(1, keyName);
View Full Code Here

              "Use Source tab below to specify a key name " +
              "in the <flowController> element, or the imported <flowController>");
    } else
      keyName = fcd.getKey();
    flowControllerKeyGUI.setText(keyName);
    Import fcdImport = fcd.getImport();
    String fileName = null;
    if (null != fcdImport) {
      fileName = fcdImport.getLocation();
      if (null == fileName || (0 == fileName.length()))
        fileName = fcdImport.getName();
    }
    flowControllerGUI.setText(null == fileName ?
            "Warning: no <import> in <flowController>" : fileName);
    flowControllerChoice.setText(USER_DEFINED_FLOW);
    // must follow label updates
View Full Code Here

    }
    flowControllerGUI.setToolTipText(sDesc);
  }

  private void handleContextMenuRequest(Event event) {
    Import imp = getFlowControllerDeclaration().getImport();

    bDisableToolTipHelp = true;
    requestPopUpOverImport(imp, flowControllerGUI, event);
    bDisableToolTipHelp = false;
  }
View Full Code Here

    }
  }

  private void produceKeyAddFlowController(String shortName, String fullPathFileName,
          boolean isImportByName) {
    Import imp = createImport(fullPathFileName, isImportByName);

    // key is shortName plus a suffix if needed to make it unique.
    // The set of existing keys is obtained from the model,
    // not from the GUI table (as was the case in earlier design)
    FlowControllerDeclaration oldFcd = getFlowControllerDeclaration();
View Full Code Here

   */
  public static TypeSystemDescription createTypeSystemDescription(String... descriptorNames) {
    TypeSystemDescription typeSystem = new TypeSystemDescription_impl();
    List<Import> imports = new ArrayList<Import>();
    for (String descriptorName : descriptorNames) {
      Import imp = new Import_impl();
      imp.setName(descriptorName);
      imports.add(imp);
    }
    Import[] importArray = new Import[imports.size()];
    typeSystem.setImports(imports.toArray(importArray));
    return typeSystem;
View Full Code Here

   */
  public static TypeSystemDescription createTypeSystemDescriptionFromPath(String... descriptorURIs) {
    TypeSystemDescription typeSystem = new TypeSystemDescription_impl();
    List<Import> imports = new ArrayList<Import>();
    for (String descriptorURI : descriptorURIs) {
      Import imp = new Import_impl();
      imp.setLocation(descriptorURI);
      imports.add(imp);
    }
    Import[] importArray = new Import[imports.size()];
    typeSystem.setImports(imports.toArray(importArray));
    return typeSystem;
View Full Code Here

   * @return a {@link FsIndexCollection} that includes the indexes from all of the specified files.
   */
  public static FsIndexCollection createFsIndexCollection(String... descriptorNames) {
    List<Import> imports = new ArrayList<Import>();
    for (String descriptorName : descriptorNames) {
      Import imp = new Import_impl();
      imp.setName(descriptorName);
      imports.add(imp);
    }
    Import[] importArray = new Import[imports.size()];

    FsIndexCollection fsIndexCollection = new FsIndexCollection_impl();
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.