dbd_onto 0.0.10 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'terminal-notifier-guard'
25
25
  spec.add_development_dependency 'yard'
26
26
  spec.add_runtime_dependency 'rdf', '>= 1.0.9'
27
- spec.add_runtime_dependency 'ruby_peter_v', '>= 0.0.11'
28
- spec.add_runtime_dependency 'dbd', '>= 0.0.19'
27
+ spec.add_runtime_dependency 'ruby_peter_v', '>= 0.0.13'
28
+ spec.add_runtime_dependency 'dbd', '~> 0.1.0'
29
29
  # only needed for DbdOnto::Schema.generate
30
30
  spec.add_runtime_dependency 'rdf-rdfa', '>= 1.0.2'
31
31
  spec.add_runtime_dependency 'equivalent-xml'
@@ -5,3 +5,4 @@ require 'dbd_onto/base'
5
5
  require 'dbd_onto/context'
6
6
  require 'dbd_onto/meta'
7
7
  require 'dbd_onto/schema'
8
+ require 'dbd_onto/dbd'
@@ -4,41 +4,41 @@ module DbdOnto
4
4
  def initialize
5
5
  super
6
6
  self << meta_context
7
- self << context_definition
7
+ self << context_resource
8
8
  end
9
9
 
10
10
  private
11
11
 
12
- def context_definition
13
- Dbd::Graph.new.from_CSV(context_definition_csv)
12
+ def context_resource
13
+ ::Dbd::Graph.new.from_CSV(context_resource_csv)
14
14
  end
15
15
 
16
- def context_definition_csv
16
+ def context_resource_csv
17
17
  <<EOS
