Tony Scerri
Fri, 11 Jun 2010 06:08:26 -0700
Thanks for the prompt reply. Can I just check on one situation regarding auto commit and remote repositories, which is the one you mentioned supplying an input stream to the add method on a repository connection. Looking at the Sesame source it would appear that setting auto commit to true and calling:
public void add(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts) should result in the streams contents being directly uploaded to the server where I assume it will then be parsed and stored. This would seem to possibly offer the most efficient method, ignoring implications for failed parses and for partial commitals etc. Having just been using this I can't say it looked any quicker to me, but I dont know whether this is do with the actual store taking a long time to injest the contents or if its not behaving as expected for some reason. Thanks Tony On Fri, Jun 11, 2010 at 1:50 PM, Ivan Peikov <ivan.pei...@ontotext.com>wrote: > 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