Package org.apache.uima.collection

Examples of org.apache.uima.collection.CasInitializer


        // 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


        .getFile("CollectionProcessingEngineImplTest/externalResourceTestCpe.xml")));
      CollectionProcessingEngine cpe = UIMAFramework.produceCollectionProcessingEngine(cpeDesc, rm,
    null);
      CollectionReader colRdr = (CollectionReader) cpe.getCollectionReader();
      assertNotNull(colRdr.getUimaContext().getResourceObject("TestFileResource"));
      CasInitializer casIni = colRdr.getCasInitializer();
      assertNotNull(casIni.getUimaContext().getResourceObject("TestFileLanguageResource",
    new String[] { "en" }));
      AnalysisEngine ae = (AnalysisEngine) cpe.getCasProcessors()[0];
      assertNotNull(ae.getUimaContext().getResourceObject("TestResourceObject"));
      assertNotNull(ae.getUimaContext().getResourceObject("TestLanguageResourceObject",
    new String[] { "en" }));
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

        // 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

    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

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.