1
|
package eu.dnetlib.data.mapreduce.hbase.propagation;
|
2
|
|
3
|
import com.google.common.collect.Sets;
|
4
|
import eu.dnetlib.data.proto.RelTypeProtos;
|
5
|
import eu.dnetlib.data.proto.TypeProtos;
|
6
|
|
7
|
import java.util.Set;
|
8
|
|
9
|
public class PropagationConstants {
|
10
|
|
11
|
public enum Type {
|
12
|
valid,
|
13
|
notvalid,
|
14
|
fromsemrel,
|
15
|
fromresult;
|
16
|
}
|
17
|
|
18
|
public static final String ZERO = "0";
|
19
|
public static final String ONE = "1";
|
20
|
|
21
|
public static final int FROM_SEM_REL = 10;//for the relation to projects propagated thanks to a semantic relation
|
22
|
public static final int FROM_RESULT = 20;//for the relations to projects already owned by the result
|
23
|
|
24
|
public static final String COUNTER_PROPAGATION = "Propagation";
|
25
|
|
26
|
|
27
|
public final static String DATA_INFO_TYPE = "propagation";
|
28
|
public final static String SCHEMA_NAME = "dnet:provenanceActions";
|
29
|
public final static String SCHEMA_ID = "dnet:provenanceActions";
|
30
|
|
31
|
public final static String DNET_COUNTRY_SCHEMA = "dnet:countries";
|
32
|
public final static String DNET_RELATION_SCHEMA = "dnet:result_project_relations";
|
33
|
public final static String DNET_COMMUNITY_RELATION_SCHEMA = "dnet:result_result_relations";
|
34
|
public final static String CLASS_RELATION_ID = "propagation:project:semrel";
|
35
|
public final static String CLASS_COUNTRY_ID = "propagation:country:instrepos";
|
36
|
public final static String CLASS_COMMUNITY_RELATION_ID = "propagation:community:semrel";
|
37
|
|
38
|
public final static int PROJECT = TypeProtos.Type.project.getNumber();//40
|
39
|
public final static int DATASOURCE = TypeProtos.Type.datasource.getNumber();//10
|
40
|
public final static int ORGANIZATION = TypeProtos.Type.organization.getNumber();//20
|
41
|
public final static int PUBLICATION = TypeProtos.Type.result.getNumber();//50
|
42
|
|
43
|
public final static RelTypeProtos.RelType REL_TYPE = RelTypeProtos.RelType.resultProject;
|
44
|
public final static RelTypeProtos.SubRelType SUBREL_TYPE = RelTypeProtos.SubRelType.outcome;
|
45
|
public static final String REL_PROJECT_RESULT = "produces";
|
46
|
public static final String REL_RESULT_PROJECT = "isProducedBy";
|
47
|
|
48
|
public static final String RELATION = REL_TYPE + "_" + SUBREL_TYPE + "_";
|
49
|
public static final String OUTCOME_PRODUCEDBY = RELATION + REL_RESULT_PROJECT;
|
50
|
|
51
|
|
52
|
public static final String[] DEFAULT_PROJECT_RELATION_SET = new String[]{"resultResult_supplement_isSupplementedBy","resultResult_supplement_isSupplementTo"};
|
53
|
public static final String[] DEFAULT_COMMUNITY_RELATION_SET = new String[]{"resultResult_supplement_isSupplementedBy","resultResult_supplement_isSupplementTo"};
|
54
|
public static final Set<String> DEFAULT_ALLOWED_DATASOURCES = Sets.newHashSet("pubsrepository::institutional");
|
55
|
|
56
|
private Set<String> whiteList = Sets.newHashSet("10|opendoar____::300891a62162b960cf02ce3827bb363c");
|
57
|
private Set<String> blackList = Sets.newHashSet("");
|
58
|
|
59
|
}
|