blob: 14bda8bd1a3c3c47de53955b2b56de2a2b4c68c2 [file] [log] [blame]
Nils Diewaldf399a672013-11-18 17:55:22 +00001package de.ids_mannheim.korap.query.wrap;
2
3import org.apache.lucene.search.spans.SpanQuery;
4
5import de.ids_mannheim.korap.query.SpanMatchModifyQuery;
6import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
7
8import java.util.*;
9
10
11public class SpanMatchModifyQueryWrapper implements SpanQueryWrapperInterface {
12 private SpanQueryWrapperInterface subquery;
13 private byte number;
14
15 public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery, byte number) {
16 this.subquery = subquery;
17 this.number = number;
18 };
19
20 public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery, short number) {
21 this.subquery = subquery;
22 this.number = (byte) number;
23 };
24
25 public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery, int number) {
26 this.subquery = subquery;
27 this.number = (byte) number;
28 };
29
30 public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery) {
31 this.subquery = subquery;
32 this.number = (byte) 0;
33 };
34
35 public SpanQuery toQuery () {
36 return new SpanMatchModifyQuery(this.subquery.toQuery(), this.number);
37 };
38};