chronicle-core 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d953db1cde445a4dc7c887226864715ccc5dffd745fc3d04b2c463a54ecbc40a
4
- data.tar.gz: f523823b5b681df1b278532b73cb36e89bcf1ec3a114bd8c9b680f6dfb4c97b3
3
+ metadata.gz: d5badc889eb0941a2607d675bd4f0bc2dc7df9604377f005053b7c66d64fa545
4
+ data.tar.gz: 807367bdffc8a18d4d5260ef1329a0d8d0a4a94634a171c4caecd7a4836abe60
5
5
  SHA512:
6
- metadata.gz: 1b332fe113f5db60c318aad8b28d22ddc95dfa2b6e7afc6ee4ffd15521c56282690a48a083b1ca1518c2c4f4c38afc015f95fd664ae15a9bc2bdd8de8538ff5c
7
- data.tar.gz: '09e32019bd267e92d0ab873f3b098595fc82c40ae4c7ba89525112d89b428adb8ca66d1830cbc5d8caa83d87839e86a5fcef7d341e7f71b9a9c431715ca32d9f'
6
+ metadata.gz: 61e61d520b0508eff4f521b467044c64225d89ad09543d992ca8e408645b7f1efd009463d63f037c0e828d590c7dee26f589e8e64fe7ea66ea9b68d303fd3bdd
7
+ data.tar.gz: 84ac065cf6ad62e2456b291c2ce5c2b2175008020f66a49235a04313a2e8218bf3d12a0273b213a0154b887b5ba63cdf17b81a6a49e1e182ffc5b0f8fc7bd2aa
@@ -1,5 +1,5 @@
1
1
  module Chronicle
2
2
  module Core
3
- VERSION = '0.3.1'.freeze
3
+ VERSION = '0.3.2'.freeze
4
4
  end
5
5
  end
@@ -77,6 +77,21 @@ module Chronicle
77
77
  @current_parent = previous_parent
78
78
  end
79
79
 
80
+ # add a new type that's child of the parent
81
+ def add_type(identifier, comment: nil, &)
82
+ new_type = @new_graph.add_type(identifier)
83
+ new_type.comment = comment
84
+
85
+ @current_parent&.add_subtype_id(new_type.id)
86
+
87
+ previous_parent = @current_parent
88
+ @current_parent = new_type
89
+
90
+ instance_eval(&) if block_given?
91
+
92
+ @current_parent = previous_parent
93
+ end
94
+
80
95
  def pick_all_subtypes(&)
81
96
  @base_graph.find_type(@current_parent.short_id.to_sym).subtype_ids.each do |subtype_id|
82
97
  identifier = @base_graph.id_to_identifier(subtype_id)
@@ -6,7 +6,9 @@
6
6
  "subtype_ids": [
7
7
  "https://schema.chronicle.app/AssessAction",
8
8
  "https://schema.chronicle.app/ConsumeAction",
9
+ "https://schema.chronicle.app/ControlAction",
9
10
  "https://schema.chronicle.app/InteractAction",
11
+ "https://schema.chronicle.app/OrganizeAction",
10
12
  "https://schema.chronicle.app/UpdateAction"
11
13
  ],
12
14
  "see_also": "https://schema.org/Action",
@@ -55,6 +57,14 @@
55
57
  "see_also": "https://schema.org/Book",
56
58
  "comment": "A book."
57
59
  },
