Package org.apache.uima.collection

Examples of org.apache.uima.collection.CasInitializerDescription


                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here


                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

      String testDescXml = writer.getBuffer().toString();
      // System.out.println(testDescXml);

      // parse objects from XML (no schema validation)
      InputStream is = new ByteArrayInputStream(testDescXml.getBytes(encoding));
      CasInitializerDescription newDesc = (CasInitializerDescription) UIMAFramework.getXMLParser()
              .parse(new XMLInputSource(is, null));

      // compare
      Assert.assertEquals(mTestDesc, newDesc);
    } catch (Exception e) {
View Full Code Here

      // serialize objects to byte array

      byte[] testDescBytes = SerializationUtils.serialize(mTestDesc);

      // deserialize
      CasInitializerDescription newDesc = (CasInitializerDescription) SerializationUtils
              .deserialize(testDescBytes);

      Assert.assertEquals(mTestDesc, newDesc);
    } catch (Exception e) {
      JUnitExtension.handleException(e);
View Full Code Here

   *      org.apache.uima.resource.ResourceSpecifier, java.util.Map)
   */
  public Resource produceResource(Class<? extends Resource> aResourceClass, ResourceSpecifier aSpecifier,
          Map<String, Object> aAdditionalParams) throws ResourceInitializationException {
    if (aSpecifier instanceof CasInitializerDescription) {
      CasInitializerDescription desc = (CasInitializerDescription) aSpecifier;
      String className = desc.getImplementationName();

      // load class using UIMA Extension ClassLoader if there is one
      ClassLoader cl = null;
      ResourceManager resourceManager = null;
      if (aAdditionalParams != null) {
View Full Code Here

                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

                        Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
                        MessageDialog.ERROR);
        return false;
      }
    } else if (isCasInitializerDescriptor()) {
      CasInitializerDescription casInit = (CasInitializerDescription) casInitializerDescription
              .clone();
      try {
        casInit.doFullValidation(createResourceManager());
      } catch (Throwable e) {
        Utility
                .popMessage(
                        Messages.getString("MultiPageEditor.failedCasInitValidation"), //$NON-NLS-1$
                        Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

TOP

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

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.