Dear list,

I want to add structured data to KIM. Looking at the APIs, I see to ways:

- SemanticRepositoryAPI's addStatement(): adds a triple (subject, predicate, object)
  
http://nmwiki.semanticannotation.com/kim-javadoc/com/ontotext/kim/client/semanticrepository/SimplifiedSemanticRepositoryAPI.html#addStatement(org.openrdf.model.Resource,%20org.openrdf.model.URI,%20org.openrdf.model.Value)

- SemanticRepositoryAPI's importData() variants: adds data from a RDF file
  
http://nmwiki.semanticannotation.com/kim-javadoc/com/ontotext/kim/client/semanticrepository/SemanticRepositoryAPI.html#importData(java.lang.String,%20java.lang.String,%20org.openrdf.sesame.constants.RDFFormat,%20boolean)

Does anybody have some sample/unit test code to illustrate both methods?

For instance, I have to person entities in my repo: "Sani Abacha" and "Mohammed Abacha", the former's son. I want to add the relationship ("Sani Abacha", hasChild, "Mohammed Abacha"), for instance. In order to use SemanticRepositoryAPI's addStatement(), I would search for the two entities using SeRQL, RQL, or the QueryAPI (all work for this, right?) and would look up the desired relation in http://proton.semanticweb.org/2005/04/protont (is there a documentation/"ProtonDoc" for it?). Correct?

Thanks,
Kaspar
_______________________________________________
Kim-discussion mailing list
Kim-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/kim-discussion

Reply via email to