Package org.openrdf.sesame.config

Examples of org.openrdf.sesame.config.RepositoryConfig


   * @param gst
   */
  private void createThesaurusRepository(Thesaurus gst) throws Exception {
    LocalRepository thesaurusRepository;
    try {
      RepositoryConfig repConfig = new RepositoryConfig(gst.getKey());

      SailConfig syncSail = new SailConfig("org.openrdf.sesame.sailimpl.sync.SyncRdfSchemaRepository");
      SailConfig memSail = new org.openrdf.sesame.sailimpl.memory.RdfSchemaRepositoryConfig(
                                                         gst.getFile().getAbsolutePath(), RDFFormat.RDFXML);
      repConfig.addSail(syncSail);
      repConfig.addSail(memSail);
      repConfig.setWorldReadable(true);
      repConfig.setWorldWriteable(true);
     
      thesaurusRepository = service.createRepository(repConfig);

      gst.setRepository(thesaurusRepository);
    } catch (ConfigurationException e) {
View Full Code Here


  public synchronized Thesaurus setRepository(LocalRepository repository) {
    this.repository = repository;
    return this;
  }
  public synchronized Thesaurus initRepository() throws ConfigurationException {
      RepositoryConfig repConfig = new RepositoryConfig(getKey());

        SailConfig syncSail = new SailConfig("org.openrdf.sesame.sailimpl.sync.SyncRdfSchemaRepository");
        SailConfig memSail = new org.openrdf.sesame.sailimpl.memory.RdfSchemaRepositoryConfig(getFile().getAbsolutePath(),
                RDFFormat.RDFXML);
        repConfig.addSail(syncSail);
        repConfig.addSail(memSail);
        repConfig.setWorldReadable(true);
        repConfig.setWorldWriteable(true);

        LocalRepository thesaurusRepository = Sesame.getService().createRepository(repConfig);
        setRepository(thesaurusRepository);
      return this;
  }
View Full Code Here

        }
        thesaurus.getRepository().shutDown();
    }

  protected static void setRepository(Thesaurus thesaurus) throws ConfigurationException {
    RepositoryConfig repConfig = new RepositoryConfig(thesaurus.getKey());

        SailConfig syncSail = new SailConfig("org.openrdf.sesame.sailimpl.sync.SyncRdfSchemaRepository");
        SailConfig memSail = new org.openrdf.sesame.sailimpl.memory.RdfSchemaRepositoryConfig(thesaurus.getFile().getAbsolutePath(),
                RDFFormat.RDFXML);
        repConfig.addSail(syncSail);
        repConfig.addSail(memSail);
        repConfig.setWorldReadable(true);
        repConfig.setWorldWriteable(true);

        LocalRepository thesaurusRepository = Sesame.getService().createRepository(repConfig);
        thesaurus.setRepository(thesaurusRepository);
  }
View Full Code Here

   * @return localRepository
   */
  private static LocalRepository createLocalRepository(String id, String title) {
    logger.fine("creating localRepository with id: " + id);

    RepositoryConfig repositoryConfig = new RepositoryConfig(id, title);
    repositoryConfig.addSail(new SailConfig("org.openrdf.sesame.sailimpl.sync.SyncRdfRepository"));
    repositoryConfig.addSail(new SailConfig("org.openrdf.sesame.sailimpl.memory.RdfRepository"));
    repositoryConfig.setWorldReadable(true);
    repositoryConfig.setWorldWriteable(true);

    LocalRepository localRepository = null;
    try {
      localRepository = SesameServer.getLocalService().createRepository(repositoryConfig);
    } catch (ConfigurationException e) {
View Full Code Here

TOP

Related Classes of org.openrdf.sesame.config.RepositoryConfig

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.