bio-publisci 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +13 -0
  4. data/Gemfile +24 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.md +47 -0
  7. data/README.rdoc +48 -0
  8. data/Rakefile +70 -0
  9. data/bin/bio-publisci +83 -0
  10. data/features/create_generator.feature +25 -0
  11. data/features/integration.feature +12 -0
  12. data/features/integration_steps.rb +10 -0
  13. data/features/orm.feature +60 -0
  14. data/features/orm_steps.rb +74 -0
  15. data/features/reader.feature +25 -0
  16. data/features/reader_steps.rb +60 -0
  17. data/features/step_definitions/bio-publisci_steps.rb +0 -0
  18. data/features/store.feature +27 -0
  19. data/features/store_steps.rb +42 -0
  20. data/features/support/env.rb +13 -0
  21. data/features/writer.feature +9 -0
  22. data/features/writer_steps.rb +17 -0
  23. data/lib/bio-publisci/analyzer.rb +57 -0
  24. data/lib/bio-publisci/dataset/ORM/data_cube_orm.rb +219 -0
  25. data/lib/bio-publisci/dataset/ORM/observation.rb +20 -0
  26. data/lib/bio-publisci/dataset/data_cube.rb +308 -0
  27. data/lib/bio-publisci/dataset/interactive.rb +57 -0
  28. data/lib/bio-publisci/loader.rb +36 -0
  29. data/lib/bio-publisci/metadata/metadata.rb +105 -0
  30. data/lib/bio-publisci/parser.rb +64 -0
  31. data/lib/bio-publisci/query/query_helper.rb +114 -0
  32. data/lib/bio-publisci/r_client.rb +54 -0
  33. data/lib/bio-publisci/readers/arff.rb +87 -0
  34. data/lib/bio-publisci/readers/big_cross.rb +119 -0
  35. data/lib/bio-publisci/readers/cross.rb +72 -0
  36. data/lib/bio-publisci/readers/csv.rb +54 -0
  37. data/lib/bio-publisci/readers/dataframe.rb +66 -0
  38. data/lib/bio-publisci/readers/r_matrix.rb +152 -0
  39. data/lib/bio-publisci/store.rb +56 -0
  40. data/lib/bio-publisci/writers/arff.rb +66 -0
  41. data/lib/bio-publisci/writers/dataframe.rb +81 -0
  42. data/lib/bio-publisci.rb +36 -0
  43. data/lib/r2rdf.rb +226 -0
  44. data/lib/template_bak/publisci.rb +3 -0
  45. data/lib/template_bak.rb +12 -0
  46. data/lib/vocabs/cc.rb +18 -0
  47. data/lib/vocabs/cert.rb +13 -0
  48. data/lib/vocabs/dc.rb +63 -0
  49. data/lib/vocabs/dc11.rb +23 -0
  50. data/lib/vocabs/doap.rb +45 -0
  51. data/lib/vocabs/exif.rb +168 -0
  52. data/lib/vocabs/foaf.rb +69 -0
  53. data/lib/vocabs/geo.rb +13 -0
  54. data/lib/vocabs/http.rb +26 -0
  55. data/lib/vocabs/ma.rb +78 -0
  56. data/lib/vocabs/owl.rb +59 -0
  57. data/lib/vocabs/rdfs.rb +17 -0
  58. data/lib/vocabs/rsa.rb +12 -0
  59. data/lib/vocabs/rss.rb +14 -0
  60. data/lib/vocabs/sioc.rb +93 -0
  61. data/lib/vocabs/skos.rb +36 -0
  62. data/lib/vocabs/wot.rb +21 -0
  63. data/lib/vocabs/xhtml.rb +9 -0
  64. data/lib/vocabs/xsd.rb +58 -0
  65. data/resources/queries/codes.rq +13 -0
  66. data/resources/queries/dataset.rq +7 -0
  67. data/resources/queries/dimension_ranges.rq +8 -0
  68. data/resources/queries/dimensions.rq +7 -0
  69. data/resources/queries/measures.rq +7 -0
  70. data/resources/queries/observations.rq +12 -0
  71. data/resources/queries/test.rq +3 -0
  72. data/resources/weather.numeric.arff +23 -0
  73. data/spec/analyzer_spec.rb +36 -0
  74. data/spec/bio-publisci_spec.rb +7 -0
  75. data/spec/csv/bacon.csv +4 -0
  76. data/spec/csv/moar_bacon.csv +11 -0
  77. data/spec/data_cube_spec.rb +166 -0
  78. data/spec/generators/csv_spec.rb +44 -0
  79. data/spec/generators/dataframe_spec.rb +44 -0
  80. data/spec/generators/r_matrix_spec.rb +35 -0
  81. data/spec/queries/integrity/1.rq +21 -0
  82. data/spec/queries/integrity/11.rq +29 -0
  83. data/spec/queries/integrity/12.rq +37 -0
  84. data/spec/queries/integrity/14.rq +25 -0
  85. data/spec/queries/integrity/19_1.rq +21 -0
  86. data/spec/queries/integrity/19_2.rq +15 -0
  87. data/spec/queries/integrity/2.rq +22 -0
  88. data/spec/queries/integrity/3.rq +19 -0
  89. data/spec/queries/integrity/4.rq +13 -0
  90. data/spec/queries/integrity/5.rq +14 -0
  91. data/spec/r_builder_spec.rb +33 -0
  92. data/spec/spec_helper.rb +17 -0
  93. data/spec/turtle/bacon +149 -0
  94. data/spec/turtle/reference +2066 -0
  95. metadata +259 -0
