rdf - Building AliBaba java example -


good evening,

i new java persistence api , test alibaba see do. alibaba website. read part of the exemple given here. have whole alibaba project , 2 files exemple, modified little exemple.

//document.java package org.openrdf.example;  import org.openrdf.annotations.iri;  @iri(document.ns + "document") public class document { public static final string ns = "http://meta.leighnet.ca/rdf/2009/gs#";  @iri(ns + "title") string title;  public string gettitle() {     return title; } public void settitle(string title) {     this.title = title; } } 

and other file:

//my main many imports public class main { public static void main(string[] args) throws java.lang.illegalaccessexception {     // create document     document doc = new document();     // give title     doc.settitle("getting started");     system.out.println("title of new document: "+doc.gettitle());      // add document repository     objectconnection con = repository.getconnection();     // problem here 

my problem located in line:

objectconnection con = repository.getconnection(); 

i have declaration of 'repository'. error object type.

thank you help, hope writting understandable first post here.

you can create in-memory sesame repository this:

// create repository repository store = new sailrepository(new memorystore()); store.initialize();  // wrap in object repository objectrepositoryfactory factory = new objectrepositoryfactory(); objectrepository repository = factory.createrepository(store); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -