Package org.apache.stanbol.entityhub.yard.solr.impl

Examples of org.apache.stanbol.entityhub.yard.solr.impl.SolrYard


        Assert.assertNotNull("Unable to initialise SolrServer for testing",server);
        core = ((EmbeddedSolrServer)server).getCoreContainer().getCore(
            solrIndexRef.getIndex());
        Assert.assertNotNull("Unable to get SolrCore '" + config.getIndexConfigurationName()
            + "' from SolrServer "+server, core);
        yard = new SolrYard(server,config,null);
        //setup the index configuration
        LanguageConfiguration langConf = new LanguageConfiguration("not.used",
            new String[]{"en;field=dbpedia-ont:surfaceForm;generate=true"});
        fstConfig = new IndexConfiguration(langConf, core, FieldEncodingEnum.SolrYard);
        fstConfig.setExecutorService(Executors.newFixedThreadPool(1));
View Full Code Here


            solrYardConfig.setAllowInitialisation(Boolean.TRUE);
            server = StandaloneEmbeddedSolrServerProvider.getInstance().getSolrServer(
                solrServerRef,solrYardConfig.getIndexConfigurationName());
        }
        log.info("   ... create SolrYard");
        this.solrYard = new SolrYard(server,solrYardConfig,indexingConfig.getNamespacePrefixService());
        this.core = server.getCoreContainer().getCore(solrServerRef.getIndex());
    }
View Full Code Here

        if(it.hasNext()){
            nsPrefixService = it.next();
        } else {
            nsPrefixService = null;
        }
        yard = new SolrYard(server, config, nsPrefixService);
    }
View Full Code Here

        IndexReference solrIndexRef = IndexReference.parse(config.getSolrServerLocation());
        SolrServer server = StandaloneEmbeddedSolrServerProvider.getInstance().getSolrServer(
            solrIndexRef, config.getIndexConfigurationName());
        Assert.assertNotNull("Unable to initialise SolrServer for testing",server);
        try {
            yard = new SolrYard(server,config,null);
            Representation paris = yard.getRepresentation("http://dbpedia.org/resource/Paris");
            if(paris == null){
                throw new IllegalStateException("Initialised Yard does not contain the expected resource dbpedia:Paris!");
            }
        } catch (YardException e) {
View Full Code Here

        IndexReference solrIndexRef = IndexReference.parse(config.getSolrServerLocation());
       
        SolrServer server = StandaloneEmbeddedSolrServerProvider.getInstance().getSolrServer(
            solrIndexRef, config.getIndexConfigurationName());
        Assert.assertNotNull("Unable to initialise SolrServer for testing",server);
        yard = new SolrYard(server,config,null);
        backend = new YardBackend(yard);
    }
View Full Code Here

        config.setName("Solr Yard Test");
        config.setDescription("The Solr Yard instance used to execute the Unit Tests defined for the Yard Interface");
        //use the default Solr Index configuration for this tests
        config.setDefaultInitialisation(true);
        // create the Yard used for the tests
        yard = new SolrYard(config);
    }
View Full Code Here

        SolrYardConfig config = new SolrYardConfig(TEST_YARD_ID, TEST_SOLR_CORE_NAME);
        config.setDefaultInitialisation(false);
        config.setName("DBpedia.org default data");
        config.setDescription("Data used for the LDPath setup");
        // create the Yard used for the tests
        yard = new SolrYard(config);
        backend = new YardBackend(yard);
    }
View Full Code Here

            log.info("   ... use default Solr Configuration");
            solrYardConfig.setDefaultInitialisation(Boolean.TRUE);
        }
        try {
            log.info("   ... create SolrYard");
            this.solrYard = new SolrYard(solrYardConfig);
        } catch (YardException e) {
            throw new IllegalStateException("Unable to initialise SolrYard "+
                solrYardConfig.getId(),e);
        }
    }
View Full Code Here

        if(yardName == null){
            yardName = "geonames";
        }
        SolrYardConfig yardConfig = new SolrYardConfig(yardName, line.getArgs()[0]);
        Dictionary<String, Object> indexingConfig = new Hashtable<String, Object>();
        SolrYard yard = new SolrYard(yardConfig);
        indexingConfig.put(KEY_YARD, yard);
        indexingConfig.put(KEY_DATA_DIR, line.getArgs()[1]);
        indexingConfig.put(KEY_INDEX_ONTOLOGY_STATE, line.hasOption("io"));
        indexingConfig.put(KEY_GEONAMES_ONTOLOGY,
                line.getOptionValue("o", "ontology_v2.2.1.rdf"));
View Full Code Here

    protected SolrYard yard;
   
    protected MockEntityhub(){
        SolrYardConfig config = new SolrYardConfig("dbpedia", "dbpedia_43k");
        try {
            yard = new SolrYard(config);
            Representation paris = yard.getRepresentation("http://dbpedia.org/resource/Paris");
            if(paris == null){
                throw new IllegalStateException("Initialised Yard does not contain the expected resource dbpedia:Paris!");
            }
        } catch (YardException e) {
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.yard.solr.impl.SolrYard

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.