Package org.openrdf.sail.memory

Examples of org.openrdf.sail.memory.MemoryStore


  public void doFDL(String outputFDLFile) {
    SesameRenderer renderer = new SesameRenderer();
    org.w3c.dom.Document doc;
    try {
      /* Set up the repository that contains Fresnel lenses and formats */
      fresnelRepository = new SailRepository(new MemoryStore());
        fresnelRepository.initialize();
        RepositoryConnection fresnelConnection = fresnelRepository.getConnection();
        File fresnelFile = new File(TEST_FRESNEL_PROGRAM_FILE_NAME);
        fresnelConnection.add(fresnelFile, fresnelFile.toURL().toString(), RDFFormat.N3);
      /* Set up the repository that contains RDF data */
      dataRepository = new SailRepository(new MemoryStore());
      dataRepository.initialize();
      RepositoryConnection dataConnection = dataRepository.getConnection();
      File dataFile = new File(FOAF_TEST_MODEL_FILE);
        dataConnection.add(dataFile, dataFile.toURL().toString(), RDFFormat.RDFXML);
     
View Full Code Here


    //metak renderer
    de.unikoblenz.isweb.metak4lena.SesameRenderer renderer = new de.unikoblenz.isweb.metak4lena.SesameRenderer();
    org.w3c.dom.Document doc;
    try {
      /* Set up the repository that contains Fresnel lenses and formats */
      fresnelRepository = new SailRepository(new MemoryStore());
        fresnelRepository.initialize();
        RepositoryConnection fresnelConnection = fresnelRepository.getConnection();
       
       
        FresnelSesameParser fp = new FresnelSesameParser();
        File lensFile= new File(TEST_FRESNEL_PROGRAM_FILE_NAME);
      fd = fp.parse(lensFile, Constants.N3_READER);
     
        File fresnelFile = new File(TEST_FRESNEL_PROGRAM_FILE_NAME);
        fresnelConnection.add(fresnelFile, fresnelFile.toURL().toString(), RDFFormat.N3);
      /* Set up the repository that contains RDF data */
      dataRepository = new SailRepository(new MemoryStore());
      dataRepository.initialize();
      RepositoryConnection dataConnection = dataRepository.getConnection();
      File dataFile1 = new File(FOAF_TEST_MODEL_FILE);
        dataConnection.add(dataFile1, dataFile1.toURL().toString(), RDFFormat.RDFXML);
     
View Full Code Here

        super();

        cacheEntries = new HashMap<String,CacheEntry>();

        try {
            Repository repository = new SailRepository(new MemoryStore());
            repository.initialize();
            setRepository(repository);

        } catch (RepositoryException e) {
            log.error("error initialising connection to Sesame in-memory repository",e);
View Full Code Here


    private Repository parseRDFResponse(final URI resource, InputStream in, String contentType) throws RepositoryException, IOException, RDFParseException {
        RDFFormat format = RDFParserRegistry.getInstance().getFileFormatForMIMEType(contentType, RDFFormat.RDFXML);

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

        InterceptingRepositoryConnection con =
                new InterceptingRepositoryConnectionWrapper(triples,triples.getConnection());
View Full Code Here

    private Repository parseSparqlResponse(final URI resource, InputStream in, String contentType) throws RepositoryException, IOException, QueryResultParseException, TupleQueryResultHandlerException {
        TupleQueryResultFormat format = QueryResultIO.getParserFormatForMIMEType(contentType, TupleQueryResultFormat.SPARQL);


        final Repository triples = new SailRepository(new MemoryStore());
        triples.initialize();

        QueryResultIO.parse(in,format,
                new TupleQueryResultHandler() {
View Full Code Here

    @BeforeClass
    public static final void initYard() throws RepositoryException{
        SesameYardConfig config = new SesameYardConfig("testYardId");
        config.setName("Sesame Yard Test");
        config.setDescription("The Sesame Yard instance used to execute the Unit Tests defined for the Yard Interface");
        repo = new SailRepository(new MemoryStore());
        repo.initialize();
        yard = new SesameYard(repo,config);
    }
View Full Code Here

    }

    private ProjectDao createProjectDao()
    {
        dataDir = new File( basedir, ( "/target/rdf-repos/rdf-repo-" + System.currentTimeMillis() ) );
        rdfRepository = new SailRepository( new MemoryStoreRDFSInferencer( new MemoryStore( dataDir ) ) );
        try
        {
            rdfRepository.initialize();
        }
        catch ( RepositoryException e )
View Full Code Here

    private Repository createRepository()
    {
        File dataDir = new File( basedir, ( "/target/rdf-repos/rdf-repo-" + System.currentTimeMillis() ) );
        org.openrdf.repository.Repository rdfRepository =
            new SailRepository( new MemoryStoreRDFSInferencer( new MemoryStore( dataDir ) ) );
        try
        {
            rdfRepository.initialize();
        }
        catch ( RepositoryException e )
View Full Code Here

    public void lazyLoad() throws NPandayRepositoryException
    {
       long start = System.currentTimeMillis();

        File dataDir = new File( System.getProperty( "user.home" ), ".m2/repository" );
        MemoryStore store = new MemoryStore( dataDir );
        store.setPersist( true );
        store.setSyncDelay( 0 );
        org.openrdf.repository.Repository rdfRepository = new SailRepository( store );
        try
        {
            rdfRepository.initialize();
        }
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();
        }
        catch ( RepositoryException e )
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.