0

I am trying to add this simple example of RDF:

<rdf:RDF>
<rdf:Description>
<rdf:subject resource="http://www.w3.org/Home/Lassila"/>
<rdf:predicate resource="http://description.org/schema/Creator"/>
<rdf:object>Ora Lassila</rdf:object>
<rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<a:attributedTo>Ralph Swick
</a:attributedTo>           
</rdf:Description>             
</rdf:RDF>

into the Blazegraph triple store, but I am getting the following error:

ERROR: INSERT-WITH-BODY: baseURI=http://localhost:9999/bigdata/namespace/undefined/sparql, context-uri=[]  
java.util.concurrent.ExecutionException:     com.bigdata.rdf.sail.webapp.DatasetNotFoundException: Not found: namespace=undefined 
at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
at java.util.concurrent.FutureTask.get(FutureTask.java:188) 
at com.bigdata.rdf.sail.webapp.InsertServlet.doPostWithBody(InsertServlet.java:203) 
at com.bigdata.rdf.sail.webapp.InsertServlet.doPost(InsertServlet.java:119) 
at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:272)      
at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:144) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769) 
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) 
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

As far as I know, I am keeping a close check at namespace.

I have also tried this example:

prefix dcterm: <http://purl.org/dc/terms/>
prefix dc: <http://purl.org/dc/elements/1.1/>
<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://purl.org/metadata/dublin_core#"> 
<rdf:Description about="http://www.foo.com/cool.html"> 
  <dc:Creator>
    <rdf:Seq ID="CreatorsAlphabeticalBySurname">
      <rdf:li>Mary Andrew</rdf:li>
      <rdf:li>Jacky Crystal</rdf:li>
    </rdf:Seq>
  </dc:Creator>

  <dc:Identifier>
    <rdf:Bag ID="MirroredSites"> 
      <rdf:li rdf:resource="http://www.foo.com.au/cool.html"/>
      <rdf:li rdf:resource="http://www.foo.com.it/cool.html"/>
    </rdf:Bag>
  </dc:Identifier>

  <dc:Title>
    <rdf:Alt>
      <rdf:li xml:lang="en">The Coolest Web Page</rdf:li>
      <rdf:li xml:lang="it">Il Pagio di Web Fuba</rdf:li>
    </rdf:Alt>
  </dc:Title>
</rdf:Description> 

honk
  • 9,137
  • 11
  • 75
  • 83
Niharika Roy
  • 103
  • 1
  • 1
  • 7
  • Note that your question is incomplete, you haven't show how you attempt to insert the data so we have no way of knowing if you are using the appropriate API call – RobV Mar 17 '15 at 09:23
  • But I have tried every simple to simple example but it is still giving error even for the ones validated by the validator. I am trying to insert simply by the update call of the triple store 'Blazegraph'. I am also mentioning the namespace but its not working.Event for the geoname ontology its showing the same error. – Niharika Roy Mar 17 '15 at 09:37
  • problem solved.There was a silly mistake.I was supposed to check the use namespace instead of writing that. – Niharika Roy Mar 17 '15 at 09:50

1 Answers1

3

Your sample data is not valid XML so it can't possibly be valid RDF/XML - you haven't defined any namespaces in the XML so it is invalid.

Using the W3C XML Validator I get the following errors:

Error Line 2, Column 8: Namespace prefix rdf on RDF is not defined <rdf:RDF>

Error Line 3, Column 19: Namespace prefix rdf on Description is not defined
<rdf:Description>

Error Line 4, Column 57: Namespace prefix rdf on subject is not defined <rdf:subject resource="http://www.w3.org/Home/Lassila"/>

Error Line 5, Column 66: Namespace prefix rdf on predicate is not defined
<rdf:predicate resource="http://description.org/schema/Creator"/>

Error Line 6, Column 14: Namespace prefix rdf on object is not defined
<rdf:object>Ora Lassila</rdf:object>

Error Line 7, Column 76: Namespace prefix rdf on type is not defined
<rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>

Error Line 8, Column 18: Namespace prefix a on attributedTo is not defined
<a:attributedTo>Ralph Swick

Similarly using the W3C RDF/XML Validator I get the following error:

FatalError: The prefix "rdf" for element "rdf:RDF" is not bound.[Line = 2, Column = 10]

RobV
  • 28,022
  • 11
  • 77
  • 119