Package org.openrdf.repository.sail

Examples of org.openrdf.repository.sail.SailRepository.initialize()


      con.close();
    }

    // Upload output data
    Repository outputRepository = new SailRepository(new MemoryStore());
    outputRepository.initialize();
    con = outputRepository.getConnection();
    con.setAutoCommit(false);

    stream = getClass().getResourceAsStream(outputData);
    try {
View Full Code Here


        RepositoryConnection conn = null;
        RepositoryWriter repositoryWriter = null;
       
        any23 = new Any23();
        Repository store = new SailRepository(new MemoryStore());
        store.initialize();
        try
        {
            conn = store.getConnection();
            repositoryWriter = new RepositoryWriter(conn);
            Assert.assertTrue( any23.extract(fileDocumentSource, repositoryWriter, encoding).hasMatchingExtractors() );
View Full Code Here

            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

  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

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.