Examples of FsIndexCollection


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

      return null;
    }
  }

  protected FsIndexCollection getFsIndexCollection() {
    FsIndexCollection fsic = getAnalysisEngineMetaData().getFsIndexCollection();
    if (null == fsic)
      getAnalysisEngineMetaData().setFsIndexCollection(
              fsic = UIMAFramework.getResourceSpecifierFactory().createFsIndexCollection());
    return fsic;
  }
View Full Code Here

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

  /**
   * used when hovering
   */
  protected String getDescriptionFromImport(String source) throws InvalidXMLException, IOException {
    FsIndexCollection parsedImportItem = UIMAFramework.getXMLParser().parseFsIndexCollection(
            new XMLInputSource(source));
    return parsedImportItem.getDescription();
  }
View Full Code Here

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

  }

  // indexes are checked and merged when the CAS is built
  protected boolean isValidImport(String title, String message) {

    FsIndexCollection savedIC = editor.getMergedFsIndexCollection();
    if (null != savedIC)
      savedIC = (FsIndexCollection) savedIC.clone();
    CAS savedCAS = editor.getCurrentView();
    try {
      editor.setMergedFsIndexCollection();
      editor.descriptorCAS.validate();
    } catch (ResourceInitializationException e) {
View Full Code Here

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

    }

    // merge TypePriorities and FsIndexes
    TypePriorities aggTypePriorities = CasCreationUtils.mergeTypePriorities(typePrioritiesList,
            aResourceManager);
    FsIndexCollection aggIndexColl = CasCreationUtils.mergeFsIndexes(fsIndexes, aResourceManager);
    TypeSystemDescription aggTypeDesc = CasCreationUtils.mergeTypeSystems(typeSystems,
            aResourceManager);

    this.typeSystemDescription = aggTypeDesc;
    this.typePriorities = aggTypePriorities;
    this.fsIndexDescriptions = aggIndexColl.getFsIndexes();
    this.resourceManager = aResourceManager;
  }
View Full Code Here

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

   */
  public ProcessingResourceMetaData getProcessingResourceMetaData() {
    ProcessingResourceMetaData md = UIMAFramework.getResourceSpecifierFactory().createProcessingResourceMetaData();
    md.setTypeSystem(getTypeSystemDescription());
    md.setTypePriorities(getTypePriorities());
    FsIndexCollection indColl = UIMAFramework.getResourceSpecifierFactory().createFsIndexCollection();
    indColl.setFsIndexes(getFsIndexDescriptions());
    md.setFsIndexCollection(indColl);
    return md;
  }
View Full Code Here

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

  public static AnalysisEngineDescription createEngineDescription(
          Class<? extends AnalysisComponent> componentClass, Object... configurationData)
          throws ResourceInitializationException {
    TypeSystemDescription typeSystem = createTypeSystemDescription();
    TypePriorities typePriorities = createTypePriorities();
    FsIndexCollection fsIndexCollection = createFsIndexCollection();

    return createEngineDescription(componentClass, typeSystem, typePriorities, fsIndexCollection,
            (Capability[]) null, configurationData);
  }
View Full Code Here

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

    List<FsIndexCollection> fsIndexes = new ArrayList<FsIndexCollection>();
    if (indexes != null) {
      fsIndexes.add(indexes);
    }
    fsIndexes.add(FsIndexFactory.createFsIndexCollection(componentClass));
    FsIndexCollection aggIndexColl = CasCreationUtils.mergeFsIndexes(fsIndexes,
            UIMAFramework.newDefaultResourceManager());
    desc.getAnalysisEngineMetaData().setFsIndexCollection(aggIndexColl);

    // set capabilities from the argument to this call or from the annotation present in the
    // component if the argument is null
View Full Code Here

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

      imp.setName(descriptorName);
      imports.add(imp);
    }
    Import[] importArray = new Import[imports.size()];

    FsIndexCollection fsIndexCollection = new FsIndexCollection_impl();
    fsIndexCollection.setImports(imports.toArray(importArray));
    return fsIndexCollection;
  }
View Full Code Here

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

      imp.setLocation(descriptorURI);
      imports.add(imp);
    }
    Import[] importArray = new Import[imports.size()];

    FsIndexCollection fsIndexCollection = new FsIndexCollection_impl();
    fsIndexCollection.setImports(imports.toArray(importArray));
    return fsIndexCollection;
  }
View Full Code Here

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

  public static FsIndexCollection createFsIndexCollection() throws ResourceInitializationException {
    List<FsIndexDescription> fsIndexList = new ArrayList<FsIndexDescription>();
    for (String location : scanIndexDescriptors()) {
      try {
        XMLInputSource xmlInput = new XMLInputSource(location);
        FsIndexCollection fsIdxCol = getXMLParser().parseFsIndexCollection(xmlInput);
        fsIdxCol.resolveImports();
        fsIndexList.addAll(asList(fsIdxCol.getFsIndexes()));
        LogFactory.getLog(FsIndexFactory.class).debug("Detected index at [" + location + "]");
      } catch (IOException e) {
        throw new ResourceInitializationException(e);
      } catch (InvalidXMLException e) {
        LogFactory.getLog(FsIndexFactory.class).warn(
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.