On 25/09/13 04:22, Michel de Lange wrote:
Hello again,


The code(from the tutorial) which throws up the deprecation warning is
like this:

I'll fix the documentation.


           String directory = "MyDatabases/DB1" ;
           model = TDBFactory.createModel(directory) ;

           String personURI    = "http://somewhere/JaneSmith";;
           String fullName     = "Fred Smith";
           // create the resource
           Resource johnSmith = model.createResource(personURI);
           // add the property
           // johnSmith.addProperty(VCARD.FN, fullName);
           model.close()


If I understand correctly, a model in Jena corresponds to a graph. But
in this code, the model
seems to relate to the database. How do I write the above codeif I have
several
named graphs.


Model model = dataset.getDefaultModel()
or
Model model = dataset.getNamedModel(String uri)

        Andy



Many thanks



Michel














Hi again,

I am following these instructions to create a model or dataset:


http://jena.apache.org/documentation/tdb/java_api.html#using-a-directory-name



However, this results in warnings that the methods are deprecated. What
is the correct way to do this?


Thank you, and with kind regards,



Michel





Reply via email to