18
- "2013-09-04 20:06:29.398680722 UTC","49a95413-64b6-4f86-ad44-caa7b03931f6","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","meta:defines_predicate","context:visibility"
19
- "2013-09-04 20:06:29.398711938 UTC","1614f36e-5b64-43ef-9228-ef391dc2902a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","rdfs:label","Visibility"
20
- "2013-09-04 20:06:29.398712938 UTC","1614f36e-5b64-43ef-9228-ef391dc2902b","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
21
- "2013-09-04 20:06:29.398713938 UTC","1614f36e-5b64-43ef-9228-ef391dc2902c","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","rdfs:comment","E.g. public, private, professional, ..."
22
- "2013-09-04 20:06:29.398728011 UTC","886738b0-fcf8-455e-a5a1-3f192b3cbbc1","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","meta:defines_predicate","context:encryption"
23
- "2013-09-04 20:06:29.398743950 UTC","b85ea90d-01ea-4fc6-81b1-24cdabe9a968","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","rdfs:label","Encryption"
24
- "2013-09-04 20:06:29.398744950 UTC","b85ea90d-01ea-4fc6-81b1-24cdabe9a969","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
25
- "2013-09-04 20:06:29.398745950 UTC","b85ea90d-01ea-4fc6-81b1-24cdabe9a96a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","rdfs:comment","E.g. clear, encrypted, AES-256, my_very_secret_key"
26
- "2013-09-04 20:06:29.398758526 UTC","6d9b18f7-ed98-488e-8d67-bd830c51efbd","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","meta:defines_predicate","context:license"
27
- "2013-09-04 20:06:29.398775364 UTC","cd7d3d4a-d9c4-46e5-ba12-bc41938e50d4","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","rdfs:label","License"
28
- "2013-09-04 20:06:29.398776364 UTC","cd7d3d4a-d9c4-46e5-ba12-bc41938e50d5","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
29
- "2013-09-04 20:06:29.398777364 UTC","cd7d3d4a-d9c4-46e5-ba12-bc41938e50d6","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","rdfs:comment","E.g. Copyright 2013 Peter Vandenabeele (http://vandenabeele.com), licensed under MIT"
30
- "2013-09-04 20:06:29.411179884 UTC","a95a1e01-5701-41fa-ae57-5a93fc4e530e","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","meta:defines_predicate","dc:source"
31
- "2013-09-04 20:06:29.411232005 UTC","f063bd74-f767-47ed-a561-842eba382b79","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","rdfs:label","Source"
32
- "2013-09-04 20:06:29.411233005 UTC","f063bd74-f767-47ed-a561-842eba382b7a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
33
- "2013-09-04 20:06:29.411234005 UTC","f063bd74-f767-47ed-a561-842eba382b7b","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","rdfs:comment","E.g. Entered manually by @peter_v (also see Dublin Core)"
34
- "2013-09-04 20:06:29.411249613 UTC","8ebc54af-bfd9-47ad-8e19-c04282720743","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","meta:defines_predicate","dc:creator"
35
- "2013-09-04 20:06:29.411264605 UTC","6d726d47-31cb-43a9-9e6d-b44401149500","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","rdfs:label","Creator"
36
- "2013-09-04 20:06:29.411265605 UTC","6d726d47-31cb-43a9-9e6d-b44401149501","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
37
- "2013-09-04 20:06:29.411266605 UTC","6d726d47-31cb-43a9-9e6d-b44401149502","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","rdfs:comment","E.g. @peter_v (also see Dublin Core)"
38
- "2013-09-04 20:06:29.414653441 UTC","90b35dd7-baa3-49b7-a224-d67d3ccadb7a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","meta:defines_predicate","dcterms:created"
39
- "2013-09-04 20:06:29.414677275 UTC","1ed030cf-260d-4380-bbbf-84f7c7e9d753","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","rdfs:label","Created"
40
- "2013-09-04 20:06:29.414678275 UTC","1ed030cf-260d-4380-bbbf-84f7c7e9d753","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
41
- "2013-09-04 20:06:29.414679275 UTC","1ed030cf-260d-4380-bbbf-84f7c7e9d753","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","rdfs:comment","E.g. 2013-10-20 (also see Dublin Core Terms)"
18
+ "2013-09-04 20:06:29.398680722 UTC","49a95413-64b6-4f86-ad44-caa7b03931f6","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","meta:defines_predicate","s","context:visibility"
19
+ "2013-09-04 20:06:29.398711938 UTC","1614f36e-5b64-43ef-9228-ef391dc2902a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","rdfs:label","s","Visibility"
20
+ "2013-09-04 20:06:29.398712938 UTC","1614f36e-5b64-43ef-9228-ef391dc2902b","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
21
+ "2013-09-04 20:06:29.398713938 UTC","1614f36e-5b64-43ef-9228-ef391dc2902c","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","03e72b0c-041f-4afd-aab4-520db49b1fb1","rdfs:comment","s","E.g. public, private, professional, ..."
22
+ "2013-09-04 20:06:29.398728011 UTC","886738b0-fcf8-455e-a5a1-3f192b3cbbc1","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","meta:defines_predicate","s","context:encryption"
23
+ "2013-09-04 20:06:29.398743950 UTC","b85ea90d-01ea-4fc6-81b1-24cdabe9a968","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","rdfs:label","s","Encryption"
24
+ "2013-09-04 20:06:29.398744950 UTC","b85ea90d-01ea-4fc6-81b1-24cdabe9a969","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
25
+ "2013-09-04 20:06:29.398745950 UTC","b85ea90d-01ea-4fc6-81b1-24cdabe9a96a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","735ae2a2-ed1f-405a-808a-07117cd6888c","rdfs:comment","s","E.g. clear, encrypted, AES-256, my_very_secret_key"
26
+ "2013-09-04 20:06:29.398758526 UTC","6d9b18f7-ed98-488e-8d67-bd830c51efbd","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","meta:defines_predicate","s","context:license"
27
+ "2013-09-04 20:06:29.398775364 UTC","cd7d3d4a-d9c4-46e5-ba12-bc41938e50d4","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","rdfs:label","s","License"
28
+ "2013-09-04 20:06:29.398776364 UTC","cd7d3d4a-d9c4-46e5-ba12-bc41938e50d5","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
29
+ "2013-09-04 20:06:29.398777364 UTC","cd7d3d4a-d9c4-46e5-ba12-bc41938e50d6","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","5b2c73e5-490c-47e0-a014-592d8665ba58","rdfs:comment","s","E.g. Copyright 2013 Peter Vandenabeele (http://vandenabeele.com), licensed under MIT"
30
+ "2013-09-04 20:06:29.411179884 UTC","a95a1e01-5701-41fa-ae57-5a93fc4e530e","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","meta:defines_predicate","s","dc:source"
31
+ "2013-09-04 20:06:29.411232005 UTC","f063bd74-f767-47ed-a561-842eba382b79","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","rdfs:label","s","Source"
32
+ "2013-09-04 20:06:29.411233005 UTC","f063bd74-f767-47ed-a561-842eba382b7a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
33
+ "2013-09-04 20:06:29.411234005 UTC","f063bd74-f767-47ed-a561-842eba382b7b","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","ffc41d9c-ba51-4121-ae01-c2b04234b5f0","rdfs:comment","s","E.g. Entered manually by @peter_v (also see Dublin Core)"
34
+ "2013-09-04 20:06:29.411249613 UTC","8ebc54af-bfd9-47ad-8e19-c04282720743","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","meta:defines_predicate","s","dc:creator"
35
+ "2013-09-04 20:06:29.411264605 UTC","6d726d47-31cb-43a9-9e6d-b44401149500","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","rdfs:label","s","Creator"
36
+ "2013-09-04 20:06:29.411265605 UTC","6d726d47-31cb-43a9-9e6d-b44401149501","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
37
+ "2013-09-04 20:06:29.411266605 UTC","6d726d47-31cb-43a9-9e6d-b44401149502","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","2b5008b0-e12d-4aa2-8bb1-f9c20c36f8ef","rdfs:comment","s","E.g. @peter_v (also see Dublin Core)"
38
+ "2013-09-04 20:06:29.414653441 UTC","90b35dd7-baa3-49b7-a224-d67d3ccadb7a","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","meta:defines_predicate","s","dcterms:created"
39
+ "2013-09-04 20:06:29.414677275 UTC","1ed030cf-260d-4380-bbbf-84f7c7e9d753","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","rdfs:label","s","Created"
40
+ "2013-09-04 20:06:29.414678275 UTC","1ed030cf-260d-4380-bbbf-84f7c7e9d753","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/context.md"
41
+ "2013-09-04 20:06:29.414679275 UTC","1ed030cf-260d-4380-bbbf-84f7c7e9d753","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","4aba46de-f35a-4754-913d-bdc4c926fc73","rdfs:comment","s","E.g. 2013-10-20 (also see Dublin Core Terms)"
42
42
  EOS
