Skip to content

Use the bibliotek-o namespace for the bib2lod converter #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ TITLE_PROPERTY_245_QUERY = SPARQL.parse("PREFIX ld4l: <http://bib.ld4l.org/ontol

spec/support/m2bf_helpers.rb is an exemplar.

# A Note about the LD4 bib2lod converter
The bib2lod converter uses a configuration file to specify details about the input, output and namespace used in the conversion. When writing tests involving the namespace used with the bib2lod converter, be aware about the configuration detail in the config.json file that you use.


# Command line options, Rake tasks, and RSpec tags
## requiring that a specific converter be used
As mentioned above, adding a `helper_method` to the config.yml file will make that converter's helper method the global default for all validation tests. If you want to be able to call a chosen converter for a specific test, use the RSpec `--reqire` flag. In the spec/ directory there are several reference ruby rspec configuration files (e.g. bib2lod.rb) that, when called from the command line using the `--require` flag, will be invoked for those tests that you run. E.g. here the bib2lod.rb configuration file tells RSpec to use the 'marc_to_graph_bib2lod' method as the MARC2BF_GRAPH_METHOD for all of the tests:
Expand Down
2 changes: 1 addition & 1 deletion spec/support/bib2lod.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"localNamespace": "http://data.ld4l.org/stanford/",
"localNamespace": "http://bibliotek-o.org.org/stanford/",
"InputService": {
"class": "org.ld4l.bib2lod.io.FileInputService",
"source": "tmp/",
Expand Down
4 changes: 2 additions & 2 deletions spec/titles/title_from_245_subfield_a_b_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
expect(graph.query(TITLE_PROPERTY_245_QUERY).to_tsv).to include("Slippery noodles :")
end
it 'has a bf:mainTitle property' do
expect(graph.query(TITLE_PROPERTY_245_QUERY).to_tsv).to include("<http://data.ld4l.org/ontology/MainTitleElement>")
expect(graph.query(TITLE_PROPERTY_245_QUERY).to_tsv).to include("<http://bibliotek-o.org.org/ontology/MainTitleElement>")
end
end

Expand All @@ -39,7 +39,7 @@
expect(graph.query(SUBTITLE_245_QUERY).to_tsv).to include("a culinary history of China ")
end
it 'has a bf:subtitle property' do
expect(graph.query(SUBTITLE_245_QUERY).to_tsv).to include("<http://data.ld4l.org/ontology/SubtitleElement>")
expect(graph.query(SUBTITLE_245_QUERY).to_tsv).to include("<http://bibliotek-o.org.org/ontology/SubtitleElement>")
end
end

Expand Down