Package org.apache.stanbol.entityhub.indexing.core

Examples of org.apache.stanbol.entityhub.indexing.core.IndexingDestination


     * created by the {@link IndexingDestination#finalise()} method
     */
    private void validateSolrDestination(IndexingConfig config) throws YardException,
                                                               IOException {
        //get the destination
        IndexingDestination destination = config.getIndexingDestination();
        assertNotNull(destination);
        assertEquals(destination.getClass(), SolrYardIndexingDestination.class);
        //initialise
        assertTrue(destination.needsInitialisation());
        destination.initialise();
        //test that the returned Yard instance is functional
        Yard yard = destination.getYard();
        assertNotNull(yard);
        assertEquals(yard.getClass(), SolrYard.class);
        Representation rep = yard.getValueFactory().createRepresentation("http://www.example.com/entity#123");
        rep.add(NamespaceEnum.rdfs+"label", "test");
        rep.add(NamespaceEnum.rdfs+"description", "Representation to test storage while indexing");
        rep.add(RdfResourceEnum.entityRank.getUri(), Float.valueOf(0.8f));
        yard.store(rep);
        //finalise
        destination.finalise();
        //test the archives
        File expectedSolrArchiveFile =
            new File(config.getDistributionFolder(),config.getName()+".solrindex.zip");
        assertTrue(expectedSolrArchiveFile.isFile());
        // validate the archive
View Full Code Here


     * created by the {@link IndexingDestination#finalise()} method
     */
    private void validateSolrDestination(IndexingConfig config) throws YardException,
                                                               IOException {
        //get the destination
        IndexingDestination destination = config.getIndexingDestination();
        assertNotNull(destination);
        assertEquals(destination.getClass(), SolrYardIndexingDestination.class);
        //initialise
        assertTrue(destination.needsInitialisation());
        destination.initialise();
        //test that the returned Yard instance is functional
        Yard yard = destination.getYard();
        assertNotNull(yard);
        assertEquals(yard.getClass(), SolrYard.class);
        Representation rep = yard.getValueFactory().createRepresentation("http://www.example.com/entity#123");
        rep.add(NamespaceEnum.rdfs+"label", "test");
        rep.add(NamespaceEnum.rdfs+"description", "Representation to test storage while indexing");
        rep.add(RdfResourceEnum.entityRank.getUri(), Float.valueOf(0.8f));
        yard.store(rep);
        //finalise
        destination.finalise();
        //test the archives
        File expectedSolrArchiveFile =
            new File(config.getDistributionFolder(),config.getName()+".solrindex.zip");
        assertTrue(expectedSolrArchiveFile.isFile());
        // validate the archive
View Full Code Here

     * created by the {@link IndexingDestination#finalise()} method
     */
    private void validateSolrDestination(IndexingConfig config) throws YardException,
                                                               IOException {
        //get the destination
        IndexingDestination destination = config.getIndexingDestination();
        assertNotNull(destination);
        assertEquals(destination.getClass(), SolrYardIndexingDestination.class);
        //initialise
        assertTrue(destination.needsInitialisation());
        destination.initialise();
        //test that the returned Yard instance is functional
        Yard yard = destination.getYard();
        assertNotNull(yard);
        assertEquals(yard.getClass(), SolrYard.class);
        Representation rep = yard.getValueFactory().createRepresentation("http://www.example.com/entity#123");
        rep.add(NamespaceEnum.rdfs+"label", "test");
        rep.add(NamespaceEnum.rdfs+"description", "Representation to test storage while indexing");
        rep.add(RdfResourceEnum.entityRank.getUri(), Float.valueOf(0.8f));
        yard.store(rep);
        //finalise
        destination.finalise();
        //test the archives
        File expectedSolrArchiveFile =
            new File(config.getDistributionFolder(),config.getName()+".solrindex.zip");
        assertTrue(expectedSolrArchiveFile.isFile());
        // validate the archive
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.indexing.core.IndexingDestination

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.