Package org.openrdf.repository

Examples of org.openrdf.repository.Repository.initialize()


            config.setClusterPort(port);

            KiWiStore store = new KiWiStore(config);

            Repository repository = new SailRepository(store);
            repository.initialize();

            return repository;
        }

        private static CacheManager getCacheManager(Repository repository) {
View Full Code Here


    }

    @Before
    public void setup() throws RepositoryException {
        Repository repository = new SailRepository(new MemoryStore());
        repository.initialize();

        uri_string = prefix + local;
        uri = repository.getValueFactory().createURI(prefix, local);

        repository.shutDown();
View Full Code Here

     * @throws org.openrdf.repository.RepositoryException
     * @throws java.io.IOException
     */
    public static Repository loadData(String path, RDFFormat format) throws RDFParseException, RepositoryException, IOException {
        Repository repo = new SailRepository(new MemoryStore());
        repo.initialize();
        RepositoryConnection conn = repo.getConnection();
        try {
            conn.begin();
            conn.clear();
            InputStream is = LdpTestCasesUtils.class.getResourceAsStream(path);
View Full Code Here

    public void testCreateCacheKey() throws Exception {
        Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",null,(String)null), LiteralCommons.createCacheKey("ABC",null,(String)null));
        Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",null,(URI)null), LiteralCommons.createCacheKey("ABC",null,(URI)null));

        Repository repository = new SailRepository(new MemoryStore());
        repository.initialize();

        ValueFactory vf = repository.getValueFactory();

        // create a string literal without language and datatype and test if the hash key is correct between
        // the different methods
View Full Code Here

        for (String f : args) {
            System.out.println(f);
            System.out.println("Message Digest is:\t"+fileDigest(new File(f)).toString(16));
            GraphDigest digest = new GraphDigest();
            Repository myRepository = new SailRepository(new MemoryStore());
            myRepository.initialize();
            RepositoryConnection conn = myRepository.getConnection();
            conn.add(new File(args[0]), "#", RDFFormat.forFileName(f));
            conn.commit();
            conn.close();
            digest.update(myRepository, false, false);
View Full Code Here

 
  Repository buildExpectedModel() throws Exception{
    //see test2.xlsx and rdfschema2.png

    Repository model = new SailRepository(new MemoryStore());
    model.initialize();
   
    RepositoryConnection con = null;
    try{
      con = model.getConnection();
      ValueFactory vf = con.getValueFactory();
View Full Code Here

    //see test1.xlsx and rdfschema1.png
   
    RepositoryConnection con = null;
    try{
      Repository repo = new SailRepository(new MemoryStore());
      repo.initialize();
      con = repo.getConnection();
      ValueFactory vf = con.getValueFactory();
   
      URI post = vf.createURI("http://reference.data.gov.uk/id/department/bis/post/101198");
      con.add(vf.createStatement(post, RDF.TYPE, vf.createURI("http://reference.data.gov.uk/def/central-government/CivilServicePost")));
View Full Code Here

  Repository buildExpectedModel() throws Exception{
    //see test2.xlsx and rdfschema2.png

    Repository model = new SailRepository(new MemoryStore());
    model.initialize();
   
    RepositoryConnection con = null;
    try{
      con = model.getConnection();
      ValueFactory vf = con.getValueFactory();
View Full Code Here

    }
  }
 
  private Repository getRepository(InputStream in, RDFFormat format) throws Exception{
    Repository therepository = new SailRepository(new MemoryStore());
    therepository.initialize();
    RepositoryConnection con = therepository.getConnection();
    con.add(in, "", format);
    con.close();
    return therepository;
  }
View Full Code Here

      runner.setHTTPUserAgent("google-refine-rdf-extension");
      HTTPClient client = runner.getHTTPClient();
      DocumentSource source = new HTTPDocumentSource(client, url);
      Repository repository = new SailRepository(
          new ForwardChainingRDFSInferencer(new MemoryStore()));
      repository.initialize();
      RepositoryConnection con = repository.getConnection();
      RepositoryWriter w = new RepositoryWriter(con);
      ReportingTripleHandler reporter = new ReportingTripleHandler(w);
      runner.extract(source, reporter);
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.