use of org.apache.stanbol.entityhub.ldpath.backend.YardBackend in project stanbol by apache.
the class LDPathTestBase method setup.
@BeforeClass
public static void setup() throws Exception {
// get the working directory
// 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.setAllowInitialisation(false);
// the dbpedia default data
config.setIndexConfigurationName(TEST_SOLR_CORE_CONFIGURATION);
// init from datafile provider
config.setAllowInitialisation(true);
config.setName("DBpedia.org default data");
config.setDescription("Data used for the LDPath setup");
// create the Yard used for the tests
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);
}
use of org.apache.stanbol.entityhub.ldpath.backend.YardBackend in project stanbol by apache.
the class LdpathPostProcessor method initialise.
@Override
public void initialise() {
// override the ldpath instance used for the initialisation with
// the one using the IndexingDestination
// this is OK, because parsing ldpath programs anyway does only need
// the "value factory" role of the RDFBackend and does not actually
// access any data.
Yard yard = indexingConfig.getIndexingDestination().getYard();
YardBackend backend = new YardBackend(yard);
this.ldPath = new EntityhubLDPath(backend, yard.getValueFactory());
}
Aggregations