entities.jh 2.02 KB
Newer Older
1
enum BundlesSourceType {
2
  OAI_PMH, EXCEL_SPREADSHEET, XML_FILE
3 4 5 6 7 8 9 10 11 12
}

enum BundleState {
  UNINGESTED, PROCESSING, ERROR, INGESTED, DUPLICATE, FILTERED_AWAY
}

enum BundlesSourceState {
  UNPROCESSED, PROCESSING, ERROR, PROCESSED
}

13
entity File {
14
  name String required,
15
  data Blob
16 17
}

18 19
entity Repository {
  address String
20 21
}

22 23 24 25 26 27 28 29 30 31 32 33
entity BundlesSource {
  bundlesSourceState BundlesSourceState
  data String
  type BundlesSourceType
  reference String
}

entity Bundle {
  reference String
  state BundleState
}

Hellmich, Christoph's avatar
Hellmich, Christoph committed
34 35
entity UserInput {
  input String
36 37
}

38 39 40
entity Wizard {
  name String required
  active Boolean
41 42
}

43 44 45 46
entity Step {
  name String required,
  treeRow Integer,
  treeIndent Integer
47 48
}

49 50 51 52 53
entity Element {
  type String,
  name String,
  value String,
  formRow Integer
54 55
}

Hellmich, Christoph's avatar
Hellmich, Christoph committed
56
entity Setting {
Hellmich, Christoph's avatar
Hellmich, Christoph committed
57
  name String,
Hellmich, Christoph's avatar
Hellmich, Christoph committed
58 59 60
  value String
}

Hellmich, Christoph's avatar
Hellmich, Christoph committed
61
entity ElementOption {
62 63
  value String,
  text String
64 65
}

66 67 68 69 70 71 72
entity Validation {
  minlength Integer,
  maxlength Integer,
  min Integer,
  max Integer,
  pattern String,
  required Boolean
73 74
}

75 76 77 78 79 80 81
entity Messages {
  minlength String,
  maxlength String,
  min String,
  max String,
  pattern String,
  required String
82 83 84
}

relationship ManyToOne {
85
  BundlesSource{owner(login)} to User
86 87
}

88 89 90 91 92 93 94 95 96 97
relationship OneToOne {
  File{bundlesSource} to BundlesSource
}

relationship OneToOne {
  Repository{bundlesSource} to BundlesSource
}

relationship OneToMany {
  BundlesSource{bundle} to Bundle{bundlesSource}
98 99
}

100
relationship ManyToOne {
Hellmich, Christoph's avatar
Hellmich, Christoph committed
101
  UserInput{owner(login)} to User
102 103
}

104 105 106 107
relationship ManyToOne {
  Wizard{creator(login)} to User
}

108
relationship OneToMany {
Hellmich, Christoph's avatar
Hellmich, Christoph committed
109
  Wizard{userInput} to UserInput
110 111
}

112 113 114 115 116 117 118 119
relationship OneToMany {
  Wizard{step} to Step
}

relationship OneToMany {
  Step{element} to Element
}

120
relationship ManyToOne {
121
  Element{nextStep} to Step
122 123 124
}

relationship ManyToOne {
125
  Element{element} to Element
126 127
}

128
relationship OneToMany {
Hellmich, Christoph's avatar
Hellmich, Christoph committed
129 130 131 132
  Element{setting} to Setting
}

relationship OneToMany {
Hellmich, Christoph's avatar
Hellmich, Christoph committed
133
  Element{elementOption} to ElementOption
134 135 136 137 138 139 140 141
}

relationship OneToOne {
  Element{validation} to Validation
}

relationship OneToOne {
  Validation{messages} to Messages
142
}