rdf 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -1
- data/VERSION +1 -1
- data/lib/rdf.rb +25 -22
- data/lib/rdf/enumerable.rb +554 -0
- data/lib/rdf/format.rb +239 -41
- data/lib/rdf/model/graph.rb +82 -0
- data/lib/rdf/{literal.rb → model/literal.rb} +47 -4
- data/lib/rdf/{node.rb → model/node.rb} +0 -0
- data/lib/rdf/{resource.rb → model/resource.rb} +0 -0
- data/lib/rdf/{statement.rb → model/statement.rb} +12 -0
- data/lib/rdf/{uri.rb → model/uri.rb} +20 -7
- data/lib/rdf/model/value.rb +135 -0
- data/lib/rdf/ntriples.rb +35 -2
- data/lib/rdf/ntriples/format.rb +4 -4
- data/lib/rdf/ntriples/reader.rb +2 -2
- data/lib/rdf/ntriples/writer.rb +26 -19
- data/lib/rdf/query.rb +4 -4
- data/lib/rdf/query/pattern.rb +3 -3
- data/lib/rdf/query/solution.rb +2 -2
- data/lib/rdf/query/variable.rb +3 -3
- data/lib/rdf/reader.rb +85 -16
- data/lib/rdf/repository.rb +104 -12
- data/lib/rdf/version.rb +1 -1
- data/lib/rdf/vocab.rb +171 -0
- data/lib/rdf/vocab/cc.rb +18 -0
- data/lib/rdf/vocab/dc.rb +63 -0
- data/lib/rdf/vocab/doap.rb +45 -0
- data/lib/rdf/vocab/exif.rb +168 -0
- data/lib/rdf/vocab/foaf.rb +69 -0
- data/lib/rdf/vocab/http.rb +26 -0
- data/lib/rdf/vocab/owl.rb +59 -0
- data/lib/rdf/{vocabulary → vocab}/rdf.rb +7 -1
- data/lib/rdf/vocab/rdfs.rb +17 -0
- data/lib/rdf/{vocabulary → vocab}/rss.rb +6 -1
- data/lib/rdf/vocab/sioc.rb +93 -0
- data/lib/rdf/vocab/skos.rb +36 -0
- data/lib/rdf/vocab/wot.rb +21 -0
- data/lib/rdf/vocab/xhtml.rb +9 -0
- data/lib/rdf/vocab/xsd.rb +58 -0
- data/lib/rdf/writer.rb +123 -16
- metadata +26 -27
- data/lib/rdf/graph.rb +0 -197
- data/lib/rdf/reader/ntriples.rb +0 -5
- data/lib/rdf/value.rb +0 -76
- data/lib/rdf/vocabulary.rb +0 -133
- data/lib/rdf/vocabulary/cc.rb +0 -9
- data/lib/rdf/vocabulary/dc.rb +0 -9
- data/lib/rdf/vocabulary/doap.rb +0 -9
- data/lib/rdf/vocabulary/exif.rb +0 -9
- data/lib/rdf/vocabulary/foaf.rb +0 -9
- data/lib/rdf/vocabulary/http.rb +0 -9
- data/lib/rdf/vocabulary/owl.rb +0 -9
- data/lib/rdf/vocabulary/rdfs.rb +0 -9
- data/lib/rdf/vocabulary/sioc.rb +0 -9
- data/lib/rdf/vocabulary/skos.rb +0 -9
- data/lib/rdf/vocabulary/wot.rb +0 -9
- data/lib/rdf/vocabulary/xhtml.rb +0 -9
- data/lib/rdf/vocabulary/xsd.rb +0 -9
- data/lib/rdf/writer/ntriples.rb +0 -5
@@ -0,0 +1,45 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Description of a Project (DOAP) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://trac.usefulinc.com/doap
|
6
|
+
class DOAP < Vocabulary("http://usefulinc.com/ns/doap#")
|
7
|
+
property :'anon-root'
|
8
|
+
property :audience
|
9
|
+
property :blog
|
10
|
+
property :browse
|
11
|
+
property :'bug-database'
|
12
|
+
property :category
|
13
|
+
property :created
|
14
|
+
property :description
|
15
|
+
property :developer
|
16
|
+
property :documenter
|
17
|
+
property :'download-mirror'
|
18
|
+
property :'download-page'
|
19
|
+
property :'file-release'
|
20
|
+
property :helper
|
21
|
+
property :homepage
|
22
|
+
property :implements
|
23
|
+
property :language
|
24
|
+
property :license
|
25
|
+
property :location
|
26
|
+
property :'mailing-list'
|
27
|
+
property :maintainer
|
28
|
+
property :module
|
29
|
+
property :name
|
30
|
+
property :'old-homepage'
|
31
|
+
property :os
|
32
|
+
property :platform
|
33
|
+
property :'programming-language'
|
34
|
+
property :release
|
35
|
+
property :repository
|
36
|
+
property :revision
|
37
|
+
property :screenshots
|
38
|
+
property :'service-endpoint'
|
39
|
+
property :shortdesc
|
40
|
+
property :tester
|
41
|
+
property :translator
|
42
|
+
property :vendor
|
43
|
+
property :wiki
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Exchangeable Image File Format (EXIF) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://www.w3.org/2003/12/exif/
|
6
|
+
class EXIF < Vocabulary("http://www.w3.org/2003/12/exif/ns#")
|
7
|
+
property :_unknown
|
8
|
+
property :apertureValue
|
9
|
+
property :artist
|
10
|
+
property :bitsPerSample
|
11
|
+
property :brightnessValue
|
12
|
+
property :cfaPattern
|
13
|
+
property :colorSpace
|
14
|
+
property :componentsConfiguration
|
15
|
+
property :compressedBitsPerPixel
|
16
|
+
property :compression
|
17
|
+
property :contrast
|
18
|
+
property :copyright
|
19
|
+
property :customRendered
|
20
|
+
property :datatype
|
21
|
+
property :date
|
22
|
+
property :dateAndOrTime
|
23
|
+
property :dateTime
|
24
|
+
property :dateTimeDigitized
|
25
|
+
property :dateTimeOriginal
|
26
|
+
property :deviceSettingDescription
|
27
|
+
property :digitalZoomRatio
|
28
|
+
property :exifAttribute
|
29
|
+
property :exifVersion
|
30
|
+
property :exif_IFD_Pointer
|
31
|
+
property :exifdata
|
32
|
+
property :exposureBiasValue
|
33
|
+
property :exposureIndex
|
34
|
+
property :exposureMode
|
35
|
+
property :exposureProgram
|
36
|
+
property :exposureTime
|
37
|
+
property :fNumber
|
38
|
+
property :fileSource
|
39
|
+
property :flash
|
40
|
+
property :flashEnergy
|
41
|
+
property :flashpixVersion
|
42
|
+
property :focalLength
|
43
|
+
property :focalLengthIn35mmFilm
|
44
|
+
property :focalPlaneResolutionUnit
|
45
|
+
property :focalPlaneXResolution
|
46
|
+
property :focalPlaneYResolution
|
47
|
+
property :gainControl
|
48
|
+
property :geo
|
49
|
+
property :gpsAltitude
|
50
|
+
property :gpsAltitudeRef
|
51
|
+
property :gpsAreaInformation
|
52
|
+
property :gpsDOP
|
53
|
+
property :gpsDateStamp
|
54
|
+
property :gpsDestBearing
|
55
|
+
property :gpsDestBearingRef
|
56
|
+
property :gpsDestDistance
|
57
|
+
property :gpsDestDistanceRef
|
58
|
+
property :gpsDestLatitude
|
59
|
+
property :gpsDestLatitudeRef
|
60
|
+
property :gpsDestLongitude
|
61
|
+
property :gpsDestLongitudeRef
|
62
|
+
property :gpsDifferential
|
63
|
+
property :gpsImgDirection
|
64
|
+
property :gpsImgDirectionRef
|
65
|
+
property :gpsInfo
|
66
|
+
property :gpsInfo_IFD_Pointer
|
67
|
+
property :gpsLatitude
|
68
|
+
property :gpsLatitudeRef
|
69
|
+
property :gpsLongitude
|
70
|
+
property :gpsLongitudeRef
|
71
|
+
property :gpsMapDatum
|
72
|
+
property :gpsMeasureMode
|
73
|
+
property :gpsProcessingMethod
|
74
|
+
property :gpsSatellites
|
75
|
+
property :gpsSpeed
|
76
|
+
property :gpsSpeedRef
|
77
|
+
property :gpsStatus
|
78
|
+
property :gpsTimeStamp
|
79
|
+
property :gpsTrack
|
80
|
+
property :gpsTrackRef
|
81
|
+
property :gpsVersionID
|
82
|
+
property :height
|
83
|
+
property :ifdPointer
|
84
|
+
property :imageConfig
|
85
|
+
property :imageDataCharacter
|
86
|
+
property :imageDataStruct
|
87
|
+
property :imageDescription
|
88
|
+
property :imageLength
|
89
|
+
property :imageUniqueID
|
90
|
+
property :imageWidth
|
91
|
+
property :interopInfo
|
92
|
+
property :interoperabilityIndex
|
93
|
+
property :interoperabilityVersion
|
94
|
+
property :interoperability_IFD_Pointer
|
95
|
+
property :isoSpeedRatings
|
96
|
+
property :jpegInterchangeFormat
|
97
|
+
property :jpegInterchangeFormatLength
|
98
|
+
property :length
|
99
|
+
property :lightSource
|
100
|
+
property :make
|
101
|
+
property :makerNote
|
102
|
+
property :maxApertureValue
|
103
|
+
property :meter
|
104
|
+
property :meteringMode
|
105
|
+
property :mm
|
106
|
+
property :model
|
107
|
+
property :oecf
|
108
|
+
property :orientation
|
109
|
+
property :photometricInterpretation
|
110
|
+
property :pictTaking
|
111
|
+
property :pimBrightness
|
112
|
+
property :pimColorBalance
|
113
|
+
property :pimContrast
|
114
|
+
property :pimInfo
|
115
|
+
property :pimSaturation
|
116
|
+
property :pimSharpness
|
117
|
+
property :pixelXDimension
|
118
|
+
property :pixelYDimension
|
119
|
+
property :planarConfiguration
|
120
|
+
property :primaryChromaticities
|
121
|
+
property :printImageMatching_IFD_Pointer
|
122
|
+
property :recOffset
|
123
|
+
property :referenceBlackWhite
|
124
|
+
property :relatedFile
|
125
|
+
property :relatedImageFileFormat
|
126
|
+
property :relatedImageLength
|
127
|
+
property :relatedImageWidth
|
128
|
+
property :relatedSoundFile
|
129
|
+
property :resolution
|
130
|
+
property :resolutionUnit
|
131
|
+
property :rowsPerStrip
|
132
|
+
property :samplesPerPixel
|
133
|
+
property :saturation
|
134
|
+
property :sceneCaptureType
|
135
|
+
property :sceneType
|
136
|
+
property :seconds
|
137
|
+
property :sensingMethod
|
138
|
+
property :sharpness
|
139
|
+
property :shutterSpeedValue
|
140
|
+
property :software
|
141
|
+
property :spatialFrequencyResponse
|
142
|
+
property :spectralSensitivity
|
143
|
+
property :stripByteCounts
|
144
|
+
property :stripOffsets
|
145
|
+
property :subSecTime
|
146
|
+
property :subSecTimeDigitized
|
147
|
+
property :subSecTimeOriginal
|
148
|
+
property :subjectArea
|
149
|
+
property :subjectDistance
|
150
|
+
property :subjectDistanceRange
|
151
|
+
property :subjectLocation
|
152
|
+
property :subseconds
|
153
|
+
property :tag_number
|
154
|
+
property :tagid
|
155
|
+
property :transferFunction
|
156
|
+
property :userComment
|
157
|
+
property :userInfo
|
158
|
+
property :versionInfo
|
159
|
+
property :whiteBalance
|
160
|
+
property :whitePoint
|
161
|
+
property :width
|
162
|
+
property :xResolution
|
163
|
+
property :yCbCrCoefficients
|
164
|
+
property :yCbCrPositioning
|
165
|
+
property :yCbCrSubSampling
|
166
|
+
property :yResolution
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Friend of a Friend (FOAF) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://xmlns.com/foaf/spec/
|
6
|
+
class FOAF < Vocabulary("http://xmlns.com/foaf/0.1/")
|
7
|
+
property :account
|
8
|
+
property :accountName
|
9
|
+
property :accountServiceHomepage
|
10
|
+
property :age
|
11
|
+
property :aimChatID
|
12
|
+
property :based_near
|
13
|
+
property :birthday
|
14
|
+
property :currentProject
|
15
|
+
property :depiction
|
16
|
+
property :depicts
|
17
|
+
property :dnaChecksum
|
18
|
+
property :familyName
|
19
|
+
property :family_name
|
20
|
+
property :firstName
|
21
|
+
property :fundedBy
|
22
|
+
property :geekcode
|
23
|
+
property :gender
|
24
|
+
property :givenName
|
25
|
+
property :givenname
|
26
|
+
property :holdsAccount
|
27
|
+
property :homepage
|
28
|
+
property :icqChatID
|
29
|
+
property :img
|
30
|
+
property :interest
|
31
|
+
property :isPrimaryTopicOf
|
32
|
+
property :jabberID
|
33
|
+
property :knows
|
34
|
+
property :lastName
|
35
|
+
property :logo
|
36
|
+
property :made
|
37
|
+
property :maker
|
38
|
+
property :mbox
|
39
|
+
property :mbox_sha1sum
|
40
|
+
property :member
|
41
|
+
property :membershipClass
|
42
|
+
property :msnChatID
|
43
|
+
property :myersBriggs
|
44
|
+
property :name
|
45
|
+
property :nick
|
46
|
+
property :openid
|
47
|
+
property :page
|
48
|
+
property :pastProject
|
49
|
+
property :phone
|
50
|
+
property :plan
|
51
|
+
property :primaryTopic
|
52
|
+
property :publications
|
53
|
+
property :schoolHomepage
|
54
|
+
property :sha1
|
55
|
+
property :skypeID
|
56
|
+
property :status
|
57
|
+
property :surname
|
58
|
+
property :theme
|
59
|
+
property :thumbnail
|
60
|
+
property :tipjar
|
61
|
+
property :title
|
62
|
+
property :topic
|
63
|
+
property :topic_interest
|
64
|
+
property :weblog
|
65
|
+
property :workInfoHomepage
|
66
|
+
property :workplaceHomepage
|
67
|
+
property :yahooChatID
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Hypertext Transfer Protocol (HTTP) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://www.w3.org/2006/http
|
6
|
+
class HTTP < Vocabulary("http://www.w3.org/2006/http#")
|
7
|
+
property :abs_path
|
8
|
+
property :absoluteURI
|
9
|
+
property :authority
|
10
|
+
property :body
|
11
|
+
property :connectionAuthority
|
12
|
+
property :elementName
|
13
|
+
property :elementValue
|
14
|
+
property :fieldName
|
15
|
+
property :fieldValue
|
16
|
+
property :header
|
17
|
+
property :param
|
18
|
+
property :paramName
|
19
|
+
property :paramValue
|
20
|
+
property :request
|
21
|
+
property :requestURI
|
22
|
+
property :response
|
23
|
+
property :responseCode
|
24
|
+
property :version
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Web Ontology Language (OWL) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://www.w3.org/TR/owl-overview/
|
6
|
+
class OWL < Vocabulary("http://www.w3.org/2002/07/owl#")
|
7
|
+
property :allValuesFrom
|
8
|
+
property :annotatedProperty
|
9
|
+
property :annotatedSource
|
10
|
+
property :annotatedTarget
|
11
|
+
property :assertionProperty
|
12
|
+
property :backwardCompatibleWith
|
13
|
+
property :bottomDataProperty
|
14
|
+
property :bottomObjectProperty
|
15
|
+
property :cardinality
|
16
|
+
property :complementOf
|
17
|
+
property :datatypeComplementOf
|
18
|
+
property :deprecated
|
19
|
+
property :differentFrom
|
20
|
+
property :disjointUnionOf
|
21
|
+
property :disjointWith
|
22
|
+
property :distinctMembers
|
23
|
+
property :equivalentClass
|
24
|
+
property :equivalentProperty
|
25
|
+
property :hasKey
|
26
|
+
property :hasSelf
|
27
|
+
property :hasValue
|
28
|
+
property :imports
|
29
|
+
property :incompatibleWith
|
30
|
+
property :intersectionOf
|
31
|
+
property :inverseOf
|
32
|
+
property :maxCardinality
|
33
|
+
property :maxQualifiedCardinality
|
34
|
+
property :members
|
35
|
+
property :minCardinality
|
36
|
+
property :minQualifiedCardinality
|
37
|
+
property :onClass
|
38
|
+
property :onDataRange
|
39
|
+
property :onDatatype
|
40
|
+
property :onProperties
|
41
|
+
property :onProperty
|
42
|
+
property :oneOf
|
43
|
+
property :priorVersion
|
44
|
+
property :propertyChainAxiom
|
45
|
+
property :propertyDisjointWith
|
46
|
+
property :qualifiedCardinality
|
47
|
+
property :sameAs
|
48
|
+
property :someValuesFrom
|
49
|
+
property :sourceIndividual
|
50
|
+
property :targetIndividual
|
51
|
+
property :targetValue
|
52
|
+
property :topDataProperty
|
53
|
+
property :topObjectProperty
|
54
|
+
property :unionOf
|
55
|
+
property :versionIRI
|
56
|
+
property :versionInfo
|
57
|
+
property :withRestrictions
|
58
|
+
end
|
59
|
+
end
|
@@ -4,6 +4,12 @@ module RDF
|
|
4
4
|
#
|
5
5
|
# @see http://www.w3.org/RDF/
|
6
6
|
class RDF < Vocabulary("http://www.w3.org/1999/02/22-rdf-syntax-ns#")
|
7
|
-
|
7
|
+
property :first
|
8
|
+
property :object
|
9
|
+
property :predicate
|
10
|
+
property :rest
|
11
|
+
property :subject
|
12
|
+
property :type
|
13
|
+
property :value
|
8
14
|
end
|
9
15
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# RDF Schema (RDFS) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://www.w3.org/TR/rdf-schema/
|
6
|
+
class RDFS < Vocabulary("http://www.w3.org/2000/01/rdf-schema#")
|
7
|
+
property :comment
|
8
|
+
property :domain
|
9
|
+
property :isDefinedBy
|
10
|
+
property :label
|
11
|
+
property :member
|
12
|
+
property :range
|
13
|
+
property :seeAlso
|
14
|
+
property :subClassOf
|
15
|
+
property :subPropertyOf
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Semantically-Interlinked Online Communities (SIOC) vocabulary.
|
4
|
+
#
|
5
|
+
# @see http://rdfs.org/sioc/spec/
|
6
|
+
class SIOC < Vocabulary("http://rdfs.org/sioc/ns#")
|
7
|
+
property :about
|
8
|
+
property :account_of
|
9
|
+
property :administrator_of
|
10
|
+
property :attachment
|
11
|
+
property :avatar
|
12
|
+
property :container_of
|
13
|
+
property :content
|
14
|
+
property :content_encoded # @deprecated
|
15
|
+
property :created_at # @deprecated
|
16
|
+
property :creator_of
|
17
|
+
property :description # @deprecated
|
18
|
+
property :earlier_version
|
19
|
+
property :email
|
20
|
+
property :email_sha1
|
21
|
+
property :feed
|
22
|
+
property :first_name # @deprecated
|
23
|
+
property :follows
|
24
|
+
property :function_of
|
25
|
+
property :group_of # @deprecated
|
26
|
+
property :has_administrator
|
27
|
+
property :has_container
|
28
|
+
property :has_creator
|
29
|
+
property :has_discussion
|
30
|
+
property :has_function
|
31
|
+
property :has_group # @deprecated
|
32
|
+
property :has_host
|
33
|
+
property :has_member
|
34
|
+
property :has_moderator
|
35
|
+
property :has_modifier
|
36
|
+
property :has_owner
|
37
|
+
property :has_parent
|
38
|
+
property :has_part # @deprecated
|
39
|
+
property :has_reply
|
40
|
+
property :has_scope
|
41
|
+
property :has_space
|
42
|
+
property :has_subscriber
|
43
|
+
property :has_usergroup
|
44
|
+
property :host_of
|
45
|
+
property :id
|
46
|
+
property :ip_address
|
47
|
+
property :last_activity_date
|
48
|
+
property :last_item_date
|
49
|
+
property :last_name # @deprecated
|
50
|
+
property :last_reply_date
|
51
|
+
property :later_version
|
52
|
+
property :latest_version
|
53
|
+
property :link
|
54
|
+
property :links_to
|
55
|
+
property :member_of
|
56
|
+
property :moderator_of
|
57
|
+
property :modified_at # @deprecated
|
58
|
+
property :modifier_of
|
59
|
+
property :name
|
60
|
+
property :next_by_date
|
61
|
+
property :next_version
|
62
|
+
property :note
|
63
|
+
property :num_authors
|
64
|
+
property :num_items
|
65
|
+
property :num_replies
|
66
|
+
property :num_threads
|
67
|
+
property :num_views
|
68
|
+
property :owner_of
|
69
|
+
property :parent_of
|
70
|
+
property :part_of # @deprecated
|
71
|
+
property :previous_by_date
|
72
|
+
property :previous_version
|
73
|
+
property :reference # @deprecated
|
74
|
+
property :related_to
|
75
|
+
property :reply_of
|
76
|
+
property :scope_of
|
77
|
+
property :sibling
|
78
|
+
property :space_of
|
79
|
+
property :subject # @deprecated
|
80
|
+
property :subscriber_of
|
81
|
+
property :title # @deprecated
|
82
|
+
property :topic
|
83
|
+
property :usergroup_of
|
84
|
+
|
85
|
+
##
|
86
|
+
# Semantically-Interlinked Online Communities (SIOC) types vocabulary.
|
87
|
+
#
|
88
|
+
# @see http://rdfs.org/sioc/spec/#sec-modules
|
89
|
+
class Types < RDF::Vocabulary("http://rdfs.org/sioc/types#")
|
90
|
+
# TODO
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|