data/spec/turtle/bacon ADDED
@@ -0,0 +1,149 @@
1
+ @base <http://www.rqtl.org/ns/dc/> .
2
+ @prefix ns: <http://www.rqtl.org/ns/dataset/bacon#> .
3
+ @prefix qb: <http://purl.org/linked-data/cube#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6
+ @prefix prop: <http://www.rqtl.org/dc/properties/> .
7
+ @prefix dct: <http://purl.org/dc/terms/> .
8
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
+ @prefix cs: <http://www.rqtl.org/dc/dataset/bacon/cs/> .
10
+ @prefix code: <http://www.rqtl.org/dc/dataset/bacon/code/> .
11
+ @prefix class: <http://www.rqtl.org/dc/dataset/bacon/class/> .
12
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
13
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
14
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
15
+ @prefix org: <http://www.w3.org/ns/org#> .
16
+ @prefix prov: <http://www.w3.org/ns/prov#> .
17
+
18
+ ns:dsd-bacon a qb:DataStructureDefinition;
19
+ qb:component
20
+ cs:chunkiness ,
21
+ cs:deliciousness ,
22
+ cs:producer ,
23
+ cs:pricerange .
24
+
25
+ ns:dataset-bacon a qb:DataSet ;
26
+ rdfs:label "bacon"@en ;
27
+ qb:structure ns:dsd-bacon .
28
+
29
+ cs:producer a qb:ComponentSpecification ;
30
+ rdfs:label "producer Component" ;
31
+ qb:dimension prop:producer .
32
+
33
+ cs:pricerange a qb:ComponentSpecification ;
34
+ rdfs:label "pricerange Component" ;
35
+ qb:dimension prop:pricerange .
36
+
37
+ cs:chunkiness a qb:ComponentSpecification ;
38
+ rdfs:label "chunkiness Component" ;
39
+ qb:measure prop:chunkiness .
40
+
41
+ cs:deliciousness a qb:ComponentSpecification ;
42
+ rdfs:label "deliciousness Component" ;
43
+ qb:measure prop:deliciousness .
44
+
45
+ prop:producer a rdf:Property, qb:DimensionProperty ;
46
+ rdfs:label "producer"@en ;
47
+ qb:codeList code:producer ;
48
+ rdfs:range code:Producer .
49
+
50
+ prop:pricerange a rdf:Property, qb:DimensionProperty ;
51
+ rdfs:label "pricerange"@en ;
52
+ qb:codeList code:pricerange ;
53
+ rdfs:range code:Pricerange .
54
+
55
+ prop:chunkiness a rdf:Property, qb:MeasureProperty ;
56
+ rdfs:label "chunkiness"@en .
57
+
58
+ prop:deliciousness a rdf:Property, qb:MeasureProperty ;
59
+ rdfs:label "deliciousness"@en .
60
+
61
+ code:Producer a rdfs:Class, owl:Class;
62
+ rdfs:subClassOf skos:Concept ;
63
+ rdfs:label "Code list for producer - codelist class"@en;
64
+ rdfs:comment "Specifies the producer for each observation";
65
+ rdfs:seeAlso code:producer .
66
+
67
+ code:producer a skos:ConceptScheme;
68
+ skos:prefLabel "Code list for producer - codelist scheme"@en;
69
+ rdfs:label "Code list for producer - codelist scheme"@en;
70
+ skos:notation "CL_PRODUCER";
71
+ skos:note "Specifies the producer for each observation";
72
+ skos:hasTopConcept <code/producer/hormel> ;
73
+ skos:hasTopConcept <code/producer/newskies> ;
74
+ skos:hasTopConcept <code/producer/whys> ;
75
+ .
76
+
77
+ code:Pricerange a rdfs:Class, owl:Class;
78
+ rdfs:subClassOf skos:Concept ;
79
+ rdfs:label "Code list for pricerange - codelist class"@en;
80
+ rdfs:comment "Specifies the pricerange for each observation";
81
+ rdfs:seeAlso code:pricerange .
82
+
83
+ code:pricerange a skos:ConceptScheme;
84
+ skos:prefLabel "Code list for pricerange - codelist scheme"@en;
85
+ rdfs:label "Code list for pricerange - codelist scheme"@en;
86
+ skos:notation "CL_PRICERANGE";
87
+ skos:note "Specifies the pricerange for each observation";
88
+ skos:hasTopConcept <code/pricerange/low> ;
89
+ skos:hasTopConcept <code/pricerange/medium> ;
90
+ skos:hasTopConcept <code/pricerange/nonexistant> ;
91
+ .
92
+
93
+ <code/producer/hormel> a skos:Concept, code:Producer;
94
+ skos:topConceptOf code:producer ;
95
+ skos:prefLabel "hormel" ;
96
+ skos:inScheme code:producer .
97
+
98
+ <code/producer/newskies> a skos:Concept, code:Producer;
99
+ skos:topConceptOf code:producer ;
100
+ skos:prefLabel "newskies" ;
101
+ skos:inScheme code:producer .
102
+
103
+ <code/producer/whys> a skos:Concept, code:Producer;
104
+ skos:topConceptOf code:producer ;
105
+ skos:prefLabel "whys" ;
106
+ skos:inScheme code:producer .
107
+
108
+ <code/pricerange/low> a skos:Concept, code:Pricerange;
109
+ skos:topConceptOf code:pricerange ;
110
+ skos:prefLabel "low" ;
111
+ skos:inScheme code:pricerange .
112
+
113
+ <code/pricerange/medium> a skos:Concept, code:Pricerange;
114
+ skos:topConceptOf code:pricerange ;
115
+ skos:prefLabel "medium" ;
116
+ skos:inScheme code:pricerange .
117
+
118
+ <code/pricerange/nonexistant> a skos:Concept, code:Pricerange;
119
+ skos:topConceptOf code:pricerange ;
120
+ skos:prefLabel "nonexistant" ;
121
+ skos:inScheme code:pricerange .
122
+
123
+ ns:obshormel a qb:Observation ;
124
+ qb:dataSet ns:dataset-bacon ;
125
+ rdfs:label "hormel" ;
126
+ prop:producer <code/producer/hormel> ;
127
+ prop:pricerange <code/pricerange/low> ;
128
+ prop:chunkiness 1 ;
129
+ prop:deliciousness 1 ;
130
+ .
131
+
132
+ ns:obsnewskies a qb:Observation ;
133
+ qb:dataSet ns:dataset-bacon ;
134
+ rdfs:label "newskies" ;
135
+ prop:producer <code/producer/newskies> ;
136
+ prop:pricerange <code/pricerange/medium> ;
137
+ prop:chunkiness 6 ;
138
+ prop:deliciousness 9 ;
139
+ .
140
+
141
+ ns:obswhys a qb:Observation ;
142
+ qb:dataSet ns:dataset-bacon ;
143
+ rdfs:label "whys" ;
144
+ prop:producer <code/producer/whys> ;
145
+ prop:pricerange <code/pricerange/nonexistant> ;
146
+ prop:chunkiness 9001 ;
147
+ prop:deliciousness 6 ;
148
+ .
149
+