-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelation_types.rb
More file actions
75 lines (66 loc) · 1.64 KB
/
relation_types.rb
File metadata and controls
75 lines (66 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
module RelationTypes
REFERENCE_RELATION_TYPES = [
"cites", "is-supplemented-by", "references",
].freeze
CITATION_RELATION_TYPES = [
"is-cited-by",
"is-supplement-to",
"is-referenced-by",
].freeze
INCLUDED_RELATION_TYPES = REFERENCE_RELATION_TYPES | CITATION_RELATION_TYPES
PART_RELATION_TYPES = [
"is-part-of",
"has-part",
].freeze
NEW_RELATION_TYPES = [
"is-reply-to",
"is-translation-of",
"is-published-in",
].freeze
RELATIONS_RELATION_TYPES = [
"compiles",
"is-compiled-by",
"documents",
"is-documented-by",
"has-metadata",
"is-metadata-for",
"is-derived-from",
"is-source-of",
"reviews",
"is-reviewed-by",
"requires",
"is-required-by",
"continues",
"is-coutinued-by",
"has-version",
"is-version-of",
"has-part",
"is-part-of",
"is-variant-from-of",
"is-original-form-of",
"is-identical-to",
"obsoletes",
"is-obsolete-by",
"is-new-version-of",
"is-previous-version-of",
"describes",
"is-described-by",
].freeze
ALL_RELATION_TYPES = (
RELATIONS_RELATION_TYPES |
NEW_RELATION_TYPES |
CITATION_RELATION_TYPES |
REFERENCE_RELATION_TYPES
).uniq
OTHER_RELATION_TYPES =
(RELATIONS_RELATION_TYPES | NEW_RELATION_TYPES) -
INCLUDED_RELATION_TYPES - PART_RELATION_TYPES
RELATED_SOURCE_IDS = [
"datacite-related",
"datacite-crossref",
"crossref",
].freeze
# relation_type_ids that affect counts in lupo.
SOURCE_RELATION_TYPES = ["references", "parts", "versions"].freeze
TARGET_RELATION_TYPES = ["views", "downloads", "citations", "part_of", "version_of"].freeze
end