Type type = getType(cas, adapter.getAnnotationTypeName()); Feature targetFeature = type.getFeatureByBaseName(adapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(adapter.getSourceFeatureName());
Type type = getType(cas, adapter.getAnnotationTypeName()); Feature targetFeature = type.getFeatureByBaseName(adapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(adapter.getSourceFeatureName());
Type type = getType(cas, adapter.getAnnotationTypeName()); Feature targetFeature = type.getFeatureByBaseName(adapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(adapter.getSourceFeatureName());
Type type = getType(cas, adapter.getAnnotationTypeName()); Feature targetFeature = type.getFeatureByBaseName(adapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(adapter.getSourceFeatureName());
@Override public List<Pair<LogMessage, AnnotationFS>> onValidate(TypeAdapter aAdapter, JCas aJCas) { if (aAdapter.getLayer().isCrossSentence()) { emptyList(); } RelationAdapter adapter = (RelationAdapter) aAdapter; CAS cas = aJCas.getCas(); Type type = getType(cas, adapter.getAnnotationTypeName()); Feature targetFeature = type.getFeatureByBaseName(adapter.getTargetFeatureName()); Feature sourceFeature = type.getFeatureByBaseName(adapter.getSourceFeatureName()); List<Pair<LogMessage, AnnotationFS>> messages = new ArrayList<>(); for (AnnotationFS fs : select(cas, type)) { AnnotationFS targetFs = (AnnotationFS) fs.getFeatureValue(targetFeature); AnnotationFS sourceFs = (AnnotationFS) fs.getFeatureValue(sourceFeature); if (!isBeginInSameSentence(aJCas, targetFs.getBegin(), sourceFs.getBegin())) { messages.add(Pair.of( LogMessage.error(this, "Crossing sentence bounardies is not permitted."), fs)); } } return messages; } }
Type type = getType(aJcas.getCas(), typeAdapter.getAnnotationTypeName());
Type type = getType(aJcas.getCas(), typeAdapter.getAnnotationTypeName());
AnnotationFS governorFs = null; Type type = CasUtil.getType(aJCas.getCas(), aAdapter.getAnnotationTypeName()); Type spanType = getType(aJCas.getCas(), aAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(aAdapter.getAttachFeatureName());
AnnotationFS governorFs = null; Type type = CasUtil.getType(aJCas.getCas(), aAdapter.getAnnotationTypeName()); Type spanType = getType(aJCas.getCas(), aAdapter.getAttachTypeName()); Feature arcSpanFeature = spanType.getFeatureByBaseName(aAdapter.getAttachFeatureName());