On 13/05/13 10:41, Joseph Daryl Locsin wrote:
How do you create a model of this strings using HTTP GET and/or POST?
String uri = "http://workingontologist.org/Examples/Chapter3/Product.n3";
String uri2 = "http://dbpedia.org/page/Pizza";
My project involves getting an external ontology and customizing it and
storing the custom ontology locally.
The pseudocode is
Create an HTTP GET or POST, add the string URL
Add appropriate Header info for handling N3, Turtle, RDF/XML
Read the file, return the String ontology
Create a model using the String ontology
Thank you very much
What have you tried?
Your project seems to be about learning how HTTP content negotiation
works for RDF data. I suggest you use a tool like wget or curl to make
the GET request to understand about setting up the HTTP request.
Except they are bad examples:
http://workingontologist.org/Examples/Chapter3/Product.n3
always returns text/plain, whatever you ask for
http://dbpedia.org/page/Pizza refuses to return N3, Turtle or RDF/XML
(it's RDFa in XHTML only).
Andy