Hi, I’m an apache Jena user too. Unfortunately i’m not texting you because i have a solution for you problem but because i hope you can help me with mine.
I will be glad to help you in the future. Here is my question : Which version of apache HttpCore and HttpClient are you using ? I’m trying to use DataAccessor as you but my code does not run. You can find more informations about my question here : http://stackoverflow.com/questions/35813506/jena-datasetaccessor-http-incompatibility Any help is very appreciated, i’m stuck since 5 days :( Thank you so much Luca > On 05 Mar 2016, at 12:57, Valerio Belcastro <[email protected]> > wrote: > > Hi guys, > > I launched Fuseki 2.3.1 as a standalone server on my local machine from > command line like this: > > path-to-fuseki-folder>fuseki-server --update --mem /myData > > Then I uploaded some data into the dataset default graph using this code > snippet: > > String personURI = "http://somewhere/JohnSmith"; > String malcolmURI = "http://somewhere/MalcolmGraves"; > String givenName = "John"; > String familyName = "Smith"; > String fullName = givenName + " " + familyName; > String fullName2 = "Malcolm Graves"; > String email = givenName+familyName+"@gmail.com"; > // create an empty Model > Model model = ModelFactory.createDefaultModel(); > // create the resource // and add the properties cascading style > Resource johnSmith > = model.createResource(personURI) > .addProperty(VCARD.FN, fullName) > .addProperty(VCARD.N, > model.createResource() > .addProperty(VCARD.Given, givenName) > .addProperty(VCARD.Family, familyName)); > > model.setNsPrefix("vcard", VCARD.getURI()); > DatasetAccessor dsa = DatasetAccessorFactory.createHTTP("http:/ > /localhost:3030/myData/data"); > > dsa.add(model); > > > After that, I retrieved the default graph and printed his prefix map: > > Iterator<Map.Entry<String, String>> nsIt = dsga.getModel().getN > sPrefixMap().entrySet().iterator(); > nsIt.forEachRemaining(ns -> { > System.out.println(ns); }); > > > The output I obtained is the following: > > vcard=http://www.w3.org/2001/vcard-rdf/3.0# > > rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# > > > If I do the same thing loading the model into a named graph instead of > the defaultgraph nothing is printed on console, it is like the prefix > map is empty. > > Do I need to configure something to make things work? > > Thank you in advance
