Package org.openrdf.sail.memory

Examples of org.openrdf.sail.memory.MemoryStore


public class TestRDFSInverseInferencer {

  @Test
  public void testRDFSPlusInversesInferencer() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here


  }

  @Test
  public void testInferencer_0_directly() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here

  }

  @Test
  public void testStrangeBug() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here

  }

  @Test
  public void testInverseTriplesOnRDFDirectly() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here

    // find out if we need reasoning
    String reasoningProperty = properties == null ? null : properties.getProperty(REASONING);
    boolean reasoning = Reasoning.rdfs.toString().equalsIgnoreCase(reasoningProperty);
   
    // create a Sail stack
    Sail sail = new MemoryStore();
   
    if(reasoning) {
      sail = new ForwardChainingRDFSInferencer((MemoryStore)sail);
    }
   
View Full Code Here

     * Test case initialization.
     * @throws Exception
     */
    @Before
    public void setUp() throws Exception {
        Sail store = new MemoryStore();
        store.initialize();
        conn = new SailRepository(store).getConnection();
    }
View Full Code Here

    RDFXMLWriter rdfxmlWriter;

    @Before
    public void setUp() throws RepositoryException, SailException {
        extractorGroup = ExtractorRegistry.getInstance().getExtractorGroup();
        store = new MemoryStore();
        store.initialize();
        conn = new SailRepository(store).getConnection();
    }
View Full Code Here

        RepositoryConnection conn;
        RepositoryWriter repositoryWriter;

        fileDocumentSource = new FileDocumentSource(input);
        any23 = new Any23();
        Sail store = new MemoryStore();
        store.initialize();
        conn = new SailRepository(store).getConnection();
        repositoryWriter = new RepositoryWriter(conn);
        Assert.assertTrue( any23.extract(fileDocumentSource, repositoryWriter, encoding).hasMatchingExtractors() );

        RepositoryResult<Statement> statements = conn.getStatements(null, vDCTERMS.title, null, false);
View Full Code Here

        if (!dataDir.exists()) {
          dataDir=new File(servletContext.getRealPath("/public/resources/data/"));
        }
       
        //dataRepository = new SailRepository(new NativeStore(dataDir));
        localRepository = new SailRepository(new MemoryStore());
        localRepository.initialize();
        //File dataPath = new File(servletContext.getRealPath("/public/resources/data"));       
        File[] dataFiles = dataDir.listFiles();
        addFilesToRepository(dataFiles, localRepository);
      }
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 dataFile = new File(FOAF_PLANET_TEST_MODEL_FILE);
        dataConnection.add(dataFile, dataFile.toURL().toString(), RDFFormat.TRIX);
     
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.