本文整理了Java中net.sf.okapi.common.Event.isDocumentPart()
方法的一些代码示例,展示了Event.isDocumentPart()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.isDocumentPart()
方法的具体详情如下:
包路径:net.sf.okapi.common.Event
类名称:Event
方法名:isDocumentPart
[英]Convenience method to tell if this Event carries a DocumentPart
[中]判断此事件是否包含DocumentPart的便捷方法
代码示例来源:origin: net.sf.okapi/okapi-core
/**
* Convenience method returns the {@link IResource} as a {@link DocumentPart}.
* The caller should confirm the {@link Event} type using isDocumentPart before calling
* this method.
*
* @return the {@link DocumentPart}
*
* @throws OkapiUnexpectedResourceTypeException
* if the {@link IResource} is not a {@link DocumentPart}
*/
public DocumentPart getDocumentPart () {
if ( isDocumentPart() ) {
return (DocumentPart) resource;
}
throw new OkapiUnexpectedResourceTypeException("Event resource is not a DocumentPart");
}
代码示例来源:origin: net.sf.okapi/okapi-core
} else if (e.isDocumentPart()) {
DocumentPart dp = e.getDocumentPart();
sb.append(" { id:").append(nqs(dp.getId())).append(",\n\t");
代码示例来源:origin: net.sf.okapi.filters/okapi-filter-idml
void merge(ReferenceableEvent referenceableEvent) {
for (ReferenceableEvent referentEvent : referenceableEvent.getReferentEvents()) {
new ReferenceableEventsMerger(eventFactory, targetLocale).merge(referentEvent);
}
if (referenceableEvent.getEvent().isStartGroup()) {
mergeStartGroup(referenceableEvent);
return;
}
if (referenceableEvent.getEvent().isDocumentPart()) {
return;
}
mergeTextUnit(referenceableEvent);
}
代码示例来源:origin: net.sf.okapi.filters/okapi-filter-idml
if (referentEvent.getEvent().isDocumentPart()) {
ISkeleton skeleton = referentEvent.getEvent().getDocumentPart().getSkeleton();
内容来源于网络,如有侵权,请联系作者删除!