Search in sources :

Example 1 with AlternateSpanList

use of com.yahoo.document.annotation.AlternateSpanList in project vespa by vespa-engine.

the class VespaDocumentDeserializer42 method readSpanNode.

private SpanNode readSpanNode() {
    byte type = buf.get();
    buf.position(buf.position() - 1);
    SpanNode retval;
    if ((type & Span.ID) == Span.ID) {
        retval = new Span();
        if (spanNodes != null) {
            spanNodes.add(retval);
        }
        read((Span) retval);
    } else if ((type & SpanList.ID) == SpanList.ID) {
        retval = new SpanList();
        if (spanNodes != null) {
            spanNodes.add(retval);
        }
        read((SpanList) retval);
    } else if ((type & AlternateSpanList.ID) == AlternateSpanList.ID) {
        retval = new AlternateSpanList();
        if (spanNodes != null) {
            spanNodes.add(retval);
        }
        read((AlternateSpanList) retval);
    } else {
        throw new DeserializationException("Cannot read SpanNode of type " + type);
    }
    return retval;
}
Also used : SpanNode(com.yahoo.document.annotation.SpanNode) AlternateSpanList(com.yahoo.document.annotation.AlternateSpanList) AlternateSpanList(com.yahoo.document.annotation.AlternateSpanList) SpanList(com.yahoo.document.annotation.SpanList) Span(com.yahoo.document.annotation.Span)

Aggregations

AlternateSpanList (com.yahoo.document.annotation.AlternateSpanList)1 Span (com.yahoo.document.annotation.Span)1 SpanList (com.yahoo.document.annotation.SpanList)1 SpanNode (com.yahoo.document.annotation.SpanNode)1