Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2009 Mysema Ltd.
  * All rights reserved.
  * 
  */
 package com.mysema.rdfbean.sesame;
 
 import java.io.File;
 
import  javax.annotation.Nullable;
import  org.openrdf.repository.Repository;
import  org.openrdf.repository.sail.SailRepository;
import  org.openrdf.sail.nativerdf.NativeStore;
Implementation of the Repository interface using NativeStore

Author(s):
sasa
public class NativeRepository extends AbstractSesameRepository {
    
    @Nullable
    private File dataDir;
        
    public NativeRepository(){}
    public NativeRepository(File dataDirboolean sesameInference) {
        this. = dataDir;
        setSesameInference(sesameInference);
    }
    
    public NativeRepository(File dataDirOntology ontology) {
        this. = dataDir;
        setOntology(ontology);
    }
    
    public NativeRepository(Ontology ontology) {
        setOntology(ontology);
    }
    @Override
    protected Repository createRepository(boolean sesameInference) {
        NativeStore store = new NativeStore(Assert.notNull());
        if (sesameInference){
            return new SailRepository(new ExtendedRDFSInferencer(store));
        }else{
            return new SailRepository(store);
        }
    }        
    public void setDataDir(File dataDir) {
        this. = dataDir;
    }
    
    public void setDataDirName(String dataDirName) {
        if (StringUtils.isNotEmpty(dataDirName)) {
            this. = new File(dataDirName);
        }
    }
New to GrepCode? Check out our FAQ X