Package org.apache.uima.resource

Examples of org.apache.uima.resource.Resource.destroy()


        if (resource != null) {
          ResourceMetaData metadata = resource.getMetaData();
          if (metadata instanceof ProcessingResourceMetaData) {
            mdList.add(metadata);
          }
          resource.destroy();
        }
      } else {
        throw new ResourceInitializationException(
            ResourceInitializationException.UNSUPPORTED_OBJECT_TYPE_IN_CREATE_CAS,
            new Object[] { current.getClass().getName() });
View Full Code Here


   */
  public synchronized void destroy() {
    Iterator i = mAllInstances.iterator();
    while (i.hasNext()) {
      Resource current = (Resource) i.next();
      current.destroy();
    }
    mAllInstances.clear();
    mFreeInstances.clear();
  }

View Full Code Here

    // destroy component AnalysisEngines
    Iterator i = mComponentAnalysisEngineMap.entrySet().iterator();
    while (i.hasNext()) {
      Map.Entry entry = (Map.Entry) i.next();
      Resource delegate = (Resource) entry.getValue();
      delegate.destroy();
    }
    if (mFlowControllerContainer != null) {
      mFlowControllerContainer.destroy();
    }
  }
View Full Code Here

                Collections.EMPTY_MAP);
        ResourceMetaData metadata = resource.getMetaData();
        if (metadata instanceof ProcessingResourceMetaData) {
          mdList.add(metadata);
        }
        resource.destroy();
      } else {
        throw new ResourceInitializationException(
                ResourceInitializationException.UNSUPPORTED_OBJECT_TYPE_IN_CREATE_CAS,
                new Object[] { current.getClass().getName() });
      }
View Full Code Here

    //   unsuccessful initializations are not put into the Map
    Iterator<Map.Entry<String, AnalysisEngine>> i = mComponentAnalysisEngineMap.entrySet().iterator();
    while (i.hasNext()) {
      Map.Entry<String, AnalysisEngine> entry = i.next();
      Resource delegate = entry.getValue();
      delegate.destroy();
    }
   
    if (mFlowControllerContainer != null &&
        // the container might be non-null, but the initialization could have failed
        mFlowControllerContainer.isInitialized()) {
View Full Code Here

        if (resource != null) {
          if (metadata instanceof ProcessingResourceMetaData) {
            mdList.add((ProcessingResourceMetaData) metadata);
          }
          resource.destroy();
        }
      } else {
        throw new ResourceInitializationException(
            ResourceInitializationException.UNSUPPORTED_OBJECT_TYPE_IN_CREATE_CAS,
            new Object[] { current.getClass().getName() });
View Full Code Here

   */
  public synchronized void destroy() {
    Iterator i = mAllInstances.iterator();
    while (i.hasNext()) {
      Resource current = (Resource) i.next();
      current.destroy();
    }
    mAllInstances.clear();
    mFreeInstances.clear();
  }

View Full Code Here

    // destroy component AnalysisEngines
    Iterator i = mComponentAnalysisEngineMap.entrySet().iterator();
    while (i.hasNext()) {
      Map.Entry entry = (Map.Entry) i.next();
      Resource delegate = (Resource) entry.getValue();
      delegate.destroy();
    }
    if (mFlowControllerContainer != null) {
      mFlowControllerContainer.destroy();
    }
  }
View Full Code Here

        if (resource != null) {
          ResourceMetaData metadata = resource.getMetaData();
          if (metadata instanceof ProcessingResourceMetaData) {
            mdList.add(metadata);
          }
          resource.destroy();
        }
      } else {
        throw new ResourceInitializationException(
            ResourceInitializationException.UNSUPPORTED_OBJECT_TYPE_IN_CREATE_CAS,
            new Object[] { current.getClass().getName() });
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.