easy_data 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -0
- data/Rakefile +4 -0
- data/easy_data.gemspec +4 -1
- data/lib/controllers/easy_datas_controller.rb +122 -21
- data/lib/data_models/data_models.rb +25 -19
- data/lib/data_models/model_rdf.rb +156 -0
- data/lib/data_models/namespaces/cc.rb +36 -0
- data/lib/data_models/namespaces/cert.rb +33 -0
- data/lib/data_models/namespaces/dc.rb +87 -0
- data/lib/data_models/namespaces/dc11.rb +47 -0
- data/lib/data_models/namespaces/doap.rb +68 -0
- data/lib/data_models/namespaces/exif.rb +192 -0
- data/lib/data_models/namespaces/foaf.rb +93 -0
- data/lib/data_models/namespaces/geo.rb +35 -0
- data/lib/data_models/namespaces/http.rb +50 -0
- data/lib/data_models/namespaces/owl.rb +83 -0
- data/lib/data_models/namespaces/rdfs.rb +41 -0
- data/lib/data_models/namespaces/rsa.rb +35 -0
- data/lib/data_models/namespaces/rss.rb +38 -0
- data/lib/data_models/namespaces/sioc.rb +110 -0
- data/lib/data_models/namespaces/skos.rb +61 -0
- data/lib/data_models/namespaces/wot.rb +45 -0
- data/lib/data_models/namespaces/xhtml.rb +32 -0
- data/lib/data_models/namespaces/xsd.rb +77 -0
- data/lib/data_models/namespaces.rb +28 -0
- data/lib/data_models/parser_rdf.rb +22 -0
- data/lib/easy_data/tasks.rb +86 -0
- data/lib/easy_data/templates/easy_datas/_list_properties.html.erb +24 -0
- data/lib/easy_data/templates/easy_datas/_list_properties_edit.html.erb +34 -0
- data/lib/easy_data/templates/easy_datas/_model_attributes.html.erb +27 -0
- data/lib/easy_data/templates/easy_datas/_model_attributes_edit.html.erb +13 -0
- data/lib/easy_data/templates/easy_datas/custom_rdf.html.erb +23 -0
- data/lib/easy_data/templates/easy_datas/show.html.erb +1 -0
- data/lib/easy_data/templates/easy_datas/show.xml.builder +16 -0
- data/lib/easy_data/templates/layouts/easy_data_layout.html.erb +15 -0
- data/lib/easy_data/templates/rdf/request.xml.builder +1 -0
- data/lib/easy_data/templates/rdf/show.builder +1 -0
- data/lib/easy_data/templates/stylesheets/.easy_data_style.css.swp +0 -0
- data/lib/easy_data/templates/stylesheets/easy_data_style.css +10 -0
- data/lib/easy_data/version.rb +1 -1
- data/lib/easy_data.rb +51 -2
- data/lib/routes.rb +38 -6
- data/lib/tasks/.rakes.rb.swp +0 -0
- data/lib/tasks/testing_installation.rb +2 -2
- metadata +72 -6
@@ -0,0 +1,68 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class DOAP < Namespaces
|
4
|
+
@@uri = "http://usefulinc.com/ns/doap#"
|
5
|
+
|
6
|
+
@@properties= {"'anon-root'" => "",
|
7
|
+
"audience" => "",
|
8
|
+
"blog" => "",
|
9
|
+
"browse" => "",
|
10
|
+
"'bug-database'" => "",
|
11
|
+
"category" => "",
|
12
|
+
"created" => "",
|
13
|
+
"description" => "",
|
14
|
+
"developer" => "",
|
15
|
+
"documenter" => "",
|
16
|
+
"'download-mirror'" => "",
|
17
|
+
"'download-page'" => "",
|
18
|
+
"'file-release'" => "",
|
19
|
+
"helper" => "",
|
20
|
+
"homepage" => "",
|
21
|
+
"implements" => "",
|
22
|
+
"language" => "",
|
23
|
+
"license" => "",
|
24
|
+
"location" => "",
|
25
|
+
"'mailing-list'" => "",
|
26
|
+
"maintainer" => "",
|
27
|
+
"module" => "",
|
28
|
+
"name" => "",
|
29
|
+
"'old-homepage'" => "",
|
30
|
+
"os" => "",
|
31
|
+
"platform" => "",
|
32
|
+
"'programming-language'" => "",
|
33
|
+
"release" => "",
|
34
|
+
"repository" => "",
|
35
|
+
"revision" => "",
|
36
|
+
"screenshots" => "",
|
37
|
+
"'service-endpoint'" => "",
|
38
|
+
"shortdesc" => "",
|
39
|
+
"tester" => "",
|
40
|
+
"translator" => "",
|
41
|
+
"vendor" => "",
|
42
|
+
"wiki" => ""
|
43
|
+
}
|
44
|
+
|
45
|
+
# Return Namespace URI
|
46
|
+
def self.get_uri
|
47
|
+
@@uri
|
48
|
+
end
|
49
|
+
|
50
|
+
# Return tag to rdf doc
|
51
|
+
def self.to_s(property,uri,value)
|
52
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
53
|
+
end
|
54
|
+
|
55
|
+
#Return a list of Namespace's properties
|
56
|
+
def self.properties
|
57
|
+
@@properties.keys
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.properties_form
|
61
|
+
list = {}
|
62
|
+
@@properties.keys.each do |property|
|
63
|
+
list[property] = property
|
64
|
+
end
|
65
|
+
list
|
66
|
+
end end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,192 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class EXIF < Namespaces
|
4
|
+
@@uri = "http://www.w3.org/2003/12/exif/ns#"
|
5
|
+
|
6
|
+
@@properties= {"_unknown" => "",
|
7
|
+
"apertureValue" => "",
|
8
|
+
"artist" => "",
|
9
|
+
"bitsPerSample" => "",
|
10
|
+
"brightnessValue" => "",
|
11
|
+
"cfaPattern" => "",
|
12
|
+
"colorSpace" => "",
|
13
|
+
"componentsConfiguration" => "",
|
14
|
+
"compressedBitsPerPixel" => "",
|
15
|
+
"compression" => "",
|
16
|
+
"contrast" => "",
|
17
|
+
"copyright" => "",
|
18
|
+
"customRendered" => "",
|
19
|
+
"datatype" => "",
|
20
|
+
"date" => "",
|
21
|
+
"dateAndOrTime" => "",
|
22
|
+
"dateTime" => "",
|
23
|
+
"dateTimeDigitized" => "",
|
24
|
+
"dateTimeOriginal" => "",
|
25
|
+
"deviceSettingDescription" => "",
|
26
|
+
"digitalZoomRatio" => "",
|
27
|
+
"exifAttribute" => "",
|
28
|
+
"exifVersion" => "",
|
29
|
+
"exif_IFD_Pointer" => "",
|
30
|
+
"exifdata" => "",
|
31
|
+
"exposureBiasValue" => "",
|
32
|
+
"exposureIndex" => "",
|
33
|
+
"exposureMode" => "",
|
34
|
+
"exposureProgram" => "",
|
35
|
+
"exposureTime" => "",
|
36
|
+
"fNumber" => "",
|
37
|
+
"fileSource" => "",
|
38
|
+
"flash" => "",
|
39
|
+
"flashEnergy" => "",
|
40
|
+
"flashpixVersion" => "",
|
41
|
+
"focalLength" => "",
|
42
|
+
"focalLengthIn35mmFilm" => "",
|
43
|
+
"focalPlaneResolutionUnit" => "",
|
44
|
+
"focalPlaneXResolution" => "",
|
45
|
+
"focalPlaneYResolution" => "",
|
46
|
+
"gainControl" => "",
|
47
|
+
"geo" => "",
|
48
|
+
"gpsAltitude" => "",
|
49
|
+
"gpsAltitudeRef" => "",
|
50
|
+
"gpsAreaInformation" => "",
|
51
|
+
"gpsDOP" => "",
|
52
|
+
"gpsDateStamp" => "",
|
53
|
+
"gpsDestBearing" => "",
|
54
|
+
"gpsDestBearingRef" => "",
|
55
|
+
"gpsDestDistance" => "",
|
56
|
+
"gpsDestDistanceRef" => "",
|
57
|
+
"gpsDestLatitude" => "",
|
58
|
+
"gpsDestLatitudeRef" => "",
|
59
|
+
"gpsDestLongitude" => "",
|
60
|
+
"gpsDestLongitudeRef" => "",
|
61
|
+
"gpsDifferential" => "",
|
62
|
+
"gpsImgDirection" => "",
|
63
|
+
"gpsImgDirectionRef" => "",
|
64
|
+
"gpsInfo" => "",
|
65
|
+
"gpsInfo_IFD_Pointer" => "",
|
66
|
+
"gpsLatitude" => "",
|
67
|
+
"gpsLatitudeRef" => "",
|
68
|
+
"gpsLongitude" => "",
|
69
|
+
"gpsLongitudeRef" => "",
|
70
|
+
"gpsMapDatum" => "",
|
71
|
+
"gpsMeasureMode" => "",
|
72
|
+
"gpsProcessingMethod" => "",
|
73
|
+
"gpsSatellites" => "",
|
74
|
+
"gpsSpeed" => "",
|
75
|
+
"gpsSpeedRef" => "",
|
76
|
+
"gpsStatus" => "",
|
77
|
+
"gpsTimeStamp" => "",
|
78
|
+
"gpsTrack" => "",
|
79
|
+
"gpsTrackRef" => "",
|
80
|
+
"gpsVersionID" => "",
|
81
|
+
"height" => "",
|
82
|
+
"ifdPointer" => "",
|
83
|
+
"imageConfig" => "",
|
84
|
+
"imageDataCharacter" => "",
|
85
|
+
"imageDataStruct" => "",
|
86
|
+
"imageDescription" => "",
|
87
|
+
"imageLength" => "",
|
88
|
+
"imageUniqueID" => "",
|
89
|
+
"imageWidth" => "",
|
90
|
+
"interopInfo" => "",
|
91
|
+
"interoperabilityIndex" => "",
|
92
|
+
"interoperabilityVersion" => "",
|
93
|
+
"interoperability_IFD_Pointer" => "",
|
94
|
+
"isoSpeedRatings" => "",
|
95
|
+
"jpegInterchangeFormat" => "",
|
96
|
+
"jpegInterchangeFormatLength" => "",
|
97
|
+
"length" => "",
|
98
|
+
"lightSource" => "",
|
99
|
+
"make" => "",
|
100
|
+
"makerNote" => "",
|
101
|
+
"maxApertureValue" => "",
|
102
|
+
"meter" => "",
|
103
|
+
"meteringMode" => "",
|
104
|
+
"mm" => "",
|
105
|
+
"model" => "",
|
106
|
+
"oecf" => "",
|
107
|
+
"orientation" => "",
|
108
|
+
"photometricInterpretation" => "",
|
109
|
+
"pictTaking" => "",
|
110
|
+
"pimBrightness" => "",
|
111
|
+
"pimColorBalance" => "",
|
112
|
+
"pimContrast" => "",
|
113
|
+
"pimInfo" => "",
|
114
|
+
"pimSaturation" => "",
|
115
|
+
"pimSharpness" => "",
|
116
|
+
"pixelXDimension" => "",
|
117
|
+
"pixelYDimension" => "",
|
118
|
+
"planarConfiguration" => "",
|
119
|
+
"primaryChromaticities" => "",
|
120
|
+
"printImageMatching_IFD_Pointer" => "",
|
121
|
+
"recOffset" => "",
|
122
|
+
"referenceBlackWhite" => "",
|
123
|
+
"relatedFile" => "",
|
124
|
+
"relatedImageFileFormat" => "",
|
125
|
+
"relatedImageLength" => "",
|
126
|
+
"relatedImageWidth" => "",
|
127
|
+
"relatedSoundFile" => "",
|
128
|
+
"resolution" => "",
|
129
|
+
"resolutionUnit" => "",
|
130
|
+
"rowsPerStrip" => "",
|
131
|
+
"samplesPerPixel" => "",
|
132
|
+
"saturation" => "",
|
133
|
+
"sceneCaptureType" => "",
|
134
|
+
"sceneType" => "",
|
135
|
+
"seconds" => "",
|
136
|
+
"sensingMethod" => "",
|
137
|
+
"sharpness" => "",
|
138
|
+
"shutterSpeedValue" => "",
|
139
|
+
"software" => "",
|
140
|
+
"spatialFrequencyResponse" => "",
|
141
|
+
"spectralSensitivity" => "",
|
142
|
+
"stripByteCounts" => "",
|
143
|
+
"stripOffsets" => "",
|
144
|
+
"subSecTime" => "",
|
145
|
+
"subSecTimeDigitized" => "",
|
146
|
+
"subSecTimeOriginal" => "",
|
147
|
+
"subjectArea" => "",
|
148
|
+
"subjectDistance" => "",
|
149
|
+
"subjectDistanceRange" => "",
|
150
|
+
"subjectLocation" => "",
|
151
|
+
"subseconds" => "",
|
152
|
+
"tag_number" => "",
|
153
|
+
"tagid" => "",
|
154
|
+
"transferFunction" => "",
|
155
|
+
"userComment" => "",
|
156
|
+
"userInfo" => "",
|
157
|
+
"versionInfo" => "",
|
158
|
+
"whiteBalance" => "",
|
159
|
+
"whitePoint" => "",
|
160
|
+
"width" => "",
|
161
|
+
"xResolution" => "",
|
162
|
+
"yCbCrCoefficients" => "",
|
163
|
+
"yCbCrPositioning" => "",
|
164
|
+
"yCbCrSubSampling" => "",
|
165
|
+
"yResolution" => ""
|
166
|
+
}
|
167
|
+
|
168
|
+
# Return Namespace URI
|
169
|
+
def self.get_uri
|
170
|
+
@@uri
|
171
|
+
end
|
172
|
+
|
173
|
+
# Return tag to rdf doc
|
174
|
+
def self.to_s(property,uri,value)
|
175
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
176
|
+
end
|
177
|
+
|
178
|
+
#Return a list of Namespace's properties
|
179
|
+
def self.properties
|
180
|
+
@@properties.keys
|
181
|
+
end
|
182
|
+
|
183
|
+
def self.properties_form
|
184
|
+
list = {}
|
185
|
+
@@properties.keys.each do |property|
|
186
|
+
list[property] = property
|
187
|
+
end
|
188
|
+
list
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class FOAF < Namespaces
|
4
|
+
@@uri = "http://xmlns.com/foaf/0.1/"
|
5
|
+
|
6
|
+
@@properties= {"account" => "",
|
7
|
+
"accountName" => "",
|
8
|
+
"accountServiceHomepage" => "",
|
9
|
+
"age" => "",
|
10
|
+
"aimChatID" => "",
|
11
|
+
"based_near" => "",
|
12
|
+
"birthday" => "",
|
13
|
+
"currentProject" => "",
|
14
|
+
"depiction" => "",
|
15
|
+
"depicts" => "",
|
16
|
+
"dnaChecksum" => "",
|
17
|
+
"familyName" => "",
|
18
|
+
"family_name" => "",
|
19
|
+
"firstName" => "",
|
20
|
+
"fundedBy" => "",
|
21
|
+
"geekcode" => "",
|
22
|
+
"gender" => "",
|
23
|
+
"givenName" => "",
|
24
|
+
"givenname" => "",
|
25
|
+
"holdsAccount" => "",
|
26
|
+
"homepage" => "",
|
27
|
+
"icqChatID" => "",
|
28
|
+
"img" => "",
|
29
|
+
"interest" => "",
|
30
|
+
"isPrimaryTopicOf" => "",
|
31
|
+
"jabberID" => "",
|
32
|
+
"knows" => "",
|
33
|
+
"lastName" => "",
|
34
|
+
"logo" => "",
|
35
|
+
"made" => "",
|
36
|
+
"maker" => "",
|
37
|
+
"mbox" => "",
|
38
|
+
"mbox_sha1sum" => "",
|
39
|
+
"member" => "",
|
40
|
+
"membershipClass" => "",
|
41
|
+
"msnChatID" => "",
|
42
|
+
"myersBriggs" => "",
|
43
|
+
"name" => "",
|
44
|
+
"nick" => "",
|
45
|
+
"openid" => "",
|
46
|
+
"page" => "",
|
47
|
+
"pastProject" => "",
|
48
|
+
"phone" => "",
|
49
|
+
"plan" => "",
|
50
|
+
"primaryTopic" => "",
|
51
|
+
"publications" => "",
|
52
|
+
"schoolHomepage" => "",
|
53
|
+
"sha1" => "",
|
54
|
+
"skypeID" => "",
|
55
|
+
"status" => "",
|
56
|
+
"surname" => "",
|
57
|
+
"theme" => "",
|
58
|
+
"thumbnail" => "",
|
59
|
+
"tipjar" => "",
|
60
|
+
"title" => "",
|
61
|
+
"topic" => "",
|
62
|
+
"topic_interest" => "",
|
63
|
+
"weblog" => "",
|
64
|
+
"workInfoHomepage" => "",
|
65
|
+
"workplaceHomepage" => "",
|
66
|
+
"yahooChatID" => ""
|
67
|
+
}
|
68
|
+
|
69
|
+
# Return Namespace URI
|
70
|
+
def self.get_uri
|
71
|
+
@@uri
|
72
|
+
end
|
73
|
+
|
74
|
+
# Return tag to rdf doc
|
75
|
+
def self.to_s(property,uri,value)
|
76
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
77
|
+
end
|
78
|
+
|
79
|
+
#Return a list of Namespace's properties
|
80
|
+
def self.properties
|
81
|
+
@@properties.keys
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.properties_form
|
85
|
+
list = {}
|
86
|
+
@@properties.keys.each do |property|
|
87
|
+
list[property] = property
|
88
|
+
end
|
89
|
+
list
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class GEO < Namespaces
|
4
|
+
@@uri = "http://www.w3.org/2003/01/geo/wgs84_pos#"
|
5
|
+
@@properties= { "lat" => "",
|
6
|
+
"location" => "",
|
7
|
+
"long" => "",
|
8
|
+
"lat_long" => ""
|
9
|
+
}
|
10
|
+
|
11
|
+
# Return Namespace URI
|
12
|
+
def self.get_uri
|
13
|
+
@@uri
|
14
|
+
end
|
15
|
+
|
16
|
+
# Return tag to rdf doc
|
17
|
+
def self.to_s(property,uri,value)
|
18
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
19
|
+
end
|
20
|
+
|
21
|
+
#Return a list of Namespace's properties
|
22
|
+
def self.properties
|
23
|
+
@@properties.keys
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.properties_form
|
27
|
+
list = {}
|
28
|
+
@@properties.keys.each do |property|
|
29
|
+
list[property] = property
|
30
|
+
end
|
31
|
+
list
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class HTTP < Namespaces
|
4
|
+
@@uri = "http://www.w3.org/2006/http#"
|
5
|
+
|
6
|
+
@@properties= {"abs_path" => "",
|
7
|
+
"absoluteURI" => "",
|
8
|
+
"authority" => "",
|
9
|
+
"body" => "",
|
10
|
+
"connectionAuthority" => "",
|
11
|
+
"elementName" => "",
|
12
|
+
"elementValue" => "",
|
13
|
+
"fieldName" => "",
|
14
|
+
"fieldValue" => "",
|
15
|
+
"header" => "",
|
16
|
+
"param" => "",
|
17
|
+
"paramName" => "",
|
18
|
+
"paramValue" => "",
|
19
|
+
"request" => "",
|
20
|
+
"requestURI" => "",
|
21
|
+
"response" => "",
|
22
|
+
"responseCode" => "",
|
23
|
+
"version" => ""
|
24
|
+
}
|
25
|
+
|
26
|
+
# Return Namespace URI
|
27
|
+
def self.get_uri
|
28
|
+
@@uri
|
29
|
+
end
|
30
|
+
|
31
|
+
# Return tag to rdf doc
|
32
|
+
def self.to_s(property,uri,value)
|
33
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
34
|
+
end
|
35
|
+
|
36
|
+
#Return a list of Namespace's properties
|
37
|
+
def self.properties
|
38
|
+
@@properties.keys
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.properties_form
|
42
|
+
list = {}
|
43
|
+
@@properties.keys.each do |property|
|
44
|
+
list[property] = property
|
45
|
+
end
|
46
|
+
list
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class OWL < Namespaces
|
4
|
+
@@uri= "http://www.w3.org/2002/07/owl#"
|
5
|
+
|
6
|
+
@@properties = {"allValuesFrom" => "",
|
7
|
+
"annotatedProperty" => "",
|
8
|
+
"annotatedSource" => "",
|
9
|
+
"annotatedTarget" => "",
|
10
|
+
"assertionProperty" => "",
|
11
|
+
"backwardCompatibleWith" => "",
|
12
|
+
"bottomDataProperty" => "",
|
13
|
+
"bottomObjectProperty" => "",
|
14
|
+
"cardinality" => "",
|
15
|
+
"complementOf" => "",
|
16
|
+
"datatypeComplementOf" => "",
|
17
|
+
"deprecated" => "",
|
18
|
+
"differentFrom" => "",
|
19
|
+
"disjointUnionOf" => "",
|
20
|
+
"disjointWith" => "",
|
21
|
+
"distinctMembers" => "",
|
22
|
+
"equivalentClass" => "",
|
23
|
+
"equivalentProperty" => "",
|
24
|
+
"hasKey" => "",
|
25
|
+
"hasSelf" => "",
|
26
|
+
"hasValue" => "",
|
27
|
+
"imports" => "",
|
28
|
+
"incompatibleWith" => "",
|
29
|
+
"intersectionOf" => "",
|
30
|
+
"inverseOf" => "",
|
31
|
+
"maxCardinality" => "",
|
32
|
+
"maxQualifiedCardinality" => "",
|
33
|
+
"members" => "",
|
34
|
+
"minCardinality" => "",
|
35
|
+
"minQualifiedCardinality" => "",
|
36
|
+
"onClass" => "",
|
37
|
+
"onDataRange" => "",
|
38
|
+
"onDatatype" => "",
|
39
|
+
"onProperties" => "",
|
40
|
+
"onProperty" => "",
|
41
|
+
"oneOf" => "",
|
42
|
+
"priorVersion" => "",
|
43
|
+
"propertyChainAxiom" => "",
|
44
|
+
"propertyDisjointWith" => "",
|
45
|
+
"qualifiedCardinality" => "",
|
46
|
+
"sameAs" => "",
|
47
|
+
"someValuesFrom" => "",
|
48
|
+
"sourceIndividual" => "",
|
49
|
+
"targetIndividual" => "",
|
50
|
+
"targetValue" => "",
|
51
|
+
"topDataProperty" => "",
|
52
|
+
"topObjectProperty" => "",
|
53
|
+
"unionOf" => "",
|
54
|
+
"versionIRI" => "",
|
55
|
+
"versionInfo" => "",
|
56
|
+
"withRestrictions" => ""
|
57
|
+
}
|
58
|
+
|
59
|
+
# Return Namespace URI
|
60
|
+
def self.get_uri
|
61
|
+
@@uri
|
62
|
+
end
|
63
|
+
|
64
|
+
# Return tag to rdf doc
|
65
|
+
def self.to_s(property,uri,value)
|
66
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
67
|
+
end
|
68
|
+
|
69
|
+
#Return a list of Namespace's properties
|
70
|
+
def self.properties
|
71
|
+
@@properties.keys
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.properties_form
|
75
|
+
list = {}
|
76
|
+
@@properties.keys.each do |property|
|
77
|
+
list[property] = property
|
78
|
+
end
|
79
|
+
list
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class RDFS < Namespaces
|
4
|
+
@@uri = "http://www.w3.org/2000/01/rdf-schema#"
|
5
|
+
|
6
|
+
@@properties= {"comment" => "",
|
7
|
+
"domain" => "",
|
8
|
+
"isDefinedBy" => "",
|
9
|
+
"label" => "",
|
10
|
+
"member" => "",
|
11
|
+
"range" => "",
|
12
|
+
"seeAlso" => "",
|
13
|
+
"subClassOf" => "",
|
14
|
+
"subPropertyOf" => ""
|
15
|
+
}
|
16
|
+
|
17
|
+
# Return Namespace URI
|
18
|
+
def self.get_uri
|
19
|
+
@@uri
|
20
|
+
end
|
21
|
+
|
22
|
+
# Return tag to rdf doc
|
23
|
+
def self.to_s(property,uri,value)
|
24
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
25
|
+
end
|
26
|
+
|
27
|
+
#Return a list of Namespace's properties
|
28
|
+
def self.properties
|
29
|
+
@@properties.keys
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.properties_form
|
33
|
+
list = {}
|
34
|
+
@@properties.keys.each do |property|
|
35
|
+
list[property] = property
|
36
|
+
end
|
37
|
+
list
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class RSA < Namespaces
|
4
|
+
|
5
|
+
@@uri = "http://www.w3.org/ns/auth/rsa#"
|
6
|
+
@@properties= {"modulus" => "",
|
7
|
+
"private_exponent" => "",
|
8
|
+
"public_exponent" => ""
|
9
|
+
}
|
10
|
+
|
11
|
+
# Return Namespace URI
|
12
|
+
def self.get_uri
|
13
|
+
@@uri
|
14
|
+
end
|
15
|
+
|
16
|
+
# Return tag to rdf doc
|
17
|
+
def self.to_s(property,uri,value)
|
18
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
19
|
+
end
|
20
|
+
|
21
|
+
#Return a list of Namespace's properties
|
22
|
+
def self.properties
|
23
|
+
@@properties.keys
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.properties_form
|
27
|
+
list = {}
|
28
|
+
@@properties.keys.each do |property|
|
29
|
+
list[property] = property
|
30
|
+
end
|
31
|
+
list
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module EasyData
|
2
|
+
module RDF
|
3
|
+
class RSS < Namespaces
|
4
|
+
|
5
|
+
@@uri = "http://purl.org/rss/1.0/"
|
6
|
+
@@properties = {"description" => "",
|
7
|
+
"items" => "",
|
8
|
+
"link" => "",
|
9
|
+
"name" => "",
|
10
|
+
"title" => "",
|
11
|
+
"url" => ""
|
12
|
+
}
|
13
|
+
|
14
|
+
# Return Namespace URI
|
15
|
+
def self.get_uri
|
16
|
+
@@uri
|
17
|
+
end
|
18
|
+
|
19
|
+
# Return tag to rdf doc
|
20
|
+
def self.to_s(property,uri,value)
|
21
|
+
@@properties[property].gsub("%uri%",uri).gsub('%value%',value)
|
22
|
+
end
|
23
|
+
|
24
|
+
#Return a list of Namespace's properties
|
25
|
+
def self.properties
|
26
|
+
@@properties.keys
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.properties_form
|
30
|
+
list = {}
|
31
|
+
@@properties.keys.each do |property|
|
32
|
+
list[property] = property
|
33
|
+
end
|
34
|
+
list
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|