Incorporating the Semantic Web into Java

Timothy Armstrong t.armstrong888 at gmail.com
Wed Aug 26 17:14:07 UTC 2015


Greetings,

I want to propose that we incorporate the Semantic Web technologies as a 
core part of Java.  The Semantic Web and object-oriented programming are 
very compatible and can work very well together.  I have always believed 
there is a lot of value in the Semantic Web, and I believe that it would 
be very beneficial for Java to incorporate the Semantic Web in the 
manner I have in mind.

This is my first post here.  I thought this mailing list might be the 
best place to post.  I recently signed the Oracle Contributor Agreement.

People have always noted connections between object-oriented programming 
and the Semantic Web, such as in the introduction to the Semantic Web at 
[1], which you could read if you are not familiar with the Semantic 
Web.  I believe that we should integrate the two technologies more closely.

I have written a large piece of software towards using the Semantic Web 
in Java [2].  I would be very pleased to contribute any of this code to 
OpenJDK, if you think it would be worthwhile.  The software allows us to 
give IRI's and semantics to Java classes and attributes using Java 
annotations.  For example, here is the isDefinedBy.java file for the 
isDefinedBy property in the RDFS ontology:


@RDFProperty
@label("isDefinedBy")
@comment("The definition of the subject resource.")
@isDefinedBy("http://www.w3.org/2000/01/rdf-schema#")
@domain(Resource.class)
@range(Resource.class)
@subPropertyOf(seeAlso.class)

@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface isDefinedBy
{
     public String[] value();
}


We can treat Java classes as unary predicates, as in the Semantic Web, 
and Java attributes as binary predicates relating two entities, as RDF 
properties.  Then we can use the OWL reasoning in Java programs in a 
manner that is fully compatible with Java, and we can make Java data 
into linked data so that we can run SPARQL queries on the data and post 
the data on the Semantic Web.

My software is a Java library intended to be useful in writing Java 
programs in general.  I published an article about the ideas in 2014 
[3], and I explain more what I am thinking on the front page of the 
software's web site.

The Semantic Web is a mature set of technologies.  Mostly what we would 
need to do is connect existing reasoning and SPARQL algorithms to Java.  
I have written the framework for doing so.

I hope you find these ideas interesting.  I would very much like to work 
together with other people on developing software towards these goals.  
Functional programming was a great addition to Java 8, and I think the 
Semantic Web would be a great addition to Java 9 or 10.

Regards,
Tim Armstrong


[1] http://www.w3.org/TR/sw-oosd-primer/
[2] http://semanticoop.sourceforge.net
[3] http://dl.acm.org/citation.cfm?id=2630608


More information about the discuss mailing list