43
43
  end
44
44
  end
@@ -0,0 +1,26 @@
1
+ module DbdOnto
2
+ class Dbd < Base
3
+
4
+ def initialize
5
+ super
6
+ self << meta_context
7
+ self << dbd_resource
8
+ end
9
+
10
+ private
11
+
12
+ def dbd_resource
13
+ ::Dbd::Graph.new.from_CSV(dbd_resource_csv)
14
+ end
15
+
16
+ def dbd_resource_csv
17
+ <<EOS
18
+ "2013-10-23 19:41:36.627034414 UTC","1e84b23b-edf0-49f5-8ad3-76182dcfa134","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e127c","meta:defines_predicate","s","dbd:rdf_uri"
19
+ "2013-10-23 19:41:36.627066056 UTC","96d595be-205d-4c3a-8724-35b46457f9fd","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e127c","rdfs:label","s","RDF URI"
20
+ "2013-10-23 19:41:36.627067056 UTC","96d595be-205d-4c3a-8724-35b46457f9fe","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e127c","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/dbd.md"
21
+ "2013-10-23 19:41:36.627068056 UTC","96d595be-205d-4c3a-8724-35b46457f9ff","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e127c","rdfs:comment","s","points to an RDF URI type, without the <> characters"
22
+ EOS
23
+ end
24
+
25
+ end
26
+ end
@@ -10,19 +10,19 @@ module DbdOnto
10
10
  private
