Search in sources :

Example 1 with LinkCompareBehavior

use of de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.LinkCompareBehavior in project webanno by webanno.

the class SpanPosition method toMinimalString.

@Override
public String toMinimalString() {
    StringBuilder builder = new StringBuilder();
    builder.append(begin).append('-').append(end).append(" [").append(text).append(']');
    LinkCompareBehavior linkCompareBehavior = getLinkCompareBehavior();
    if (linkCompareBehavior != null) {
        switch(linkCompareBehavior) {
            case LINK_TARGET_AS_LABEL:
                builder.append(" role: [").append(getRole()).append(']');
                break;
            case LINK_ROLE_AS_LABEL:
                builder.append(" -> [").append(getLinkTargetBegin()).append('-').append(getLinkTargetEnd()).append(" [").append(getLinkTargetText()).append(']');
                break;
            default:
                throw new IllegalStateException("Unknown link target comparison mode [" + linkCompareBehavior + "]");
        }
    }
    return builder.toString();
}
Also used : LinkCompareBehavior(de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.LinkCompareBehavior)

Aggregations

LinkCompareBehavior (de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.LinkCompareBehavior)1