wiki:Test Neo4j Database

To facilitate development and testing, a small Neo4j database with Solr index will be made available. This should make it easier to test specific scenarios and enables working with ConceptWiki on computers without demanding much hardware resources (disc space, memory and processor capacity). For example, it should be easy to modify a small database to be able to reproduce a specific error and include the database in the bug report.

You can follow the following manual steps to create a small Neo4j database with a Solr index:

  1. Create a small Neo4j database:
      * Create a small Neo4J database.
      * @param args cli arguments.
     public static void main(final String args[]) {
         final String contextFilename = "/nl/nbic/conceptwiki/service/rmi-context.xml";
         final ApplicationContext applicationContext = new ClassPathXmlApplicationContext(contextFilename);
         final ConceptStorageService conceptStorageService = applicationContext.getBean(ConceptStorageService.class);
         new ConceptServiceImpl().createSingleConcept(conceptStorageService);
     private void createSingleConcept(final ConceptStorageService conceptStorageService) {
         final String DEFAULT_LABEL = "Malaria";
         final Language DEFAULT_LANGUAGE = new LanguageImpl("en");
         final Label label = new LabelImpl(LabelType.PREFERRED, DEFAULT_LABEL, DEFAULT_LANGUAGE);
         final Concept memoryConcept = new ConceptImpl.Builder().labels(Sets.newHashSet(label)).build();
         if (memoryConcept != null) {
             final Concept neo4jConcept = conceptStorageService.createConcept(memoryConcept, TEST_BRANCH_A_ID);
             if (neo4jConcept != null)
                 // 617b08c9-790b-4f32-8a59-78c53775ce94
                 System.out.println("Concept was created with UUID " + neo4jConcept.getUuid());
                 System.out.println("Neo4J concept creation failed!");
         } else
             System.out.println("Memory concept creation failed!");
  1. Start the concept service (for example from Eclipse) by running the nl.nbic.conceptwiki.service.impl.ConceptServiceImpl.main method. The concept service listens on the default https port: 8443. If you want to change this port number, you (at least) need to modify the following two files: web/web-wicket/pom.xml (<port>8443</port>) and web/web-wicket/src/test/java/nl/nbic/conceptwiki/web/wicket/ (public static final int HTTPS_PORT = 8443;).
  1. Create an empty Solr index, for example by copying the example directory from the Apache Solr 4.0 project. Replace the default schema.xml and solrconfig.xml files in the example\solr\collection1\conf directory by ConceptWiki ones from the storage\storage-solr\src\main\config\solr\conf directory.
  1. Start the Solr index service from the command shell: "java -jar start.jar".
  1. Fill the Solr index by running the nl.nbic.conceptwiki.fixups.UtilRunner.solrReindexDatabase method (from the main method). The Solr index service listens on the following port: 8983. If you want to change this port number, you (at least) need to modify this file: service/service-impl/src/main/resources/nl/nbic/conceptwiki/service/ (solr.url=http://localhost:8983/solr).
  1. Run Jetty (or Tomcat) from the command shell in the web/web-wicket directory: "mvn jetty:run".
  1. Now ConceptWiki's web interface should be running: local host port 8443.
Last modified 6 years ago Last modified on Dec 31, 2012, 4:28:25 PM