Permalink
Browse files

cleaned up example 1

  • Loading branch information...
1 parent b92662b commit d7f42c8492d1162d9084f9aeea4db6e4f837e09a @gigasquid committed Jul 7, 2011
Showing with 4 additions and 10 deletions.
  1. +4 −10 example_1.rb
View
@@ -1,28 +1,22 @@
require 'javalib/jena-2.6.4.jar'
-require 'javalib/arq-2.8.7.jar'
require 'javalib/icu4j-3.4.4.jar'
require 'javalib/iri-0.8.jar'
require 'javalib/log4j-1.2.13.jar'
-require 'javalib/lucene-core-2.3.1.jar'
require 'javalib/slf4j-api-1.5.8.jar'
require 'javalib/slf4j-log4j12-1.5.8.jar'
-require 'javalib/stax-api-1.0.1.jar'
-require 'javalib/wstx-asl-3.2.9.jar'
require 'javalib/xercesImpl-2.7.1.jar'
require 'java'
java_import 'com.hp.hpl.jena.vocabulary.VCARD'
java_import 'com.hp.hpl.jena.rdf.model.ModelFactory'
-#Creating a model
-m = ModelFactory.create_default_model
-
-#Creating a resource
+#Tutorial 1 Creating a Simple Model
+model = ModelFactory.create_default_model
person_uri = "http://somewhere/JohnSmith"
full_name = "John Smith"
-john_smith = m.create_resource(person_uri)
+john_smith = model.create_resource(person_uri)
john_smith.add_property(VCARD::FN, full_name)
-m.write(java.lang.System::out)
+model.write(java.lang.System::out)

0 comments on commit d7f42c8

Please sign in to comment.