Project

General

Profile

1
/**
2
 * 
3
 */
4
package eu.dnetlib.utils.cql;
5

    
6
/**
7
 * @author stoumpos
8
 * 
9
 */
10
public class CqlRelation extends CqlClause {
11

    
12
	String index = null;
13
	String operator = null;
14
	String value = null;
15

    
16
	public CqlRelation() {
17
		this(null, null, null);
18
	}
19

    
20
	public CqlRelation(String index, String operator, String value) {
21
		super(CqlClauseType.RELATION);
22
		this.index = index;
23
		this.operator = operator;
24
		this.value = value;
25
	}
26

    
27
	public String getIndex() {
28
		return index;
29
	}
30

    
31
	public void setIndex(String index) {
32
		this.index = index;
33
	}
34

    
35
	public String getOperator() {
36
		return operator;
37
	}
38

    
39
	public void setOperator(String operator) {
40
		this.operator = operator;
41
	}
42

    
43
	public String getValue() {
44
		return value;
45
	}
46

    
47
	public void setValue(String value) {
48
		this.value = value;
49
	}
50

    
51
	@Override
52
	public String toCqlString() {
53
		StringBuffer buffer = new StringBuffer();
54
		buffer.append(index).append(" ").append(operator);
55
		buffer.append(" ").append(value);
56
		return buffer.toString();
57
	}
58

    
59
	@Override
60
	public String toNodeString(String prefix) {
61
		return prefix + "relation: " + toCqlString();
62
	}
63
}
(8-8/10)