Examples of CasConsumerDescription


Examples of org.apache.uima.collection.CasConsumerDescription

                    tsDescription = tae.getAnalysisEngineMetaData().getTypeSystem();
                } else {
                    tsDescription = CasCreationUtils.mergeDelegateAnalysisEngineTypeSystems(tae);
                }               
            } else if (specifier instanceof CasConsumerDescription) {
                CasConsumerDescription ccDescr = (CasConsumerDescription) specifier;
                tsDescription = ccDescr.getCasConsumerMetaData().getTypeSystem();
            } else if (specifier instanceof CollectionReaderDescription) {
                CollectionReaderDescription crDescr = (CollectionReaderDescription) specifier;
                tsDescription = crDescr.getCollectionReaderMetaData().getTypeSystem();
            }
        } catch (ResourceInitializationException e) {
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

                    tsDescription = tae.getAnalysisEngineMetaData().getTypeSystem();
                } else {
                    tsDescription = CasCreationUtils.mergeDelegateAnalysisEngineTypeSystems(tae);
                }               
            } else if (specifier instanceof CasConsumerDescription) {
                CasConsumerDescription ccDescr = (CasConsumerDescription) specifier;
                tsDescription = ccDescr.getCasConsumerMetaData().getTypeSystem();
            } else if (specifier instanceof CollectionReaderDescription) {
                CollectionReaderDescription crDescr = (CollectionReaderDescription) specifier;
                tsDescription = crDescr.getCollectionReaderMetaData().getTypeSystem();
            }
        } catch (ResourceInitializationException e) {
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasConsumerDescriptor()) {
      CasConsumerDescription casCons = (CasConsumerDescription) casConsumerDescription.clone();
      try {
        casCons.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasConsValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasConsValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasConsumerDescriptor()) {
      CasConsumerDescription casCons = (CasConsumerDescription) casConsumerDescription.clone();
      try {
        casCons.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasConsValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasConsValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

      XCASDeserializer.deserialize(xCasStream, cas);
      System.out.println("XCAS deserialized");

      ae.process(cas);
      CasConsumerDescription casConsumerDescription = UIMAFramework.getXMLParser().parseCasConsumerDescription(
        new XMLInputSource(new File(casConsumerDescriptorLocation)));
      CasConsumer casConsumer = UIMAFramework.produceCasConsumer(casConsumerDescription);
      System.out.println("CasConsumer initialized.  Calling processCas....");
      casConsumer.processCas(cas);
      System.out.println("processCas completed....");
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
      resMgr.setDataPath(dataPath);

      if (specifier instanceof CasConsumerDescription) {
        cc = UIMAFramework.produceCasConsumer(specifier);
        CasConsumerDescription ccdesc = (CasConsumerDescription) specifier;
        Capability[] capabilities = ccdesc.getCasConsumerMetaData().getCapabilities();
        for (int i = 0; i < capabilities.length; i++) {
          String[] inputsofas = capabilities[i].getInputSofas();
          if (inputsofas.length > 0)
            requiresTCas = false;
        }
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

        StringWriter writer = new StringWriter();
        aeSpecifier.toXML(writer);

        return writer.toString();
      } else if (specifier instanceof CasConsumerDescription) {
        CasConsumerDescription ccSpecifier = (CasConsumerDescription) specifier;
        ccSpecifier.getCasConsumerMetaData().resolveImports(resMgr);
        StringWriter writer = new StringWriter();
        ccSpecifier.toXML(writer);
        return writer.toString();
      }
    } catch (UnsupportedEncodingException e) {
      logException(e);
    } catch (InvalidXMLException e) {
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

      rm.setDataPath(TEST_DATAPATH);
      rm.setExtensionClassPath(TEST_EXTENSION_CLASSPATH, true);

      // create a UimaContext with Config Params and Resources
      UIMAFramework.getXMLParser().enableSchemaValidation(true);
      CasConsumerDescription ccDesc = UIMAFramework.getXMLParser().parseCasConsumerDescription(
              new XMLInputSource(JUnitExtension
                      .getFile("UimaContextTest/CasConsumerForUimaContextTest.xml")));
      CasConsumer cc = UIMAFramework.produceCasConsumer(ccDesc, rm, null);
      mContext = cc.getUimaContext();
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasConsumerDescriptor()) {
      CasConsumerDescription casCons = (CasConsumerDescription) casConsumerDescription.clone();
      try {
        casCons.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasConsValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasConsValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.apache.uima.collection.CasConsumerDescription

      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
      resMgr.setDataPath(dataPath);

      if (specifier instanceof CasConsumerDescription) {
        cc = UIMAFramework.produceCasConsumer(specifier);
        CasConsumerDescription ccdesc = (CasConsumerDescription) specifier;
        Capability[] capabilities = ccdesc.getCasConsumerMetaData().getCapabilities();
        for (int i = 0; i < capabilities.length; i++) {
          String[] inputsofas = capabilities[i].getInputSofas();
          if (inputsofas.length > 0)
            requiresTCas = false;
        }
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.