if (MultiValueMode.ARRAY.equals(feat.getMultiValueMode()) && LinkMode.WITH_ROLE.equals(feat.getLinkMode())) { List<LinkWithRoleModel> links = aAdapter.getFeatureValue(feat, aClickedFS); for (int li = 0; li < links.size(); li++) { LinkWithRoleModel link = links.get(li); List<LinkWithRoleModel> links = aAdapter.getFeatureValue(slotFeature, mergeFs);
if (MultiValueMode.ARRAY.equals(feat.getMultiValueMode()) && LinkMode.WITH_ROLE.equals(feat.getLinkMode())) { List<LinkWithRoleModel> links = aAdapter.getFeatureValue(feat, aClickedFS); for (int li = 0; li < links.size(); li++) { LinkWithRoleModel link = links.get(li); List<LinkWithRoleModel> links = aAdapter.getFeatureValue(slotFeature, mergeFs);
if (fs.getBegin() == selection.getBegin() && fs.getEnd() == selection.getEnd()) { spanValue = aAdapter.getFeatureValue(featureState.feature, fs);
if (MultiValueMode.ARRAY.equals(feat.getMultiValueMode()) && LinkMode.WITH_ROLE.equals(feat.getLinkMode())) { List<LinkWithRoleModel> links = typeAdapter.getFeatureValue(feat, fs); for (int li = 0; li < links.size(); li++) { LinkWithRoleModel link = links.get(li);
if (MultiValueMode.ARRAY.equals(feat.getMultiValueMode()) && LinkMode.WITH_ROLE.equals(feat.getLinkMode())) { List<LinkWithRoleModel> links = typeAdapter.getFeatureValue(feat, fs); for (int li = 0; li < links.size(); li++) { LinkWithRoleModel link = links.get(li);
/** * Copy this same annotation from the user annotation to the mergeview */ private static void copySpanAnnotation(AnnotatorState aState, AnnotationSchemaService aAnnotationService, AnnotationLayer aAnnotationLayer, AnnotationFS aOldFs, JCas aJCas) throws AnnotationException { SpanAdapter adapter = (SpanAdapter) aAnnotationService.getAdapter(aAnnotationLayer); // Create the annotation - this also takes care of attaching to an annotation if necessary int id = getAddr(adapter.add(aState.getDocument(), aState.getUser().getUsername(), aJCas, aOldFs.getBegin(), aOldFs.getEnd())); List<AnnotationFeature> features = aAnnotationService .listAnnotationFeature(adapter.getLayer()); // Copy the features for (AnnotationFeature feature : features) { Type oldType = adapter.getAnnotationType(aOldFs.getCAS()); Feature oldFeature = oldType.getFeatureByBaseName(feature.getName()); if (isLinkOrBasicFeatures(aOldFs, oldFeature)) { continue; } Object value = adapter.getFeatureValue(feature, aOldFs); adapter.setFeatureValue(aState.getDocument(), aState.getUser().getUsername(), aJCas, id, feature, value); } }
/** * Copy this same annotation from the user annotation to the mergeview */ private static void copySpanAnnotation(AnnotatorState aState, AnnotationSchemaService aAnnotationService, AnnotationLayer aAnnotationLayer, AnnotationFS aOldFs, JCas aJCas) throws AnnotationException { SpanAdapter adapter = (SpanAdapter) aAnnotationService.getAdapter(aAnnotationLayer); // Create the annotation - this also takes care of attaching to an annotation if necessary int id = getAddr(adapter.add(aState.getDocument(), aState.getUser().getUsername(), aJCas, aOldFs.getBegin(), aOldFs.getEnd())); List<AnnotationFeature> features = aAnnotationService .listAnnotationFeature(adapter.getLayer()); // Copy the features for (AnnotationFeature feature : features) { Type oldType = adapter.getAnnotationType(aOldFs.getCAS()); Feature oldFeature = oldType.getFeatureByBaseName(feature.getName()); if (isLinkOrBasicFeatures(aOldFs, oldFeature)) { continue; } Object value = adapter.getFeatureValue(feature, aOldFs); adapter.setFeatureValue(aState.getDocument(), aState.getUser().getUsername(), aJCas, id, feature, value); } }