Welcome to project ConceptRewrite
ConceptRewrite is a Grails (grails.org) application build on top of the (conceptwiki) API. The aim was a loosely coupled GUI for searching for, viewing and editing Concepts in the ConceptWiki database. ConceptWiki has a REST-like service which you can find at: http://ops.conceptwiki.org/web-ws/. Also this can be used as an example how to use the conceptwiki from other software using the (conceptwiki) API.
1. Get the Source
If available, anonymous readonly subversion access works as follows:
svn co https://trac.nbic.nl/svn/conceptrewrite/trunk conceptrewrite
Write access is only available to registered developers.
2. Run Grails (the first time)
ConceptRewrite makes use of the Wrapper (http://grails.org/doc/2.1.0/guide/single.html#wrapper). This allows users to run a Grails application before manually installing Grails first. For Linux/OSX users there is the grailsw executable, for Windows there is the grailsw.bat. So now open a shell/prompt and do the following:
> grailsw compile > grailsw clean > grailsw run-app
> ./grailsw compile > ./grailsw clean > ./grailsw run-app
When successful you should see something like:
Server running. Browse to http://localhost:8080/ConceptRewrite
3. Get involved
The default configuration should work out of the box. However if you want to tweak the application you can do so by editing the files located in the ‘grails-app/conf/’ directory which can be found in the root of the project.
Main configuration file of the a Grails application. Contains default settings like the location of the ConceptWiki-API.
Contains the build properties like the Maven repositories to use and the Plug-ins that are included in the different instance types.
Contains the database configuration. For now this application only stores a history of the search parameters used in the GUI. This can be an in-memory database or any other GORM compatible one like MySQL or PostgreSQL. More on how to configure MySQL can be found on Grails.org and an example is included in the external configuration file in the source (see next chapter 'External config file').
External config file
In the Config.groovy file an additional list of 'grails.config.locations' is set to make is easy to inject/overwrite the default configuration. An example file is available in the 'grails-app/config' directory called 'conceptwiki-config.properties.example'. The most common use is to put this file on the ClassPath?.
The domain model is very simple! There is none. The only class here is the SearchHistory?.groovy which represents a search parameter entry in the search history.
Handles the generic pages like the home, contact, and the about us page.
All actions related to one or more concepts are handled by this controller (e.g. searching and viewing concepts). On additional action has been added to handle the autocomplete fetches for the search box(es). Unlike most of the other controllers this one relies in the GPars library. The GParsPool is used to fetch and process multiple calls to the (conceptwiki) API. For example when you view a concept it will use multiple threads to can the concept information from the different branches/authorities like UML, ChemSpider, SwissProt etc. Same goes for when you do a search. The method conceptAutoComplete() uses GPars to parallel conllect the labels to show in the TypeAhead/Autocomplete box.
Handles the AJAX-calls like add, update and delete concept labels.
Layout & Views
All communication with the ConceptWiki API goes via this service. The actual calls are made by the generic nl.nbic.conceptwiki.CWClient (https://trac.nbic.nl/cw-api-client/) which can be used in any Java or Groovy application.
This project provides the following mailing lists.
- conceptrewrite-users: a list intended for general discussion on the project.
- conceptrewrite-commits: a list that receives source code commit messages.
- conceptrewrite-devel: a list intended for discussion among developers (subscription is restricted to registered developers).
- TracGuide -- Built-in Documentation
- TitleIndex -- A complete list of local wiki pages.
- Trac FAQ -- Frequently Asked Questions
Other NBIC software projects
All active NBIC software projects can be accessed from the project index.