Jump to content

Load RDF data

- - - - -

  • Please log in to reply
2 replies to this topic

#1
priyam_maheshwari

priyam_maheshwari

    Newbie

  • Members
  • Pip
  • 2 posts
Hi

I have written this following code to load a local RDF file to my local Virtuoso instance with the help of Jena. But even for the smallest of RDF file it times out. Can anybody please point out what could be the possible cause

import com.hp.hpl.jena.query.*; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.RDFNode; import com.hp.hpl.jena.update.UpdateException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import virtuoso.jena.driver.VirtDataSource; import virtuoso.jena.driver.VirtGraph; import virtuoso.jena.driver.VirtuosoUpdateFactory; import virtuoso.jena.driver.VirtuosoUpdateRequest;


 /**

 *

 * @author Priyam

 */

public class Main {

    public static void main(String[] args) throws FileNotFoundException {

VirtGraph set = new VirtGraph ("jdbc:virtuoso://localhost:1111", "dba", "dba");

   InputStream in = new FileInputStream("C://Users//Dell//Documents//NetBeansProjects//CoKo//build//web//files//test11.rdf");

  VirtuosoUpdateRequest vur = VirtuosoUpdateFactory.read(in,set);

                vur.exec();

System.out.println("done");


    }


}


#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
Maybe you're confusing '//' with '\\'.
A forward slash is no special character and can be written just like that ( so use only 1 forward slash).

A backslash is a special character, and should be escaped by using another hence why you use 2 backslashes if you want to use a "real" backslash.

#3
priyam_maheshwari

priyam_maheshwari

    Newbie

  • Members
  • Pip
  • 2 posts
tried that also, but with no effect :(




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users