Project

General

Profile

1 42181 sandro.lab
package eu.dnetlib.oai;
2
3
import com.google.common.collect.Multimap;
4
5
/**
6
 * Instances of this class represent fields to be explicitely managed by the OAI Publisher, for example for indexing purposes.
7
 *
8
 * @author alessia
9
 */
10
public class PublisherField {
11
12
	/**
13
	 * Name of the field.
14
	 */
15
	private String fieldName;
16
	/**
17
	 * True if the value of the field is a list (i.e. repeatable values). False otherwise.
18
	 **/
19
	private boolean repeatable;
20
	/**
21
	 * Information about where to take values for this field.
22
	 * <p>
23 45476 alessia.ba
	 * Keys are metadata format: name-layout-interpretation; values are xpaths.
24 42181 sandro.lab
	 * </p>
25
	 */
26
	private Multimap<String, String> sources;
27
28
	public PublisherField() {
29
		super();
30
		// TODO Auto-generated constructor stub
31
	}
32
33
	public PublisherField(final String fieldName, final boolean repeatable, final Multimap<String, String> sources) {
34
		super();
35
		this.fieldName = fieldName;
36
		this.repeatable = repeatable;
37
		this.sources = sources;
38
	}
39
40
	public String getFieldName() {
41
		return fieldName;
42
	}
43
44
	public void setFieldName(final String fieldName) {
45
		this.fieldName = fieldName;
46
	}
47
48
	public boolean isRepeatable() {
49
		return repeatable;
50
	}
51
52
	public void setRepeatable(final boolean repeatable) {
53
		this.repeatable = repeatable;
54
	}
55
56
	public Multimap<String, String> getSources() {
57
		return sources;
58
	}
59
60
	public void setSources(final Multimap<String, String> sources) {
61
		this.sources = sources;
62
	}
63
64 45476 alessia.ba
	@Override
65
	public String toString() {
66
		return "PublisherField{" +
67
				"fieldName='" + fieldName + '\'' +
68
				", repeatable=" + repeatable +
69
				", sources=" + sources +
70
				'}';
71
	}
72 42181 sandro.lab
}