本文整理汇总了Java中org.apache.uima.util.Progress类的典型用法代码示例。如果您正苦于以下问题:Java Progress类的具体用法?Java Progress怎么用?Java Progress使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Progress类属于org.apache.uima.util包,在下文中一共展示了Progress类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Test
public void test() throws Exception {
FakeCollectionReader cr = new FakeCollectionReader();
UimaContext context = UimaContextFactory.createUimaContext();
cr.initialize(context);
assertTrue(cr.initialised);
assertNotNull(cr.getSupport());
assertNotNull(cr.getMonitor());
assertNotNull(cr.getProgress());
Progress[] progress = cr.getProgress();
assertEquals("testunits", progress[0].getUnit());
assertFalse(cr.hasNext());
assertTrue(cr.hasNext);
cr.getNext((JCas)null);
assertTrue(cr.getNext);
cr.destroy();
assertTrue(cr.closed);
}
示例2: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
public Progress[] getProgress() {
return new Progress[] {
new ProgressImpl(
Long.valueOf(currentRecord).intValue(),
Long.valueOf(totalRecords).intValue(),
Progress.ENTITIES
)
};
}
示例3: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
public Progress[] getProgress() {
return new Progress[] {
new ProgressImpl(
Long.valueOf(currentRecord).intValue() - 1,
Long.valueOf(totalRecords).intValue(),
Progress.ENTITIES
)
};
}
示例4: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Override
public Progress[] getProgress() {
if (disableProgressTracking) {
documentsToBeProcessedCount = processedDocumentCount + 1;
}
return new Progress[] { new ProgressImpl(processedDocumentCount, documentsToBeProcessedCount, Progress.ENTITIES) };
}
示例5: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Progress[] getProgress() {
return new Progress[]{
new ProgressImpl(lastReadFileIdx + 1, files.size(), Progress.ENTITIES)
};
}
示例6: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Progress[] getProgress() {
return new Progress[]{
new ProgressImpl(consumedCount, expectedTotalCount, Progress.ENTITIES)
};
}
示例7: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Override
public Progress[] getProgress() {
int filesRead = lastReadFileIndex + 1;
return new Progress[]{
new ProgressImpl(filesRead, inputFiles.size(), Progress.ENTITIES)
};
}
示例8: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Override
public final Progress[] getProgress() {
monitor.startFunction("getProgress");
Progress[] ret = doGetProgress();
monitor.finishFunction("getProgress");
return ret;
}
示例9: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
public Progress[] getProgress() {
if (filterArticles) {
return new Progress[] { new ProgressImpl(progress, articleIds.size(), Progress.ENTITIES) };
} else {
return new Progress[] { new ProgressImpl(progress, 2000, Progress.ENTITIES) };
}
}
示例10: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
/**
*
* @return an array of Progress objects. Each object may have different units (for example number of entities or bytes).
*/
@Override
public Progress[] getProgress() {
return new Progress[]{new ProgressImpl(getCurrentIndex(),
getCollectionSize(),
Progress.ENTITIES)};
}
示例11: testRunWithPropertySetting
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Test
public void testRunWithPropertySetting() throws Exception {
DatabaseCollectionReader dcr = new DatabaseCollectionReader()
.setQuery(query)
.setIdColumn("id")
.setNoteColumn("note")
.setDriver(dbConnectionInfo.getDriver())
.setURL(dbConnectionInfo.getUrl())
.setUsername(dbConnectionInfo.getUsername())
.setPassword(dbConnectionInfo.getPassword());
assertNotNull(dcr);
assertEquals(dbConnectionInfo.getDriver(), dcr.getDriver());
assertEquals(dbConnectionInfo.getUrl(), dcr.getURL());
assertEquals(dbConnectionInfo.getUsername(), dcr.getUsername());
assertEquals(dbConnectionInfo.getPassword(), dcr.getPassword());
assertEquals(query, dcr.getQuery());
assertEquals("id", dcr.getIdColumn());
assertEquals("note", dcr.getNoteColumn());
//Create the mock client and run it
DoNothingListener listener = new DoNothingListener();
assertNotNull(listener);
MockClient client = new MockClient();
assertNotNull(client);
client.run(dcr, listener);
//Check that all records were pulled
assertEquals(TEST_CORPUS_SIZE, listener.getNumReceived());
Progress progress = dcr.getProgress()[0];
assertEquals(0, progress.getCompleted());
assertEquals(0, progress.getTotal());
assertEquals("row(s)", progress.getUnit());
}
示例12: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Override
public Progress[] getProgress()
{
// empty as we don't know how many entries are in the tar stream...
return new Progress[] {};
}
示例13: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
public Progress[] getProgress()
{
return null;
}
示例14: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Override
public Progress[] getProgress() {
return new Progress[]{new ProgressImpl(completed, total, "Documents", true)};
}
示例15: getProgress
import org.apache.uima.util.Progress; //导入依赖的package包/类
@Override
public Progress[] getProgress() {
return new Progress[0];
}