Skip to content
Examples for Accessing Jena API through JRuby
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
javalib
README.md
example_1.rb
example_10.rb
example_11.rb
example_2.rb
example_3.rb
example_4.rb
example_5.rb
example_6.rb
example_7.rb
example_8.rb
example_9.rb
query_dbpedia_example.rb
query_dbpedia_example2.rb
query_dbpedia_geo_example.rb
sample_input.rdf
vc-db-3.rdf
vc-db-4.rdf

README.md

JRuby - Jena Semantic Web Examples

These are some examples in JRuby following along the examples given in the in Jena API Docs.

  • example_1.rb: Tutorial 1 - Creating a Simple Model
  • example_2.rb: Tutorial 2 - Resources as property values
  • example_3.rb: Tutorial 3 - Statement attribute accessor methods
  • example_4.rb: Tutorial 4 - Create a model and write it in XML form to standard out
  • example_5.rb: Tutorial 5 - Read RDF XML from a file and write it to standard out
  • example_6.rb: Tutorial 6 - Navigating a model
  • example_7.rb: Tutorial 7 - Selecting the VCARD resources
  • example_8.rb: Tutorial 8 - Demonstrate Selector methods
  • example_9.rb: Tutorial 9 - Demonstrate graph operations
  • example_10.rb: Tutorial 10 - Demonstrate a container
  • example_11.rb: Tutorial 11 - More on literals

Also examples of querying DBPedia

  • query_dbpedia_example.rb : German Musicians with a birth place of Berlin
  • query_dbpedia_geo_example.rb: Places nearby the White House
  • query_dbpedia_example2.rb: Musical Artist Sopranos with the hometown as the US

Running

Run the examples with jruby

Something went wrong with that request. Please try again.