Package org.apache.uima.collection

Examples of org.apache.uima.collection.CasInitializer


    {
        xmlIn = new XMLInputSource(this.pkgBrowser.getInstallationDescriptor()
                .getMainComponentDesc());
        ResourceSpecifier ciSpecifier = UIMAFramework.getXMLParser().parseResourceSpecifier(xmlIn);
       
        CasInitializer ci = UIMAFramework.produceCasInitializer(ciSpecifier,
                getResourceManager(this.pkgBrowser), null);
        // create Test status object
        TestStatus status = new TestStatus();
   
        if (ci != null) {
View Full Code Here


    {
        xmlIn = new XMLInputSource(this.pkgBrowser.getInstallationDescriptor()
                .getMainComponentDesc());
        ResourceSpecifier ciSpecifier = UIMAFramework.getXMLParser().parseResourceSpecifier(xmlIn);
       
        CasInitializer ci = UIMAFramework.produceCasInitializer(ciSpecifier,
                getResourceManager(this.pkgBrowser), null);
        // create Test status object
        TestStatus status = new TestStatus();
   
        if (ci != null) {
View Full Code Here

    {
        xmlIn = new XMLInputSource(this.pkgBrowser.getInstallationDescriptor()
                .getMainComponentDesc());
        ResourceSpecifier ciSpecifier = UIMAFramework.getXMLParser().parseResourceSpecifier(xmlIn);
       
        CasInitializer ci = UIMAFramework.produceCasInitializer(ciSpecifier,
                getResourceManager(this.pkgBrowser), null);
        // create Test status object
        TestStatus status = new TestStatus();
   
        if (ci != null) {
View Full Code Here

    ProcessingResourceMetaData crMetaData = collectionReader.getProcessingResourceMetaData();
    if (crMetaData != null) {
      manager.addMetaData(crMetaData);
    }
    if (collectionReader instanceof CollectionReader) {
      CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();
      if (casIni != null && casIni.getProcessingResourceMetaData() != null) {
        manager.addMetaData(casIni.getProcessingResourceMetaData());
      }
    } else if (collectionReader instanceof CasDataCollectionReader) {
      CasDataInitializer casIni = ((CasDataCollectionReader) collectionReader)
              .getCasDataInitializer();
      if (casIni != null && casIni.getCasInitializerMetaData() != null) {
        manager.addMetaData(casIni.getCasInitializerMetaData());
      }
    }
    for (int i = 0; i < annotatorList.size(); i++) {
      ProcessingContainer container = (ProcessingContainer) annotatorList.get(i);
      if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {
View Full Code Here

    try {
      if (collectionReader instanceof CollectionReader) {
        ((CollectionReader) collectionReader).typeSystemInit(cas.getTypeSystem());

        CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();
        if (casIni != null) {
          casIni.typeSystemInit(cas.getTypeSystem());
        }
      }

      for (int i = 0; i < annotatorList.size(); i++) {
        ProcessingContainer container = (ProcessingContainer) annotatorList.get(i);
View Full Code Here

  private boolean needsView() {
    if (definedCapabilities == null) {
      // If Collection Reader and CAS Initilaizer do not declare any output SofAs,
      // must be sent the default view (meaning whatever's mapped to _InitialView)
      // for backward compatiblity
      CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();
      if (casIni != null) {
        definedCapabilities = casIni.getProcessingResourceMetaData().getCapabilities();
      } else {
        definedCapabilities = ((CollectionReader) collectionReader).getProcessingResourceMetaData()
                .getCapabilities();
      }
View Full Code Here

        // If Collection Reader and CAS Initilaizer do not declare any
        // output SofAs, must be passed the default view (meaning whatever's
        //mapped to _InitialView) for backward compatiblity
        Capability[] capabilities;
        CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();
        if (casIni != null)
          capabilities = casIni.getProcessingResourceMetaData().getCapabilities();
        else
          capabilities = ((CollectionReader) collectionReader).getProcessingResourceMetaData()
                  .getCapabilities();

        boolean sofaUnaware = true;
View Full Code Here

    String filename = currentFile.getName();
    FileInputStream fileInputStream = new FileInputStream(currentFile);
    InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);
    BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
   
    CasInitializer casInitializer = getCasInitializer();

    if (casInitializer != null)
    {
      casInitializer.initializeCas(bufferedReader, jCas.getCas())
    }
    else  //No CAS Initializer, so read file and set document text ourselves
    {      
      try
      {
View Full Code Here

        // If Collection Reader and CAS Initilaizer do not declare any
        // output SofAs, must be passed the default view (meaning whatever's
        //mapped to _InitialView) for backward compatiblity
        Capability[] capabilities;
        CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();
        if (casIni != null)
          capabilities = casIni.getProcessingResourceMetaData().getCapabilities();
        else
          capabilities = ((CollectionReader) collectionReader).getProcessingResourceMetaData()
                  .getCapabilities();

        boolean sofaUnaware = true;
View Full Code Here

    ProcessingResourceMetaData crMetaData = collectionReader.getProcessingResourceMetaData();
    if (crMetaData != null) {
      manager.addMetaData(crMetaData);
    }
    if (collectionReader instanceof CollectionReader) {
      CasInitializer casIni = ((CollectionReader) collectionReader).getCasInitializer();
      if (casIni != null && casIni.getProcessingResourceMetaData() != null) {
        manager.addMetaData(casIni.getProcessingResourceMetaData());
      }
    } else if (collectionReader instanceof CasDataCollectionReader) {
      CasDataInitializer casIni = ((CasDataCollectionReader) collectionReader)
              .getCasDataInitializer();
      if (casIni != null && casIni.getCasInitializerMetaData() != null) {
        manager.addMetaData(casIni.getCasInitializerMetaData());
      }
    }
    for (int i = 0; i < annotatorList.size(); i++) {
      ProcessingContainer container = (ProcessingContainer) annotatorList.get(i);
      if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {
View Full Code Here

TOP

Related Classes of org.apache.uima.collection.CasInitializer

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.