pho 0.7.5 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +21 -0
- data/Rakefile +1 -1
- data/doc/rdoc/classes/Pho.html +0 -5
- data/doc/rdoc/classes/Pho/CommandLine.html +108 -108
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +15 -15
- data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +3 -3
- data/doc/rdoc/classes/Pho/Etags.html +36 -36
- data/doc/rdoc/classes/Pho/Facet/Results.html +1 -1
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +106 -106
- data/doc/rdoc/classes/Pho/FieldWeighting.html +14 -14
- data/doc/rdoc/classes/Pho/Job.html +67 -68
- data/doc/rdoc/classes/Pho/Jobs.html +62 -62
- data/doc/rdoc/classes/Pho/OAI/Records.html +7 -6
- data/doc/rdoc/classes/Pho/OAI/Statistics.html +194 -0
- data/doc/rdoc/classes/Pho/QueryProfile.html +86 -81
- data/doc/rdoc/classes/Pho/ResourceHash.html +1 -1
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +36 -35
- data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +2 -3
- data/doc/rdoc/classes/Pho/Snapshot.html +36 -36
- data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +3 -4
- data/doc/rdoc/classes/Pho/Status.html +26 -26
- data/doc/rdoc/classes/Pho/Store.html +257 -254
- data/doc/rdoc/classes/Pho/StoreSparqlClient.html +14 -14
- data/doc/rdoc/classes/Pho/Update/Changeset.html +5 -6
- data/doc/rdoc/classes/Pho/Update/Changesets.html +2 -3
- data/doc/rdoc/classes/Pho/Update/Statement.html +3 -4
- data/doc/rdoc/classes/String.html +1 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +33 -4
- data/doc/rdoc/files/lib/pho/converter_rb.html +1 -8
- data/doc/rdoc/files/lib/pho/oai_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/query_profile_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
- data/doc/rdoc/files/lib/pho_rb.html +5 -3
- data/doc/rdoc/fr_class_index.html +0 -2
- data/doc/rdoc/fr_file_index.html +0 -1
- data/doc/rdoc/fr_method_index.html +132 -136
- data/lib/pho.rb +7 -3
- data/lib/pho/converter.rb +23 -30
- data/lib/pho/oai.rb +5 -4
- data/lib/pho/query_profile.rb +6 -1
- data/lib/pho/store.rb +17 -12
- data/tests/tc_changeset_builder.rb +2 -2
- data/tests/tc_converter.rb +3 -3
- data/tests/tc_oai.rb +1 -1
- data/tests/tc_query_profile.rb +37 -1
- data/tests/ts_pho.rb +0 -1
- metadata +5 -9
- data/doc/rdoc/classes/Pho/RDF.html +0 -120
- data/doc/rdoc/classes/Pho/RDF/Parser.html +0 -279
- data/doc/rdoc/files/lib/pho/rdf_rb.html +0 -108
- data/lib/pho/rdf.rb +0 -76
- data/tests/tc_rdf_parser.rb +0 -37
data/tests/tc_rdf_parser.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
-
require 'pho'
|
3
|
-
require 'test/unit'
|
4
|
-
require 'mocha'
|
5
|
-
require 'rexml/document'
|
6
|
-
|
7
|
-
class RdfParserTest < Test::Unit::TestCase
|
8
|
-
|
9
|
-
NTRIPLES = <<-EOL
|
10
|
-
<http://www.example.org> <http://www.example.org/ns/resource> <http://www.example.org/page>.
|
11
|
-
EOL
|
12
|
-
|
13
|
-
def setup()
|
14
|
-
Dir.mkdir("/tmp/pho") unless File.exists?("/tmp/pho")
|
15
|
-
@file = File.new( File.join("/tmp/pho", "test.nt"), "w" )
|
16
|
-
@file.write(NTRIPLES)
|
17
|
-
@file.close()
|
18
|
-
end
|
19
|
-
|
20
|
-
def teardown()
|
21
|
-
Dir.glob("/tmp/pho/*.nt") do |file|
|
22
|
-
File.delete(file)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_parse_ntriples
|
27
|
-
data = Pho::RDF::Parser.parse_ntriples(@file)
|
28
|
-
assert_not_nil(data)
|
29
|
-
REXML::Document.new(data)
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_parse_ntriples_from_string
|
33
|
-
data = Pho::RDF::Parser.parse_ntriples_from_string(NTRIPLES, "http://www.example.org")
|
34
|
-
assert_not_nil(data)
|
35
|
-
REXML::Document.new(data)
|
36
|
-
end
|
37
|
-
end
|