11
11
 
12
12
  def meta_resource
13
- Dbd::Graph.new.from_CSV(meta_resource_csv)
13
+ ::Dbd::Graph.new.from_CSV(meta_resource_csv)
14
14
  end
15
15
 
16
16
  def meta_resource_csv
17
17
  <<EOS
18
- "2013-09-03 21:41:36.627034414 UTC","1e84b23b-edf0-49f5-8ad3-76182dcfa124","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","meta:defines_predicate","meta:defines_predicate"
19
- "2013-09-03 21:41:36.627066056 UTC","96d595be-205d-4c3a-8724-35b46457f9ed","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","rdfs:label","Defines predicate"
20
- "2013-09-03 21:41:36.627067056 UTC","96d595be-205d-4c3a-8724-35b46457f9ee","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/meta.md"
21
- "2013-09-03 21:41:36.627068056 UTC","96d595be-205d-4c3a-8724-35b46457f9ef","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","rdfs:comment","Needed to bootstrap ontology definitions"
22
- "2013-09-03 21:41:36.627069056 UTC","1e84b23b-edf0-49f5-8ad3-76182dcfa125","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","meta:defines_predicate","meta:predicate_used"
23
- "2013-09-03 21:41:36.627070056 UTC","96d595be-205d-4c3a-8724-35b46457f9f0","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","rdfs:label","Predicate used"
24
- "2013-09-03 21:41:36.627071056 UTC","96d595be-205d-4c3a-8724-35b46457f9f1","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","rdf:uri","https://github.com/petervandenabeele/dbd_onto/blob/master/data/meta.md"
25
- "2013-09-03 21:41:36.627072056 UTC","96d595be-205d-4c3a-8724-35b46457f9f2","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","rdfs:comment","Is this predicate used in the UI for creating new resources?"
18
+ "2013-09-03 21:41:36.627034414 UTC","1e84b23b-edf0-49f5-8ad3-76182dcfa124","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","meta:defines_predicate","s","meta:defines_predicate"
19
+ "2013-09-03 21:41:36.627066056 UTC","96d595be-205d-4c3a-8724-35b46457f9ed","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","rdfs:label","s","Defines predicate"
20
+ "2013-09-03 21:41:36.627067056 UTC","96d595be-205d-4c3a-8724-35b46457f9ee","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/meta.md"
21
+ "2013-09-03 21:41:36.627068056 UTC","96d595be-205d-4c3a-8724-35b46457f9ef","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126c","rdfs:comment","s","Needed to bootstrap ontology definitions"
22
+ "2013-09-03 21:41:36.627069056 UTC","1e84b23b-edf0-49f5-8ad3-76182dcfa125","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","meta:defines_predicate","s","meta:predicate_used"
23
+ "2013-09-03 21:41:36.627070056 UTC","96d595be-205d-4c3a-8724-35b46457f9f0","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","rdfs:label","s","Predicate used"
24
+ "2013-09-03 21:41:36.627071056 UTC","96d595be-205d-4c3a-8724-35b46457f9f1","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","dbd:rdf_uri","s","https://github.com/petervandenabeele/dbd_onto/blob/master/data/meta.md"
25
+ "2013-09-03 21:41:36.627072056 UTC","96d595be-205d-4c3a-8724-35b46457f9f2","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","619e69d4-6dad-4b14-bfce-8fd67d8e126d","rdfs:comment","s","Is this predicate used in the UI for creating new resources?"
26
26
  EOS
27
27
  end
28
28
 
@@ -12,30 +12,30 @@ module DbdOnto
12
12
  private
13
13
 
14
14
  def fixed_context(csv_string)
