Examples of AnnotatorContextException


Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

      // custom resource object (should return null)
      InputStream strm2 = mAC3.getResourceAsStream("TestResourceObject");
      Assert.assertNull(strm2);

      // parameterized resources (should fail)
      AnnotatorContextException ex = null;
      try {
        mAC3.getResourceAsStream("TestFileLanguageResource");
      } catch (AnnotatorContextException e) {
        ex = e;
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

      Assert.assertNotNull(r4);
      Assert.assertTrue(r4 instanceof TestResourceInterface);
      Assert.assertFalse(r4.equals(r3));

      // parameter values for which no resource exists (should fail)
      AnnotatorContextException ex = null;
      try {
        mAC3.getResourceObject("TestFileLanguageResource", new String[] { "zh" });
      } catch (AnnotatorContextException e) {
        ex = e;
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

      InputStream strm3 = mAC3.getResourceAsStream("TestLanguageResourceObject",
              new String[] { "en" });
      Assert.assertNull(strm3);

      // parameter values for which no resource exists (should fail)
      AnnotatorContextException ex = null;
      try {
        mAC3.getResourceAsStream("TestFileLanguageResource", new String[] { "zh" });
      } catch (AnnotatorContextException e) {
        ex = e;
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

      // custom object (should return null)
      URL url3 = mAC3.getResourceURL("TestLanguageResourceObject", new String[] { "en" });
      Assert.assertNull(url3);

      // parameter values for which no resource exists (should fail)
      AnnotatorContextException ex = null;
      try {
        mAC3.getResourceURL("TestFileLanguageResource", new String[] { "zh" });
      } catch (AnnotatorContextException e) {
        ex = e;
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

      // custom object (should return null)
      URI uri3 = mAC3.getResourceURI("TestLanguageResourceObject", new String[] { "en" });
      Assert.assertNull(uri3);

      // parameter values for which no resource exists (should fail)
      AnnotatorContextException ex = null;
      try {
        mAC3.getResourceURI("TestFileLanguageResource", new String[] { "zh" });
      } catch (AnnotatorContextException e) {
        ex = e;
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

      // custom object (should return null)
      String path3 = mAC3.getResourceFilePath("TestLanguageResourceObject", new String[] { "en" });
      Assert.assertNull(path3);

      // parameter values for which no resource exists (should fail)
      AnnotatorContextException ex = null;
      try {
        mAC3.getResourceFilePath("TestFileLanguageResource", new String[] { "zh" });
      } catch (AnnotatorContextException e) {
        ex = e;
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

   */
  public URL getResourceURL(String aKey) throws AnnotatorContextException {
    try {
      return mUimaContext.getResourceURL(aKey);
    } catch (ResourceAccessException e) {
      throw new AnnotatorContextException(e);
    }
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

   */
  public URI getResourceURI(String aKey) throws AnnotatorContextException {
    try {
      return mUimaContext.getResourceURI(aKey);
    } catch (ResourceAccessException e) {
      throw new AnnotatorContextException(e);
    }
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

   */
  public String getResourceFilePath(String aKey) throws AnnotatorContextException {
    try {
      return mUimaContext.getResourceFilePath(aKey);
    } catch (ResourceAccessException e) {
      throw new AnnotatorContextException(e);
    }
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.annotator.AnnotatorContextException

   */
  public InputStream getResourceAsStream(String aKey) throws AnnotatorContextException {
    try {
      return mUimaContext.getResourceAsStream(aKey);
    } catch (ResourceAccessException e) {
      throw new AnnotatorContextException(e);
    }
  }
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.