Homework #1 FAQ

1. How do I specify a relative URI reference in Turtle?
Relative URIs in Turtle are written the same way full URIs are, in between angle brackets. It will be appended to the document's base URI to create an absolute URI, so it should start with a "#", e.g., <#myLocalName>
2. When I run Jena, I get the following messages:
   log4j:WARN No appenders could be found for logger (com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler).
   log4j:WARN Please initialize the log4j system properly.
   log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info. 
How do I fix this?
Jena uses log4j to manage and record its error messages. To make sure it works properly with your system, you need to tell Java where to find the log4j properties file. To do this:
  1. copy the jena-log4j.properties file from your apache-jena directory to your working directory
  2. then either:
    1. add the following line to your main class:
      static { org.openjena.atlas.logging.Log.setLog4j("jena-log4j.properties"); }
      or
    2. when you run java, add the VM argument: -Dlog4j.configuration=jena-log4j.properties . In Eclipse, you just have to enter this in the proper box of the Run Configuration. From the command-line, it looks something like:
      java -Dlog4j.configuration=jena-log4j.properties ReadPubRdf inputfile
      If you get it right, you'll see an error message regarding your RDF syntax...
3. Should we add datatypes to our RDF files? In the sample foundations.rdf file, the publishedYear literals are not datatyped.
Yes, technically these should have integer datatypes. For example:
<publishedYear rdf:datatype="&xsd;integer">2002</publishedYear>
I have updated the foundations.rdf file.