本文整理了Java中org.apache.uima.cas.CAS.getConstraintFactory()
方法的一些代码示例,展示了CAS.getConstraintFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CAS.getConstraintFactory()
方法的具体详情如下:
包路径:org.apache.uima.cas.CAS
类名称:CAS
方法名:getConstraintFactory
[英]Get a constraint factory. A constraint factory is a simple way of creating org.apache.uima.cas.FSMatchConstraint.
[中]获取约束工厂。约束工厂是创建组织的一种简单方法。阿帕奇。尤马。中科院。FSMatchConstraint。
代码示例来源:origin: org.apache.uima/ruta-core
public FilterManager(Collection<Type> defaultFilterTypes, boolean emptyIsInvisible, CAS cas) {
super();
this.defaultFilterTypes = defaultFilterTypes;
currentFilterTypes = new ArrayList<Type>();
currentRetainTypes = new ArrayList<Type>();
cf = cas.getConstraintFactory();
this.windowAnnotation = null;
this.windowType = null;
this.additionalWindow = null;
this.emptyIsInvisible = emptyIsInvisible;
this.cas = cas;
}
代码示例来源:origin: org.apache.uima/textmarker-core
public FilterManager(Collection<Type> filterTypes, CAS cas) {
super();
this.defaultFilterTypes = filterTypes;
currentFilterTypes = new ArrayList<Type>();
currentRetainTypes = new ArrayList<Type>();
cf = cas.getConstraintFactory();
this.windowAnnotation = null;
this.windowType = null;
this.additionalWindow = null;
}
代码示例来源:origin: org.apache.uima/textmarker-core
public FilterManager(Collection<Type> defaultFilterTypes, Collection<Type> filterTypes,
Collection<Type> retainTypes, AnnotationFS windowAnnotation, Type windowType, CAS cas) {
super();
this.defaultFilterTypes = defaultFilterTypes;
currentFilterTypes = new ArrayList<Type>(filterTypes);
currentRetainTypes = new ArrayList<Type>(retainTypes);
cf = cas.getConstraintFactory();
this.windowAnnotation = windowAnnotation;
this.windowType = windowType;
this.additionalWindow = createWindowConstraint(windowAnnotation, cas);
}
代码示例来源:origin: org.apache.uima/ruta-core
public FilterManager(Collection<Type> defaultFilterTypes, Collection<Type> filterTypes,
Collection<Type> retainTypes, AnnotationFS windowAnnotation, Type windowType,
boolean emptyIsInvisible, CAS cas) {
super();
this.defaultFilterTypes = defaultFilterTypes;
currentFilterTypes = new ArrayList<Type>(filterTypes);
currentRetainTypes = new ArrayList<Type>(retainTypes);
cf = cas.getConstraintFactory();
this.windowAnnotation = windowAnnotation;
this.windowType = windowType;
this.additionalWindow = createWindowConstraint(windowAnnotation, cas);
this.emptyIsInvisible = emptyIsInvisible;
this.cas = cas;
}
代码示例来源:origin: org.apache.uima/textmarker-core
public FSIterator<AnnotationFS> getFilteredBasicIterator(FSMatchConstraint constraint) {
ConstraintFactory cf = cas.getConstraintFactory();
FSMatchConstraint matchConstraint = cf.and(constraint, filter.getDefaultConstraint());
return cas.createFilteredIterator(basicIt, matchConstraint);
}
代码示例来源:origin: org.apache.uima/ruta-core
public FSIterator<AnnotationFS> getFilteredBasicIterator(FSMatchConstraint constraint) {
ConstraintFactory cf = cas.getConstraintFactory();
FSMatchConstraint matchConstraint = cf.and(constraint, filter.getDefaultConstraint());
return cas.createFilteredIterator(basicIt, matchConstraint);
}
代码示例来源:origin: org.apache.uima/textmarker-core
public FSMatchConstraint createAnchorConstraints(TextMarkerBlock block, TextMarkerStream stream) {
ConstraintFactory cf = stream.getCas().getConstraintFactory();
List<Type> types = getTypes(block, stream);
FSMatchConstraint result = null;
for (Type eachType : types) {
BasicTypeConstraint anchorConstraint = new BasicTypeConstraint(cf.createTypeConstraint(),
eachType);
anchorConstraint.add(eachType);
if (result != null) {
result = cf.or(result, anchorConstraint);
} else {
result = anchorConstraint;
}
}
return result;
}
代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor
ConstraintFactory cf = cas.getConstraintFactory();
内容来源于网络,如有侵权,请联系作者删除!