本文整理了Java中net.sf.okapi.common.Event.getEnding()
方法的一些代码示例,展示了Event.getEnding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getEnding()
方法的具体详情如下:
包路径:net.sf.okapi.common.Event
类名称:Event
方法名:getEnding
[英]Convenience method returns the Ending resource.
[中]便利方法返回结束资源。
代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit
private void writeEndDocument (Event event) {
writer.write(skelWriter.processEndDocument(event.getEnding()));
writer.write(Util.RTF_ENDCODE+"}\n");
writer.close();
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit
break;
case END_SUBDOCUMENT:
writer.write(skelWriter.processEndSubDocument(event.getEnding()));
break;
case START_GROUP:
break;
case END_GROUP:
writer.write(skelWriter.processEndGroup(event.getEnding()));
break;
case END_SUBFILTER:
代码示例来源:origin: net.sf.okapi.steps/okapi-step-wordcount
@Override
protected Event handleEndBatch (Event event) {
Ending res = event.getEnding();
if (res == null) {
res = new Ending("");
event.setResource(res);
}
MetricsAnnotation sma = res.getAnnotation(MetricsAnnotation.class);
if (sma == null) {
sma = new MetricsAnnotation();
res.setAnnotation(sma);
}
Metrics m = sma.getMetrics();
m.setMetric(GMX.TotalWordCount, srcBatchWordCount);
return super.handleEndBatch(event);
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-wordcount
@Override
protected Event handleEndBatchItem (Event event) {
Ending res = event.getEnding();
if (res == null) {
res = new Ending("");
event.setResource(res);
}
MetricsAnnotation sma = res.getAnnotation(MetricsAnnotation.class);
if ( sma == null ) {
sma = new MetricsAnnotation();
res.setAnnotation(sma);
}
Metrics m = sma.getMetrics();
m.setMetric(GMX.TotalWordCount, srcBatchItemWordCount);
srcBatchWordCount += srcBatchItemWordCount;
return super.handleEndBatchItem(event);
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-common
case END_GROUP:
case END_SUBFILTER:
return verificationUtil.compareIResources(event1.getEnding(), event2.getEnding());
case DOCUMENT_PART:
return verificationUtil.compareBaseReferenceable(event1.getDocumentPart(), event2.getDocumentPart());
代码示例来源:origin: net.sf.okapi/okapi-core
break;
case END_DOCUMENT:
processEndDocument(event.getEnding());
close();
break;
break;
case END_SUBDOCUMENT:
processEndSubDocument(event.getEnding());
break;
case START_GROUP:
break;
case END_GROUP:
processEndGroup(event.getEnding());
break;
case TEXT_UNIT:
代码示例来源:origin: net.sf.okapi/okapi-core
subFilter.endSubfilter = endSubfilter;
endSubfilter.setSkeleton(event.getEnding().getSkeleton());
event = new Event(EventType.END_SUBFILTER, endSubfilter);
break;
内容来源于网络,如有侵权,请联系作者删除!