Package org.apache.uima

Examples of org.apache.uima.UIMARuntimeException


          resultList.add(new NameClassPair(propName, propClass.getName()));
        }
      }
      return resultList;
    } catch (IntrospectionException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here


          }
        }
      }
      return null;
    } catch (Exception e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

          return Class.forName(ncp.getClassName());
        }
      }
      return null;
    } catch (Exception e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

        }
      }
    } catch (UIMA_IllegalArgumentException e) {
      throw e;
    } catch (Exception e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

    try {
      // do the default cloning
      clone = (MetaDataObject_impl) super.clone();
    } catch (CloneNotSupportedException e) {
      // assert false : "All MetaDataObjects are Cloneable";
      throw new UIMARuntimeException(e);
    }

    // now clone all values that are MetaDataObjects
    List attrs = listAttributes();
    Iterator i = attrs.iterator();
View Full Code Here

   * @see org.apache.uima.resource.CasManager#getCAS(org.apache.uima.analysis_engine.AnalysisEngine)
   */
  public CAS getCas(String aRequestorContextName) {
    CasPool pool = (CasPool) mRequestorToCasPoolMap.get(aRequestorContextName);
    if (pool == null) {
      throw new UIMARuntimeException(UIMARuntimeException.REQUESTED_TOO_MANY_CAS_INSTANCES,
              new Object[] { aRequestorContextName, "1", "0" });
    }
    return pool.getCas(0);
  }
View Full Code Here

   */
  public void releaseCas(AbstractCas aCAS) {
    CasPool pool = (CasPool) mCasToCasPoolMap.get(aCAS);
    if (pool == null) {
      // CAS doesn't belong to this CasManager!
      throw new UIMARuntimeException(UIMARuntimeException.CAS_RELEASED_TO_WRONG_CAS_MANAGER,
              new Object[0]);
    } else {
      //see if we have a UimaContext that we can notify that CAS was release
      UimaContextAdmin uc = (UimaContextAdmin)mCasToUimaContextMap.get(aCAS);
      if (uc != null) {
View Full Code Here

        mRequestorToCasPoolMap.put(aRequestorContextName, pool);
        //register with JMX
        registerCasPoolMBean(aRequestorContextName, pool);

      } else {
        throw new UIMARuntimeException(UIMARuntimeException.DEFINE_CAS_POOL_CALLED_TWICE,
                new Object[] { aRequestorContextName });
      }
    }
  } 
View Full Code Here

      return cas;
    } else if (requiredInterface == JCas.class) {
      try {
        return cas.getJCas();
      } catch (CASException e) {
        throw new UIMARuntimeException(e);
      }
    } else if (requiredInterface.isInstance(cas)) // covers AbstractCas
    {
      return cas;
    }
    {
      throw new UIMARuntimeException(UIMARuntimeException.UNSUPPORTED_CAS_INTERFACE,
              new Object[] { requiredInterface });
    }
  }
View Full Code Here

      Constructor constructor = cpmClass.getConstructor(new Class[] { ResourceManager.class });
      return (CollectionProcessingManager) constructor
              .newInstance(new Object[] { aResourceManager });

    } catch (InvocationTargetException e) {
      throw new UIMARuntimeException(e.getTargetException());
    } catch (Exception e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.UIMARuntimeException

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.