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

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


        new SolrYardConfig(null, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSolrYardConfigInitWithNullUrl() {
        new SolrYardConfig(TEST_YARD_ID, null);
    }
View Full Code Here


        new SolrYardConfig(TEST_YARD_ID, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSolrYardConfigInitWithNullID() {
        new SolrYardConfig(null, TEST_SOLR_CORE_NAME);
    }
View Full Code Here

        // use property substitution to test this feature!
        String prefix = System.getProperty("basedir") == null ? "." : "${basedir}";
        String solrServerDir = prefix + TEST_INDEX_REL_PATH;
        log.info("Test Solr Server Directory: {}", solrServerDir);
        System.setProperty(ManagedSolrServer.MANAGED_SOLR_DIR_PROPERTY, solrServerDir);
        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

     * Layout, lazy commits and a commitWithin duration of an minute
     * @param yardName the name of the yard
     * @param indexName the name of the index
     */
    private SolrYardConfig createSolrYardConfig(String yardName, String indexName) {
        SolrYardConfig solrYardConfig = new SolrYardConfig(yardName, indexName);
        solrYardConfig.setMultiYardIndexLayout(Boolean.FALSE);
        //use the lazy commit feature
        solrYardConfig.setImmediateCommit(Boolean.FALSE);
        solrYardConfig.setCommitWithinDuration(1000*60);//one minute
        return solrYardConfig;
    }
View Full Code Here

        }
        String yardName = line.getOptionValue("n");
        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"));
View Full Code Here

    private static final Logger log = LoggerFactory.getLogger(MockEntityhub.class);
   
    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!");
View Full Code Here

        // use property substitution to test this feature!
        String prefix = System.getProperty("basedir") == null ? "." : "${basedir}";
        String solrServerDir = prefix + TEST_INDEX_REL_PATH;
        log.info("Test Solr Server Directory: " + solrServerDir);
        System.setProperty(ManagedSolrServer.MANAGED_SOLR_DIR_PROPERTY, solrServerDir);
        SolrYardConfig config = new SolrYardConfig(TEST_YARD_ID, TEST_SOLR_CORE_NAME);
        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

     * Three unit tests that check that SolrYardConfig does throw IllegalArgumentExceptions when parsing an
     * illegal parameters.
     */
    @Test(expected = IllegalArgumentException.class)
    public void testSolrYardConfigInitWithNullParams() {
        new SolrYardConfig(null, null);
    }
View Full Code Here

        new SolrYardConfig(null, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSolrYardConfigInitWithNullUrl() {
        new SolrYardConfig(TEST_YARD_ID, null);
    }
View Full Code Here

        new SolrYardConfig(TEST_YARD_ID, null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSolrYardConfigInitWithNullID() {
        new SolrYardConfig(null, TEST_SOLR_CORE_NAME);
    }
View Full Code Here

TOP

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

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.