本文整理汇总了Java中org.apache.uima.resource.ResourceProcessException类的典型用法代码示例。如果您正苦于以下问题:Java ResourceProcessException类的具体用法?Java ResourceProcessException怎么用?Java ResourceProcessException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceProcessException类属于org.apache.uima.resource包,在下文中一共展示了ResourceProcessException类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testRunReaderBadTypeSystem
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
@Test(expected = ResourceProcessException.class)
public void testRunReaderBadTypeSystem() throws Exception {
XmiFileCollectionReader reader = new XmiFileCollectionReader(xmiTestBadCorpus, false);
assertNotNull(reader);
DoNothingListener listener = new DoNothingListener();
MockClient client = new MockClient();
assertNotNull(client);
assertNotNull(listener);
//Add the type system
client.getEngine().setAnalysisEngineFromDescription(
simpleServiceDefinition(
new LeoTypeSystemDescription(new File(xmiTestBadCorpus, "type-system.xml").getAbsolutePath(), false)
)
);
//Run the client
client.run(reader, listener);
}
开发者ID:department-of-veterans-affairs,项目名称:Leo,代码行数:20,代码来源:XmiFileCollectionReaderTest.java
示例2: processCas
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
/**
* process
*/
public void processCas(CAS aCAS) throws ResourceProcessException {
JCas jcas;
try {
jcas = aCAS.getJCas();
} catch (CASException e) {
throw new ResourceProcessException(e);
}
printTimexAnnotations(jcas);
}
开发者ID:HeidelTime,项目名称:heideltime,代码行数:15,代码来源:Tempeval2Writer.java
示例3: processCas
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
/**
* process
*/
public void processCas(CAS aCAS) throws ResourceProcessException {
JCas jcas;
try {
jcas = aCAS.getJCas();
} catch (CASException e) {
throw new ResourceProcessException(e);
}
printTimexAnnotationsInline(jcas);
}
开发者ID:HeidelTime,项目名称:heideltime,代码行数:15,代码来源:ACETernWriter.java
示例4: process
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
public synchronized void process() throws ResourceProcessException {
try {
List listeners = this.getListeners();
while (collectionReader.hasNext()) {
CAS cas = ae.newCAS();
collectionReader.getNext(cas);
sendCAS(cas);
}
this.collectionProcessingComplete();
} catch (Exception e) {
throw new ResourceProcessException(e);
}
}
开发者ID:department-of-veterans-affairs,项目名称:Leo,代码行数:14,代码来源:MockClient.java
示例5: sendCAS
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
public synchronized String sendCAS(CAS aCAS) throws ResourceProcessException {
List listeners = this.getListeners();
ae.process(aCAS);
for (int i = 0; listeners != null && i < listeners.size(); i++) {
UimaAsBaseCallbackListener listener = (UimaAsBaseCallbackListener) listeners.get(i);
listener.onBeforeMessageSend(new MockUimaASProcessStatus());
listener.entityProcessComplete(aCAS, null);
}
return UUID.randomUUID().toString();
}
开发者ID:department-of-veterans-affairs,项目名称:Leo,代码行数:11,代码来源:MockClient.java
示例6: collectionProcessingComplete
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
public synchronized void collectionProcessingComplete() throws ResourceProcessException {
List listeners = this.getListeners();
for (int i = 0; listeners != null && i < listeners.size(); i++) {
UimaAsBaseCallbackListener listener = (UimaAsBaseCallbackListener) listeners.get(i);
listener.collectionProcessComplete(null);
}
}
开发者ID:department-of-veterans-affairs,项目名称:Leo,代码行数:8,代码来源:MockClient.java
示例7: process
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
@Override
public void process(CAS aCAS) throws AnalysisEngineProcessException {
try {
processCas(aCAS);
} catch (ResourceProcessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者ID:oaqa,项目名称:bagpipes-old,代码行数:11,代码来源:AnnotationPrinter.java
示例8: collectionProcessComplete
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
/**
* Called if the processing is finished,
*/
public void collectionProcessComplete(ProcessTrace trace)
throws ResourceProcessException, IOException {
}
开发者ID:nicolashernandez,项目名称:dev-star,代码行数:8,代码来源:ViewWriterCC.java
示例9: collectionProcessComplete
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
/**
* Called when the entire collection is completed.
*
* @param aTrace
* ProcessTrace object that will log events in this method.
* @throws ResourceProcessException
* if there is an error in processing the Resource
* @throws IOException
* if there is an IO Error
* @see org.apache.uima.collection.CasConsumer#collectionProcessComplete(ProcessTrace)
*/
public void collectionProcessComplete(ProcessTrace aTrace) throws ResourceProcessException,
IOException {
if (fileWriter != null) {
fileWriter.close();
}
}
开发者ID:oaqa,项目名称:bagpipes-old,代码行数:18,代码来源:AnnotationPrinter.java
示例10: batchProcessComplete
import org.apache.uima.resource.ResourceProcessException; //导入依赖的package包/类
/**
* Called when a batch of processing is completed.
*
* @param aTrace
* ProcessTrace object that will log events in this method.
* @throws ResourceProcessException
* if there is an error in processing the Resource
* @throws IOException
* if there is an IO Error
*
* @see org.apache.uima.collection.CasConsumer#batchProcessComplete(ProcessTrace)
*/
public void batchProcessComplete(ProcessTrace aTrace) throws ResourceProcessException,
IOException {
// nothing to do in this case as AnnotationPrinter doesnot do
// anything cumulatively
}
开发者ID:oaqa,项目名称:bagpipes-old,代码行数:18,代码来源:AnnotationPrinter.java
注:本文中的org.apache.uima.resource.ResourceProcessException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论