60
+ {
61
+ "id": "https://schema.chronicle.app/BookmarkAction",
62
+ "subtype_ids": [
63
+
64
+ ],
65
+ "see_also": "https://schema.org/BookmarkAction",
66
+ "comment": "An agent bookmarks/flags/labels/tags/marks an object."
67
+ },
58
68
  {
59
69
  "id": "https://schema.chronicle.app/Boolean",
60
70
  "subtype_ids": [
@@ -79,14 +89,38 @@
79
89
  "see_also": "https://schema.org/City",
80
90
  "comment": "A city or town."
81
91
  },
92
+ {
93
+ "id": "https://schema.chronicle.app/Comment",
94
+ "subtype_ids": [
95
+
96
+ ],
97
+ "see_also": "https://schema.org/Comment",
98
+ "comment": "A comment on an item - for example, a comment on a blog post. The comment's content is expressed via the [[text]] property, and its topic via [[about]], properties shared with all CreativeWorks."
99
+ },
100
+ {
101
+ "id": "https://schema.chronicle.app/CommentAction",
102
+ "subtype_ids": [
103
+
104
+ ],
105
+ "see_also": "https://schema.org/CommentAction",
106
+ "comment": "The act of generating a comment about a subject."
107
+ },
82
108
  {
83
109
  "id": "https://schema.chronicle.app/CommunicateAction",
84
110
  "subtype_ids": [
85
- "https://schema.chronicle.app/CheckInAction"
111
+ "https://schema.chronicle.app/CheckInAction",
112
+ "https://schema.chronicle.app/CommentAction"
86
113
  ],
87
114
  "see_also": "https://schema.org/CommunicateAction",
88
115
  "comment": "The act of conveying information to another person via a communication medium (instrument) such as speech, email, or telephone conversation."
89
116
  },
117
+ {
118
+ "id": "https://schema.chronicle.app/ComputerCommand",
119
+ "subtype_ids": [
120
+
121
+ ],
122
+ "comment": "A command that can be executed on a computer."
123
+ },
90
124
  {
91
125
  "id": "https://schema.chronicle.app/ConsumeAction",
92
126
  "subtype_ids": [
@@ -107,6 +141,14 @@
107
141
  "see_also": "https://schema.org/ContactPoint",
108
142
  "comment": "A contact point—for example, a Customer Complaints department."
109
143
  },
144
+ {
145
+ "id": "https://schema.chronicle.app/ControlAction",
146
+ "subtype_ids": [
147
+
148
+ ],
149
+ "see_also": "https://schema.org/ControlAction",
150
+ "comment": "An agent controls a device or application."
151
+ },
110
152
  {
111
153
  "id": "https://schema.chronicle.app/Country",
112
154
  "subtype_ids": [
@@ -119,6 +161,8 @@
119
161
  "id": "https://schema.chronicle.app/CreativeWork",
120
162
  "subtype_ids": [
121
163
  "https://schema.chronicle.app/Book",
164
+ "https://schema.chronicle.app/Comment",
165
+ "https://schema.chronicle.app/ComputerCommand",
122
166
  "https://schema.chronicle.app/CreativeWorkSeries",
123
167
  "https://schema.chronicle.app/Episode",
124
168
  "https://schema.chronicle.app/MediaObject",
@@ -345,6 +389,14 @@
345
389
  "see_also": "https://schema.org/Organization",
346
390
  "comment": "An organization such as a school, NGO, corporation, club, etc."
347
391
  },
392
+ {
393
+ "id": "https://schema.chronicle.app/OrganizeAction",
394
+ "subtype_ids": [
395
+ "https://schema.chronicle.app/BookmarkAction"
396
+ ],
397
+ "see_also": "https://schema.org/OrganizeAction",
398
+ "comment": "The act of manipulating/administering/supervising/controlling one or more objects."
399
+ },
348
400
  {
349
401
  "id": "https://schema.chronicle.app/PerformingGroup",
350
402
  "subtype_ids": [
@@ -883,16 +935,13 @@
883
935
  {
884
936
  "id": "https://schema.chronicle.app/keywords",
885
937
  "domain": [
886
- "https://schema.chronicle.app/CreativeWork"
938
+ "https://schema.chronicle.app/Thing"
887
939
  ],
888
940
  "range": [
889
- "https://schema.chronicle.app/Text",
890
- "https://schema.chronicle.app/URL"
941
+ "https://schema.chronicle.app/Text"
891
942
  ],
892
943
  "many": true,
893
- "required": false,
894
- "comment": "Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.",
895
- "see_also": "https://schema.org/keywords"
944
+ "required": false
896
945
  },
897
946
  {
898
947
  "id": "https://schema.chronicle.app/latitude",
@@ -24,12 +24,19 @@ pick_type :Thing do
24
24
  pick_type :WatchAction
25
25
  end
26
26
 
27
+ pick_type :ControlAction
28
+
27
29
  pick_type :InteractAction do
28
30
  pick_type :CommunicateAction do
29
31
  pick_type :CheckInAction
32
+ pick_type :CommentAction
30
33
  end
31
34
  end
32
35
 
36
+ pick_type :OrganizeAction do
37
+ pick_type :BookmarkAction
38
+ end
39
+
33
40
  pick_type :UpdateAction do
34
41
  pick_type :AddAction do
35
42
  pick_type :InsertAction
@@ -54,6 +61,10 @@ pick_type :Thing do
54
61
  end
55
62
  end
56
63
 
64
+ add_type :ComputerCommand, comment: 'A command that can be executed on a computer.'
65
+
66
+ pick_type :Comment
67
+
57
68
  pick_type :Episode do
58
69
  pick_type :PodcastEpisode
59
70
 
@@ -98,7 +109,6 @@ pick_type :Thing do
98
109
  apply_property :creator, many: true
99
110
  apply_property :inLanguage, many: true
100
111
  apply_property :isPartOf, many: true
101
- apply_property :keywords, many: true
102
112
  apply_property :mentions, many: true
103
113
  apply_property :producer, many: true
104
114
  apply_property :publisher, many: true
@@ -167,6 +177,9 @@ pick_type :Thing do
167
177
  add_property :slug
168
178
  add_property :sourceId
169
179
  add_property :sourceNamespace
180
+
181
+ # allow keywords on everything
182
+ add_property :keywords, many: true
170
183
  end
171
184
 
172
185
  pick_type :DataType do
@@ -41,6 +41,11 @@
41
41
  rdfs:seeAlso schemaorg:Book;
42
42
  rdfs:subClassOf :CreativeWork .
43
43
 
44
+ :BookmarkAction a rdfs:Class;
45
+ rdfs:comment "An agent bookmarks/flags/labels/tags/marks an object.";
46
+ rdfs:seeAlso schemaorg:BookmarkAction;
47
+ rdfs:subClassOf :OrganizeAction .
48
+
44
49
  :Boolean a rdfs:Class;
45
50
  rdfs:comment "Boolean: True or False.";
46
51
  rdfs:seeAlso schemaorg:Boolean;
@@ -56,11 +61,25 @@
56
61
  rdfs:seeAlso schemaorg:City;
57
62
  rdfs:subClassOf :AdministrativeArea .
58
63
 
64
+ :Comment a rdfs:Class;
65
+ rdfs:comment "A comment on an item - for example, a comment on a blog post. The comment's content is expressed via the [[text]] property, and its topic via [[about]], properties shared with all CreativeWorks.";
66
+ rdfs:seeAlso schemaorg:Comment;
67
+ rdfs:subClassOf :CreativeWork .
68
+
69
+ :CommentAction a rdfs:Class;
70
+ rdfs:comment "The act of generating a comment about a subject.";
71
+ rdfs:seeAlso schemaorg:CommentAction;
72
+ rdfs:subClassOf :CommunicateAction .
73
+
59
74
  :CommunicateAction a rdfs:Class;
60
75
  rdfs:comment "The act of conveying information to another person via a communication medium (instrument) such as speech, email, or telephone conversation.";
61
76
  rdfs:seeAlso schemaorg:CommunicateAction;
62
77
  rdfs:subClassOf :InteractAction .
63
78
 
79
+ :ComputerCommand a rdfs:Class;
80
+ rdfs:comment "A command that can be executed on a computer.";
81
+ rdfs:subClassOf :CreativeWork .
82
+
64
83
  :ConsumeAction a rdfs:Class;
65
84
  rdfs:comment "The act of ingesting information/resources/food.";
66
85
  rdfs:seeAlso schemaorg:ConsumeAction;
@@ -71,6 +90,11 @@
71
90
  rdfs:seeAlso schemaorg:ContactPoint;
72
91
  rdfs:subClassOf :StructuredValue .
73
92
 
93
+ :ControlAction a rdfs:Class;
94
+ rdfs:comment "An agent controls a device or application.";
95
+ rdfs:seeAlso schemaorg:ControlAction;
96
+ rdfs:subClassOf :Action .
97
+
74
98
  :Country a rdfs:Class;
75
99
  rdfs:comment "A country.";
76
100
  rdfs:seeAlso schemaorg:Country;
@@ -211,6 +235,11 @@
211
235
  rdfs:seeAlso schemaorg:Organization;
212
236
  rdfs:subClassOf :Thing .
213
237
 
238
+ :OrganizeAction a rdfs:Class;
239
+ rdfs:comment "The act of manipulating/administering/supervising/controlling one or more objects.";
240
+ rdfs:seeAlso schemaorg:OrganizeAction;
241
+ rdfs:subClassOf :Action .
242
+
214
243
  :PerformingGroup a rdfs:Class;
215
244
  rdfs:comment "A performance group, such as a band, an orchestra, or a circus.";
216
245
  rdfs:seeAlso schemaorg:PerformingGroup;
@@ -509,11 +538,8 @@
509
538
  :URL .
510
539
 
511
540
  :keywords a rdf:Property;
512
- rdfs:comment "Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.";
513
- rdfs:seeAlso schemaorg:keywords;
514
- :domainIncludes :CreativeWork;
515
- :rangeIncludes :Text,
516
- :URL .
541
+ :domainIncludes :Thing;
542
+ :rangeIncludes :Text .
517
543
 
518
544
  :latitude a rdf:Property;
519
545
  rdfs:comment "The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronicle-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Louis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct