Skip to content

mark-watson/java_practical_semantic_web

Repository files navigation

Companion software examples for the book “Practical Semantic Web and Linked Data Applications (Java, Scala, Clojure, and JRuby Edition)”

You can get the free PDF of this book on my Open Content web page www.markwatson.com/opencontent/.

You can order a print book (or a paid for PDF) from Lulu: www.lulu.com/commerce/index.php?fBuyContent=10914825

You can read all of my books for free on my website [markwatson.com](https://markwatson.com).

If you would like to support my work please consider purchasing my books on [Leanpub](leanpub.com/u/markwatson) and star my git repositories that you find useful on [GitHub](github.com/mark-watson?tab=repositories&q=&type=public). You can also interact with me on social media on [Mastodon](mastodon.social/@mark_watson) and [Twitter](twitter.com/mark_l_watson).

All of the book software examples that I wrote are licensed using the LGPL license version 3.

I use a variety of 3rd party JAR files contained in the lib directory.

While most of the software is written in Java, I have made an attempt to also support people who prefer JRuby, Clojure, or Scala with wrappers for those languages.

Donate on Patreon to support all of my projects

Please visit [www.patreon.com/markwatson](https://www.patreon.com/markwatson) and sign up to donate $1/month

Examples work with AllegroGraph 4.0 and Sesame

I have written compatibility wrappers so the book examples can use either the open source Sesame RDF repository or the commercial AllegroGraph product. My wrapper for Sesame adds support for geolocation and text indexing and search.

As of June 2010 you can download the free edition of AllegroGraph version 4 at www.franz.com/agraph/downloads/

Using IntelliJ

Using the free community version of IntelliJ 10, make sure the Clojure and Scala plugins are installed (should be by default), set default JDK version to 5.0, create a new project “Create Java project using existing sources” and make sure do include all of the JAR files in the lib sub directory into the project’s required resources (do this by “Open Module Settings”, click the “Dependencies” tab, Add -> “Single Entry Module Library…”, select all JAR files in lib and the Sesame sub directory of lib, hit “Apply”. Then make sure the test directory is in your source path.).

You should then be able to run any of the examples by right mouse clicking any file in the test directory and choosing the “Run…” option.

Using Eclipse

The directions are similar to those for IntelliJ: create a new Java Eclipse project, import the example directory from this git repository, make sure that all JAR files in the lib directory are imported as external JAR files, and then run the Java test programs in the test directory. Note: I am not an Eclipse user: if anyone will donate directions for installing and running the Eclipse Clojure and Scala plugins, I will add those directions here.

11/11/2013 note: I changed the behavior of the DBPediaLookup class, giving better results

11/11/2013 note: the Clojure code is in the ZIP file CLOJURE_CODE.zip. UnZI this file first if you want to use the CLojure examples.

7/13/2010 note: current AG 4.04 release breaks geospatial queries: a new 4.1 release in August will fix this.

-Mark Watson

3/12/2011 Thanks to Alex Ott for Clojure code improvements and edits for my book.

About

Code examples for my book "Practical Semantic Web Programming (Java, Scala, Clojure, and JRuby Edition)

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published