15
- graph = Dbd::Graph.new.from_CSV(csv_string)
16
- subject = graph.subjects.single
17
- Dbd::Context.new(subject: subject) << graph
15
+ graph = ::Dbd::Graph.new.from_CSV(csv_string)
16
+ graph.contexts.single
18
17
  end
19
18
 
20
19
  def fixed_meta_context_csv
21
20
  <<EOS
22
- "2013-09-03 20:54:42.473735776 UTC","d680b54c-5aad-44a7-9e9e-c8d7a7084275","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:visibility","public"
23
- "2013-09-03 20:54:42.473775562 UTC","be5b97ec-d026-4a73-b8fb-a13995966ec0","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:encryption","clear"
24
- "2013-09-03 20:54:42.473796239 UTC","1251e568-f7e6-44bf-b5b0-54c15cefe5d9","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:license","Copyright 2013 Peter Vandenabeele (http://vandenabeele.com), licensed under MIT license."
25
- "2013-09-03 20:54:42.473812175 UTC","c73715de-4cb3-4022-93c6-fb9ec95851be","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:source","https://github.com/petervandenabeele/dbd/blob/d37360070e7f8e61a19c2bca210c881a151ded75/docs/rationale.md"
26
- "2013-09-03 20:54:42.473828787 UTC","3aaa9125-6278-4a70-9a40-7f2baf32ad99","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:creator","Peter Vandenabeele (@peter_v)"
27
- "2013-09-03 20:54:42.473845509 UTC","9324e4bc-5922-463b-8fc6-521ca5585c22","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","dcterms:created","2013-08-09 21:45:00 UTC"
21
+ "2013-09-03 20:54:42.473735776 UTC","d680b54c-5aad-44a7-9e9e-c8d7a7084275","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:visibility","s","public"
22
+ "2013-09-03 20:54:42.473775562 UTC","be5b97ec-d026-4a73-b8fb-a13995966ec0","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:encryption","s","clear"
23
+ "2013-09-03 20:54:42.473796239 UTC","1251e568-f7e6-44bf-b5b0-54c15cefe5d9","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:license","s","Copyright 2013 Peter Vandenabeele (http://vandenabeele.com), licensed under MIT license."
24
+ "2013-09-03 20:54:42.473812175 UTC","c73715de-4cb3-4022-93c6-fb9ec95851be","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:source","s","https://github.com/petervandenabeele/dbd/blob/d37360070e7f8e61a19c2bca210c881a151ded75/docs/rationale.md"
25
+ "2013-09-03 20:54:42.473828787 UTC","3aaa9125-6278-4a70-9a40-7f2baf32ad99","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:creator","s","Peter Vandenabeele (@peter_v)"
26
+ "2013-09-03 20:54:42.473845509 UTC","9324e4bc-5922-463b-8fc6-521ca5585c22","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","dcterms:created","s","2013-08-09 21:45:00 UTC"
27
+ "2013-09-03 20:54:42.473846509 UTC","9324e4bc-5922-463b-8fc6-521ca5585c23","","36c0b50f-834e-45f5-a911-e3f2b47fe4b9","rdfs:comment","s","This meta context covers a creation period starting Aug 2013 until ..."
28
28
  EOS
29
29
  end
30
30
 
31
31
  def fixed_schema_context_csv
32
32
  <<EOS
