for (final ExternalRef ref : role.getExternalRefs()) { final String resource = ref.getResource().toLowerCase(); final String name = ref.getReference().replace('#', '.');
for (final ExternalRef ref : ImmutableList.copyOf(role.getExternalRefs())) { if (ref.getResource().equalsIgnoreCase("framenet")) { final String s = ref.getReference();
final boolean addFramenetRef = mergeFramenet && NAFUtils.getRef(semaforRole, "FrameNet", null) != null; for (final ExternalRef ref : mateRole.getExternalRefs()) { if (!ref.getResource().equalsIgnoreCase("FrameNet") || addFramenetRef) { mateRole.getSemRole(), mateRole.getSpan()); semaforPredicate.addRole(semaforRole); for (final ExternalRef ref : mateRole.getExternalRefs()) { semaforRole.addExternalRef(new ExternalRef(ref));
List<ExternalRef> rExternalReferences = role.getExternalRefs(); if (rExternalReferences.size() > 0) { Element externalReferencesElem = externalReferencesToDOM(rExternalReferences);
List<ExternalRef> rExternalReferences = role.getExternalRefs(); if (rExternalReferences.size() > 0) { Element externalReferencesElem = externalReferencesToDOM(rExternalReferences);
if (!Objects.equal(expectedNum, num) || !expectedLemma.equalsIgnoreCase(lemma) || expectedSense != null && !expectedSense.equals(sense)) { role.getExternalRefs().remove(ref); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Removed wrong role '" + ref.getReference() + "' for "
private static List<ExternalRef> getRefs(final Object annotation) { List<ExternalRef> refs = ImmutableList.of(); if (annotation instanceof Term) { refs = ((Term) annotation).getExternalRefs(); } else if (annotation instanceof Entity) { refs = ((Entity) annotation).getExternalRefs(); } else if (annotation instanceof Predicate) { refs = ((Predicate) annotation).getExternalRefs(); } else if (annotation instanceof Role) { refs = ((Role) annotation).getExternalRefs(); } else if (annotation instanceof Opinion) { refs = ((Opinion) annotation).getExternalRefs(); } else if (annotation instanceof OpinionExpression) { refs = ((OpinionExpression) annotation).getExternalRefs(); } else if (annotation instanceof OpinionTarget) { refs = ((OpinionTarget) annotation).getExternalRefs(); } else if (annotation instanceof OpinionHolder) { refs = ((OpinionHolder) annotation).getExternalRefs(); } else { throw new IllegalArgumentException("Unsupported annotation object: " + annotation); } return refs; }