Saturday, August 27, 2011

Setup Semantic Web Development Environment

What you need:
The following links will take you to the download area for each tool.

Java JDK
Eclipse
Jena
Protege
Pellet

Jena Tutorial
The following website will give you a step-by-step tutorial for the Jena library in Eclipse.

http://www.iandickinson.me.uk/articles/jena-eclipse-helloworld/

Note:  The following is the completed JenaTutorial example for HelloRDFWorld.java


package tutorial;

import com.hp.hpl.jena.datatypes.xsd.XSDDatatype;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;

public class HelloRDFWorld {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Model m = ModelFactory.createDefaultModel();
		String NS = "http://example.com/test/";
		
		Resource r = m.createResource(NS + "r");
		Property p = m.createProperty(NS + "p");
		
		r.addProperty(p,"hello world", XSDDatatype.XSDstring);
		
		m.write(System.out, "Turtle");
	}

}

The following is a screenshot of the completed HelloSemanticWeb example for Chapter 2 of the book.




3 comments:

  1. I have been surfing on-line greater than three hours nowadays, but I by no means found any attention-grabbing article like yours. It is lovely price sufficient for me. Personally, if all web owners and bloggers made excellent content as you did, the internet will be much more useful than ever before.
    Create a
    MySQL database , Give it Username & Password

    ReplyDelete
  2. if all web possessors and bloggers made magnificent substance as you did, the web will be substantially more helpful than at any other time.

    E-Commerce Website Design//Creative Apps And Webs

    ReplyDelete
  3. Thanks for writing an amazing blog post for us about Web development Dubai which helped me at my work, keep sharing more informative blogs.

    ReplyDelete