Examples of TaeError


Examples of org.apache.uima.caseditor.core.TaeError

    else if (CLOSE_BUTTON == buttonID) {
      close();
      return;
    }
    else {
      throw new TaeError("Unkown button!");
    }
   
    updateAnnotationButtons();
  }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

      }
      else if (!type.isArray()) {
        fs = document.getCAS().createFS(type);
      }
      else {
        throw new TaeError("Unexpected error!");
      }
     
      return fs;
    }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

      try {
        resourceManager.setExtensionClassPath(resourceBasePath.getLocation().toOSString(), true);
        resourceManager.setDataPath(resourceBasePath.getLocation().toOSString());
      } catch (MalformedURLException e) {
        // this should never happen
        throw new TaeError("Unexpected exception", e);
      }
    }

    try {
      CasConsumer consumer =
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

    if (mResourceBasePath.getLocation() != null) {
      try {
        resourceManager.setDataPath(mResourceBasePath.getLocation().toOSString());
      } catch (MalformedURLException e) {
        // this will not happen
        throw new TaeError("Unexpexted exceptioon", e);
      }
    }

    return UIMAFramework.produceAnalysisEngine(mDescriptor, resourceManager, null);
  }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

      try {
        typeSystemDesciptor = (TypeSystemDescription) xmlParser
                .parse(xmlTypeSystemSource);
      } catch (InvalidXMLException e1) {
        throw new TaeError("Integrated ts.xml typesystem descriptor is not valid!");
      }

      try {
        return CasCreationUtils.createCas(typeSystemDesciptor,
                    null, null);
      } catch (ResourceInitializationException e) {

        // should not happen
        throw new TaeError("Unexpected exception!");
      }
  }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

    if (DocumentFormat.XCAS.equals(format)) {
      try {
        XCASSerializer.serialize(cas, out);
      } catch (SAXException e) {
        // should not happen
        throw new TaeError("Unexpected exception!", e);
      } catch (IOException e) {
        // will not happen, writing to memory
        throw new TaeError("Unexpected exception!", e);
      }
    }
    else if (DocumentFormat.XMI.equals(format)) {
      try {
      XmiCasSerializer.serialize(cas, out);
    } catch (SAXException e) {
      // should not happen
      throw new TaeError("Unexpected exception!", e);
    }
    }
    else {
      throw new TaeError("Unkown document type!", null);
    }

    return new ByteArrayInputStream(out.toByteArray());
  }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

    }
    else if (CLOSE_BUTTON == buttonID) {
      close();
    }
    else {
      throw new TaeError("Unkown button!");
    }
   
    updateAnnotationButtons();
  }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

      }
      else if (!type.isArray()) {
        fs = document.getCAS().createFS(type);
      }
      else {
        throw new TaeError("Unexpected error!");
      }
     
      return fs;
    }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

      try {
        typeSystemDesciptor = (TypeSystemDescription) xmlParser
                .parse(xmlTypeSystemSource);
      } catch (InvalidXMLException e1) {
        throw new TaeError("Integrated ts.xml typesystem descriptor is not valid!");
      }

      try {
        return CasCreationUtils.createCas(typeSystemDesciptor,
                    null, null);
      } catch (ResourceInitializationException e) {

        // should not happen
        throw new TaeError("Unexpected exception!");
      }
  }
View Full Code Here

Examples of org.apache.uima.caseditor.core.TaeError

    if (DocumentFormat.XCAS.equals(format)) {
      try {
        XCASSerializer.serialize(cas, out);
      } catch (SAXException e) {
        // should not happen
        throw new TaeError("Unexpected exception!", e);
      } catch (IOException e) {
        // will not happen, writing to memory
        throw new TaeError("Unexpected exception!", e);
      }
    }
    else if (DocumentFormat.XMI.equals(format)) {
      try {
        XmiCasSerializer.serialize(cas, out);
      } catch (SAXException e) {
        // should not happen
        throw new TaeError("Unexpected exception!", e);
      }
    } else {
      throw new TaeError("Unkown document type!", null);
    }

    return new ByteArrayInputStream(out.toByteArray());
  }
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.