rdf-json 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/AUTHORS ADDED
@@ -0,0 +1 @@
1
+ * Arto Bendiken <arto.bendiken@gmail.com>
data/README ADDED
@@ -0,0 +1,53 @@
1
+ RDF::JSON: RDF/JSON Support for RDF.rb
2
+ ======================================
3
+
4
+ This is an [RDF.rb](http://rdf.rubyforge.org/) plugin that adds support for
5
+ parsing/serializing the RDF/JSON serialization format.
6
+
7
+ * <http://github.com/bendiken/rdf-json>
8
+
9
+ ### About RDF/JSON
10
+
11
+ * <http://n2.talis.com/wiki/RDF_JSON_Specification>
12
+
13
+ Documentation
14
+ -------------
15
+
16
+ * {RDF::JSON}
17
+
18
+ Dependencies
19
+ ------------
20
+
21
+ * [RDF.rb](http://gemcutter.org/gems/rdf) (>= 0.0.9)
22
+ * [JSON](http://gemcutter.org/gems/json_pure) (>= 1.2.0)
23
+
24
+ Installation
25
+ ------------
26
+
27
+ The recommended installation method is via RubyGems. To install the latest
28
+ official release from Gemcutter, do:
29
+
30
+ % [sudo] gem install rdf-json
31
+
32
+ Download
33
+ --------
34
+
35
+ To get a local working copy of the development repository, do:
36
+
37
+ % git clone git://github.com/bendiken/rdf-json.git
38
+
39
+ Alternatively, you can download the latest development version as a tarball
40
+ as follows:
41
+
42
+ % wget http://github.com/bendiken/rdf-json/tarball/master
43
+
44
+ Author
45
+ ------
46
+
47
+ * [Arto Bendiken](mailto:arto.bendiken@gmail.com) - <http://ar.to/>
48
+
49
+ License
50
+ -------
51
+
52
+ `RDF::JSON` is free and unencumbered public domain software. For more
53
+ information, see <http://unlicense.org/> or the accompanying UNLICENSE file.
data/UNLICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <http://unlicense.org/>
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
data/lib/rdf/json.rb ADDED
@@ -0,0 +1,42 @@
1
+ require 'rdf'
2
+
3
+ module RDF
4
+ ##
5
+ # **`RDF::JSON`** is an RDF/JSON plugin for RDF.rb.
6
+ #
7
+ # Dependencies
8
+ # ------------
9
+ #
10
+ # * [RDF.rb](http://gemcutter.org/gems/rdf) (>= 0.0.9)
11
+ # * [JSON](http://gemcutter.org/gems/json_pure) (>= 1.2.0)
12
+ #
13
+ # Installation
14
+ # ------------
15
+ #
16
+ # The recommended installation method is via RubyGems. To install the latest
17
+ # official release from Gemcutter, do:
18
+ #
19
+ # % [sudo] gem install rdf-json
20
+ #
21
+ # Documentation
22
+ # -------------
23
+ #
24
+ # * {RDF::JSON::Format}
25
+ # * {RDF::JSON::Reader}
26
+ # * {RDF::JSON::Writer}
27
+ #
28
+ # @example Requiring the `RDF::JSON` module
29
+ # require 'rdf/json'
30
+ #
31
+ # @see http://rdf.rubyforge.org/
32
+ # @see http://n2.talis.com/wiki/RDF_JSON_Specification
33
+ # @see http://en.wikipedia.org/wiki/JSON
34
+ #
35
+ # @author [Arto Bendiken](http://ar.to/)
36
+ module JSON
37
+ require 'rdf/json/format'
38
+ autoload :Reader, 'rdf/json/reader'
39
+ autoload :Writer, 'rdf/json/writer'
40
+ autoload :VERSION, 'rdf/json/version'
41
+ end
42
+ end
@@ -0,0 +1,15 @@
1
+ module RDF::JSON
2
+ ##
3
+ # RDF/JSON format specification.
4
+ #
5
+ # @see http://n2.talis.com/wiki/RDF_JSON_Specification
6
+ class Format < RDF::Format
7
+ content_type 'application/json', :extension => :json
8
+ content_encoding 'utf-8'
9
+
10
+ reader { RDF::JSON::Reader }
11
+ writer { RDF::JSON::Writer }
12
+
13
+ require 'json'
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ module RDF::JSON
2
+ ##
3
+ # RDF/JSON parser.
4
+ #
5
+ # @example Reading RDF/JSON data
6
+ # RDF::JSON::Reader.open("spec/data/test.json") do |reader|
7
+ # reader.each_statement do |statement|
8
+ # puts statement.inspect
9
+ # end
10
+ # end
11
+ #
12
+ # @see http://n2.talis.com/wiki/RDF_JSON_Specification
13
+ class Reader < RDF::Reader
14
+ format RDF::JSON::Format
15
+
16
+ # TODO
17
+ end
18
+ end
@@ -0,0 +1,19 @@
1
+ module RDF module JSON
2
+ module VERSION
3
+ MAJOR = 0
4
+ MINOR = 0
5
+ TINY = 0
6
+ EXTRA = nil
7
+
8
+ STRING = [MAJOR, MINOR, TINY].join('.')
9
+ STRING << "-#{EXTRA}" if EXTRA
10
+
11
+ ##
12
+ # @return [String]
13
+ def self.to_s() STRING end
14
+
15
+ ##
16
+ # @return [String]
17
+ def self.to_str() STRING end
18
+ end
19
+ end end
@@ -0,0 +1,11 @@
1
+ module RDF::JSON
2
+ ##
3
+ # RDF/JSON serializer.
4
+ #
5
+ # @see http://n2.talis.com/wiki/RDF_JSON_Specification
6
+ class Writer < RDF::Writer
7
+ format RDF::JSON::Format
8
+
9
+ # TODO
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rdf-json
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Arto Bendiken
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-12-28 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.2.9
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: yard
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.5.2
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rdf
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.9
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: json_pure
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.2.0
54
+ version:
55
+ description: RDF.rb plugin for parsing/serializing RDF/JSON.
56
+ email: arto.bendiken@gmail.com
57
+ executables: []
58
+
59
+ extensions: []
60
+
61
+ extra_rdoc_files: []
62
+
63
+ files:
64
+ - AUTHORS
65
+ - README
66
+ - UNLICENSE
67
+ - VERSION
68
+ - lib/rdf/json/format.rb
69
+ - lib/rdf/json/reader.rb
70
+ - lib/rdf/json/version.rb
71
+ - lib/rdf/json/writer.rb
72
+ - lib/rdf/json.rb
73
+ has_rdoc: false
74
+ homepage: http://rdf.rubyforge.org/
75
+ licenses:
76
+ - Public Domain
77
+ post_install_message:
78
+ rdoc_options: []
79
+
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 1.8.2
87
+ version:
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: "0"
93
+ version:
94
+ requirements: []
95
+
96
+ rubyforge_project: rdf
97
+ rubygems_version: 1.3.5
98
+ signing_key:
99
+ specification_version: 3
100
+ summary: RDF/JSON support for RDF.rb.
101
+ test_files: []
102
+