33
- "2013-10-14 21:43:42.473735776 UTC","d780b54c-5aad-44a7-9e9e-c8d7a7084276","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:visibility","public"
34
- "2013-10-14 21:43:42.473775562 UTC","bf5b97ec-d026-4a73-b8fb-a13995966ec1","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:encryption","clear"
35
- "2013-10-14 21:43:42.473796239 UTC","1351e568-f7e6-44bf-b5b0-54c15cefe5e0","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:license","Copyright the sponsors of Schema.org: Google, Inc., Yahoo, Inc., and Microsoft Corporation. Licensed under Creative Commons Attribution-ShareAlike License (version 3.0) (see http://schema.org/docs/terms.html)"
36
- "2013-10-14 21:43:42.473812175 UTC","c83715de-4cb3-4022-93c6-fb9ec95851bf","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:source","http://schema.org"
37
- "2013-10-14 21:43:42.473828787 UTC","3baa9125-6278-4a70-9a40-7f2baf32ae00","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:creator","Peter Vandenabeele (@peter_v)"
38
- "2013-10-14 21:43:42.473845509 UTC","9424e4bc-5922-463b-8fc6-521ca5585c23","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","dcterms:created","2013-10-15 21:56:00 UTC"
33
+ "2013-10-14 21:43:42.473735776 UTC","d780b54c-5aad-44a7-9e9e-c8d7a7084276","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:visibility","s","public"
34
+ "2013-10-14 21:43:42.473775562 UTC","bf5b97ec-d026-4a73-b8fb-a13995966ec1","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:encryption","s","clear"
35
+ "2013-10-14 21:43:42.473796239 UTC","1351e568-f7e6-44bf-b5b0-54c15cefe5e0","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","context:license","s","Copyright the sponsors of Schema.org: Google, Inc., Yahoo, Inc., and Microsoft Corporation. Licensed under Creative Commons Attribution-ShareAlike License (version 3.0) (see http://schema.org/docs/terms.html)"
36
+ "2013-10-14 21:43:42.473812175 UTC","c83715de-4cb3-4022-93c6-fb9ec95851bf","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:source","s","http://schema.org"
37
+ "2013-10-14 21:43:42.473828787 UTC","3baa9125-6278-4a70-9a40-7f2baf32ae00","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","dc:creator","s","Peter Vandenabeele (@peter_v)"
38
+ "2013-10-14 21:43:42.473845509 UTC","9424e4bc-5922-463b-8fc6-521ca5585c23","","37c0b50f-834e-45f5-a911-e3f2b47fe4b9","dcterms:created","s","2013-10-15 21:56:00 UTC"
39
39
  EOS
40
40
  end
41
41
  end
@@ -67,6 +67,7 @@ module DbdOnto
67
67
  properties_hash.each do |predicate, object|
68
68
  resource << Dbd::Fact.new(
69
69
  predicate: predicate,
70
+ object_type: 's', # should 'u' for the uri
70
71
  object: object)
71
72
  end
72
73
  schema_resource << resource
@@ -1,3 +1,3 @@
1
1
  module DbdOnto
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -90,7 +90,7 @@ describe DbdOnto::Context do
90
90
 
91
91
  def assert_uri_present(resource)
92
92
  resource.detect do |fact|
93
- fact.predicate == 'rdf:uri'
93
+ fact.predicate == 'dbd:rdf_uri'
94
94
  end.should_not be_nil
95
95
  end
96
96
 
@@ -0,0 +1,69 @@
1
+ require 'spec_helper'
2
+
3
+ describe DbdOnto::Dbd do
4
+
5
+ include Spec::Context
6
+
7
+ it 'is a Dbd::Graph' do
8
+ subject.should be_a(Dbd::Graph)
9
+ end
10
+
11
+ it 'all facts in the dbd ontology have the meta context as context' do
12
+ subject.all? do |fact|
13
+ begin
14
+ fact.is_a?(Dbd::ContextFact) ||
15
+ check_context?(subject.by_subject(fact.context_subject))
16
+ end
17
+ end.should be_true
18
+ end
19
+
20
+ describe 'properties include' do
21
+
22
+ let(:rdf_uri_subject) do
23
+ subject.detect do |fact|
24
+ begin
25
+ fact.predicate == 'meta:defines_predicate' &&
26
+ fact.object == 'dbd:rdf_uri'
27
+ end
28
+ end.subject
29
+ end
30
+
31
+ def assert_uri_present(resource)
32
+ resource.detect do |fact|
33
+ fact.predicate == 'dbd:rdf_uri'
34
+ end.should_not be_nil
35
+ end
36
+
37
+ def assert_comment_present(resource)
38
+ resource.detect do |fact|
39
+ fact.predicate == 'rdfs:comment'
40
+ end.should_not be_nil
41
+ end
42
+
43
+ describe 'dbd:rdf_uri' do
44
+
45
+ let(:rdf_uri_facts) { subject.by_subject(rdf_uri_subject) }
46
+
47
+ it 'defines the predicate dbd:rdf_uri' do
48
+ rdf_uri_facts.should_not be_nil
49
+ end
50
+
51
+ it 'has label RDF URI' do
52
+ rdf_uri_facts.detect do |fact|
53
+ begin
54
+ fact.predicate == 'rdfs:label' &&
55
+ fact.object == 'RDF URI'
56
+ end
57
+ end.should_not be_nil
58
+ end
59
+
60
+ it 'has a uri' do
61
+ assert_uri_present(rdf_uri_facts)
62
+ end
63
+
64
+ it 'has a Comment' do
65
+ assert_comment_present(rdf_uri_facts)
66
+ end
67
+ end
68
+ end
69
+ end
@@ -47,7 +47,7 @@ describe DbdOnto::Meta do
47
47
 
