forked from deternitydx/SNAC-EAC-Parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelationships.py
62 lines (53 loc) · 1.69 KB
/
relationships.py
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
# Provides the graph entities for our server
from bulbs.model import Node, Relationship
from bulbs.property import String, Integer, DateTime, List
from bulbs.utils import current_datetime
#print "ID: " , identifier
#print "Name: " , name
#print "Alternate Names: ", alt_names
#print "Subjects: ", subjects
#print "Nationalities: ", nationalities
#print "Languages: ", languages
#print "Places: ", places
#print "Occupations: ", occupations
#print "Associated with: ", associated
#print "Corresponded with: ", corresponded
#print "Same as: ", sameas
class Agent(Node):
element_type = "agent"
snac_type = String(nullable=False, indexed=True)
identifier = String(nullable=False, indexed=True)
name = String(nullable=False)
altNames = List()
startDate = String()
endDate = String()
occupations = List()
subjects = List()
languages = List()
nationalities = List()
places = List()
sameAs = List()
class Place(Node):
element_type = "place"
identifier = String(nullable=False, indexed=True)
name = String(nullable=False)
latitude = String()
longitude = String()
class Subject(Node):
element_type = "subject"
name = String(nullable=False)
class Document(Node):
element_type = "document"
identifier = String(nullable=False)
name = String(nullable=False)
class Occupation(Node):
element_type = "occupation"
name = String(nullable=False)
class AssociatedWith(Relationship):
label = "associatedWith"
class CorrespondedWith(Relationship):
label = "correspondedWith"
class ReferencedIn(Relationship):
label = "referencedIn"
class Location(Relationship):
label = "associatedPlace"