Ivan Peikov
Fri, 11 Jun 2010 05:51:28 -0700
Hi Tony, First on the most efficient way to import an RDF file into a sesame repository. Basically, every approach is OK as long as you have turned off the auto-commit option of your connection. You will see a lot worse import performance if every other statement is committed. This holds for every other operation from the API as well, not only RDF import. In your situation I would probably use one of the many comfort methods provided by Sesame's RepositoryConnection like
RepositoryConnection.add(InputStream in, String baseURI, RDFFormat f, ...) This will take care of the trivial tasks like reading the file (from file system or Internet), parsing it, adding statements and committing them. On you second question - yes, there are parts of RDFS and OWL which are included implicitly in the inference engine. However, I there is nothing wrong if you add them again explicitly. In most of the cases you won't gain anything from this but you will definitely not lose either. Cheers, Ivan On Friday 11 June 2010 15:25:18 Tony Scerri wrote: > Hi > > This maybe more of a Sesame API related question than specificaly related > to OWLIM. However as I'm using BigOWLIM behind a Sesame Server I thought > i'd ask here anyway. I'm relatively new to the various stores, servers, > APIs invovled so getting a feel for how best to do things. The first task > is loading RDF in my case OWL files. I have two setups one requiring to > pull down OWL files off the web, another using local files. My setup has a > Sesame 2.3.1 remote repository behind which I have a variety of stores > (just getting to graps with the various options). However I'm looking at > ways to populate them with OWL ontologies including referenced imports. I > have a setup which now works and looks for missing import in the repository > and goes off to pull those down. > > What I noticing is its very slow, compared with say using the Workbench and > manually adding the OWL files one at a time. Through the Sesame API it > seems there a variety of calls that could be made (namely the add methods > on the repository connection), either passing in one statement at a time > (assuming I had parsed the RDF) or you can supply a File, URL or input > stream. I'm trying to figure out which would be the most efficient method > to be calling from a client machine when dealing with both web base and > local file based resources. I believe setting the auto commit may have an > impact on this too and was looking at the Sesame source code to see what > the various calls do in this regard, but I wanted to hear what others > already using this have experienced. > > One other minor question regarding imports, i have seen other examples of > code to resolve missing imports and load them, some seem to ignore the RDFS > and OWL URIs and do not load those, others simply process anything. Again > just wondering which if any its necessary to import (is this because the > information is already contained within the repository explicitly or as > part of the querying/inferening support). > > Thanks > > Tony _______________________________________________ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion