Package org.openrdf.sail.memory

Examples of org.openrdf.sail.memory.MemoryStore


        }

        String artifactValue = System.getProperty( "artifact" );
        String[] tokens = artifactValue.split( "[:]" );

        org.openrdf.repository.Repository rdfRepository = new SailRepository( new MemoryStore( localRepository ) );
        try
        {
            rdfRepository.initialize();
        }
        catch ( RepositoryException e )
View Full Code Here


        if ( localRepository == null )
        {
            localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" );
        }
       
        org.openrdf.repository.Repository rdfRepository = new SailRepository( new MemoryStore( localRepository ) );
       
        try
        {
            rdfRepository.initialize();
        }
View Full Code Here

    private Sail sail;
    private SailGraph sailGraph;

    @Before
    public void setUp() throws Exception {
        sail = new MemoryStore();
        sailGraph = new SailGraph(sail);
    }
View Full Code Here

  protected Repository rdfRep;
  private String label;

  public RDFSingleDataSet() {
    try {
      rdfRep = new SailRepository(new ForwardChainingRDFSInferencer(new MemoryStore()));
      rdfRep.initialize();
     
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
View Full Code Here

  public JSONArray loadHistory(String filename) throws Exception {
    File file = new File(filename);
//    String encoding = EncodingDetector.detect(file);
//    String contents = EncodingDetector.getString(file, encoding);
   
    SailRepository myRepository = new SailRepository(new MemoryStore());
    myRepository.initialize();
    SailRepositoryConnection con = myRepository.getConnection();
    con.add(file, "", RDFFormat.TURTLE);
   
    RepositoryResult<Statement> result = con.getStatements(null, new URIImpl("http://isi.edu/integration/karma/dev#hasWorksheetHistory"), null, false);
View Full Code Here

    return mappingRes;
  }

  private void initializeTripleStore() throws RepositoryException {
    /** Initialize an in-memory sesame triple store **/
    myRepository = new SailRepository(new MemoryStore());
    myRepository.initialize();
    con = myRepository.getConnection();
    f = myRepository.getValueFactory();
  }
View Full Code Here

    static public RepoSailTuple createMemoryRepository(File dir) {
        try {
            Repository r = null;
            Sail s = null;
            if (dir != null) {
                s = new MemoryStore(dir);
                r = new SailRepository(s);
            } else {
                s = new MemoryStore();
                r = new SailRepository(new MemoryStore());
            }
            r.initialize();

            return new RepoSailTuple(r,s);
        } catch (Exception e) {
View Full Code Here

    } catch (IOException e) {
      Global.log().warning("Failed to write result to temporary file");
      return;
    }
   
    Repository tempRepository = new SailRepository(new MemoryStore());
    RepositoryConnection conn = null;
    try {
      tempRepository.initialize();
      conn = tempRepository.getConnection();
    } catch (RepositoryException e1) {
View Full Code Here

  RDFFormat rdfType=RDFFormat.N3;
 
  public RDFGraphClusteringAnnotator(File data, Type type) {
    originalDataFile = data;
    currentType = type;
    tempRepository = new SailRepository(new MemoryStore());
    try {
      tempRepository.initialize();
      conn = tempRepository.getConnection();
      if(type == Type.RDFXML)
        rdfType = RDFFormat.RDFXML;
View Full Code Here

        doTestSuite(new SailGraphSpecificTestSuite(this));
        printTestPerformance("SailGraphSpecificTestSuite", this.stopWatch());
    }

    public Graph generateGraph() {
        return new SailGraph(new MemoryStore());
    }
View Full Code Here

TOP

Related Classes of org.openrdf.sail.memory.MemoryStore

Copyright © 2018 www.massapicom. 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.