Project

General

Profile

« Previous | Next » 

Revision 47673

static separator and comments

View differences:

modules/dnet-openaireplus-mapping-utils/trunk/src/main/java/eu/dnetlib/data/mapreduce/util/RelDescriptor.java
5 5

  
6 6
public class RelDescriptor {
7 7

  
8
	public static final String SEPARATOR = "_";
9

  
8 10
	private final String it;
9 11

  
10 12
	private final RelType relType;
......
13 15

  
14 16
	private final String relClass;
15 17

  
18

  
19
	// <TERM code="hasAmongTopNSimilarDocuments" encoding="resultResult_similarity_hasAmongTopNSimilarDocuments"
20
	//final String rd = oafRel.getRelType().toString() + "_" + oafRel.getSubRelType() + "_" + relClasses.getInverse(oafRel.getRelClass());
21
	//<ONTOLOGY_NAME code="dnet:result_result_relations">
16 22
	public RelDescriptor(final String value) {
17 23
		super();
18 24
		this.it = value;
19 25

  
20
		String[] s = value.split("_");
26
		String[] s = value.split(SEPARATOR);
21 27

  
22 28
		this.relType = RelType.valueOf(s[0]);
23 29
		this.subRelType = SubRelType.valueOf(s[1]);
24 30
		this.relClass = s[2];
31

  
25 32
	}
26 33

  
27 34
	public SubRelType getSubRelType() {
......
40 47
		return it;
41 48
	}
42 49

  
50

  
43 51
	@Override
44 52
	public String toString() {
45 53
		return getIt();

Also available in: Unified diff