48
48
  it 'has a URI' do
49
49
  defines_predicate_facts.detect do |fact|
50
- fact.predicate == 'rdf:uri'
50
+ fact.predicate == 'dbd:rdf_uri'
51
51
  end.should_not be_nil
52
52
  end
53
53
 
@@ -36,10 +36,10 @@ describe DbdOnto::Schema do
36
36
  end.should_not be_nil
37
37
  end
38
38
 
39
- it 'defines predicate rdf:uri' do
39
+ it 'defines predicate dbd:rdf_uri' do
40
40
  subject.detect do |fact|
41
41
  begin
42
- fact.predicate == 'rdf:uri' &&
42
+ fact.predicate == 'dbd:rdf_uri' &&
43
43
  fact.object == 'http://schema.org/unitCode'
44
44
  end
45
45
  end.should_not be_nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbd_onto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenabeele
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-20 00:00:00.000000000 Z
11
+ date: 2013-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - '>='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.0.11
103
+ version: 0.0.13
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '>='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.0.11
110
+ version: 0.0.13
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: dbd
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 0.0.19
117
+ version: 0.1.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: 0.0.19
124
+ version: 0.1.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rdf-rdfa
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -168,18 +168,21 @@ files:
168
168
  - README.md
169
169
  - Rakefile
170
170
  - data/context.md
171
+ - data/dbd.md
171
172
  - data/meta.md
172
173
  - data/schema_data.csv
173
174
  - dbd_onto.gemspec
174
175
  - lib/dbd_onto.rb
175
176
  - lib/dbd_onto/base.rb
176
177
  - lib/dbd_onto/context.rb
178
+ - lib/dbd_onto/dbd.rb
177
179
  - lib/dbd_onto/meta.rb
178
180
  - lib/dbd_onto/meta_context.rb
179
181
  - lib/dbd_onto/schema.rb
180
182
  - lib/dbd_onto/version.rb
181
183
  - spec/lib/dbd_onto/base_spec.rb
182
184
  - spec/lib/dbd_onto/context_spec.rb
185
+ - spec/lib/dbd_onto/dbd_spec.rb
183
186
  - spec/lib/dbd_onto/meta_context_spec.rb
184
187
  - spec/lib/dbd_onto/meta_spec.rb
185
188
  - spec/lib/dbd_onto/schema_spec.rb
@@ -212,6 +215,7 @@ summary: Ontologies for Dbd
212
215
  test_files:
213
216
  - spec/lib/dbd_onto/base_spec.rb
214
217
  - spec/lib/dbd_onto/context_spec.rb
218
+ - spec/lib/dbd_onto/dbd_spec.rb
215
219
  - spec/lib/dbd_onto/meta_context_spec.rb
216
220
  - spec/lib/dbd_onto/meta_spec.rb
217
221
  - spec/lib/dbd_onto/schema_spec.rb