Project

General

Profile

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
        fromorganization;
17
    }
18

    
19
    public final static String ORGANIZATION_COMMUNITY_TRUST = "0.85";
20

    
21
    public static final String ZERO = "0";
22
    public static final String ONE = "1";
23

    
24
    public static final String COUNTER_PROPAGATION = "Propagation";
25

    
26
    public final static String DATA_INFO_TYPE = "propagation";
27
    public final static String SCHEMA_NAME = "dnet:provenanceActions";
28
    public final static String SCHEMA_ID = "dnet:provenanceActions";
29

    
30
    public final static String DNET_COUNTRY_SCHEMA = "dnet:countries";
31
    public final static String DNET_RELATION_SCHEMA = "dnet:result_project_relations";
32
    //public final static String DNET_COMMUNITY_RELATION_SCHEMA = "dnet:result_result_relations";
33

    
34
    public final static String CLASS_PROJECT_ID = "propagation:project:semrel";
35
    public final static String CLASS_PROJECT_NAME = "Propagation of relation to project through semantic relation among results";
36

    
37
    public final static String CLASS_COUNTRY_ID = "propagation:country:instrepos";
38
    public final static String CLASS_NAME_COUNTRY = "Propagation of country information from datasources belonging to institutional repositories";
39

    
40
    public final static String CLASS_COMMUNITY_ID = "propagation:community:semrel";
41
    public final static String CLASS_COMMUNITY_NAME = " Propagation of result belonging to community through semantic relation";
42

    
43
    public final static String CLASS_ORGANIZATION_ID = "propagation:community:organization";
44
    public final static String CLASS_ORGANIZATION_NAME = "Propagation of community result through organization association";
45

    
46
    public final static int PROJECT = TypeProtos.Type.project.getNumber();//40
47
    public final static int DATASOURCE = TypeProtos.Type.datasource.getNumber();//10
48
    public final static int ORGANIZATION = TypeProtos.Type.organization.getNumber();//20
49
    public final static int PUBLICATION = TypeProtos.Type.result.getNumber();//50
50

    
51
    public final static RelTypeProtos.RelType REL_TYPE = RelTypeProtos.RelType.resultProject;
52
    public final static RelTypeProtos.SubRelType SUBREL_TYPE = RelTypeProtos.SubRelType.outcome;
53
    public static final String REL_PROJECT_RESULT = "produces";
54
    public static final String REL_RESULT_PROJECT = "isProducedBy";
55
    public static final String RELATION = REL_TYPE + "_" + SUBREL_TYPE + "_";
56
    public static final String OUTCOME_PRODUCEDBY = RELATION + REL_RESULT_PROJECT;
57
    public static final String[] DEFAULT_PROJECT_RELATION_SET = new String[]{"resultResult_supplement_isSupplementedBy","resultResult_supplement_isSupplementTo"};
58
    public static final String[] DEFAULT_COMMUNITY_RELATION_SET = new String[]{"resultResult_supplement_isSupplementedBy","resultResult_supplement_isSupplementTo"};
59

    
60

    
61
    public final static RelTypeProtos.RelType REL_TYPE_ORGANIZATION = RelTypeProtos.RelType.resultOrganization;
62
    public final static RelTypeProtos.SubRelType SUBREL_TYPE_ORGANIZATION = RelTypeProtos.SubRelType.affiliation;
63
    public static final String REL_ORGANIZATIO_RESULT = "isAuthorInstitutionOf";
64
    public static final String REL_RESULT_ORGANIZATION = "hasAuthorInstitution";
65
    public static final String RELATION_ORGANIZATION = REL_TYPE_ORGANIZATION + "_" + SUBREL_TYPE_ORGANIZATION + "_";
66

    
67
    public static final RelTypeProtos.RelType REL_TYPE_RESULT = RelTypeProtos.RelType.resultResult;
68

    
69
    public static final RelTypeProtos.SubRelType SUBREL_DEDUP = RelTypeProtos.SubRelType.dedup;
70
    public static final RelTypeProtos.RelType REL_TYPE_DEDUP_ORGANIZATION = RelTypeProtos.RelType.organizationOrganization;
71

    
72
    public static final String DEDUP_RELATION_ORGANIZATION = REL_TYPE_DEDUP_ORGANIZATION + "_" + SUBREL_DEDUP + "_";
73

    
74
    public static final String REL_DEDUP_RESULT_REPRESENTATIVE = "isMergedIn";
75
    public static final String REL_DEDUP_REPRESENTATIVE_RESULT = "merges";
76

    
77
    public static final String DEDUP_RELATION_RESULT = REL_TYPE_RESULT + "_" + SUBREL_DEDUP + "_";
78

    
79

    
80
    //public static final String[] DEFAULT_ORGANIZATION_RELATION_SET = new String[]{"resultOrganization_affiliation_isAuthorInstitutionOf","resultOrganization_affiliation_hasAuthorInstitution"};
81

    
82

    
83
    public static final Set<String> DEFAULT_ALLOWED_DATASOURCES = Sets.newHashSet("pubsrepository::institutional");
84

    
85
    private Set<String> whiteList = Sets.newHashSet("10|opendoar____::300891a62162b960cf02ce3827bb363c");
86
    private Set<String> blackList = Sets.newHashSet("");
87

    
88

    
89

    
90
}
(2-2/5)