wiki:WikiStart

Welcome to project ConceptRewrite

Introduction

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.

Getting Started

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:

Windows

> grailsw compile
> grailsw clean
> grailsw run-app

Linux/OSX

> ./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

You can become a developer by registering yourself if you haven't already done so, and requesting write access on the conceptrewrite-users mailing list.

Configuration

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.

Config.groovy

Main configuration file of the a Grails application. Contains default settings like the location of the ConceptWiki-API.

BuildConfig.groovy

Contains the build properties like the Maven repositories to use and the Plug-ins that are included in the different instance types.

DataSource.groovy

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?.

Architecture

Domain

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.

Controllers

HomeController.groovy

Handles the generic pages like the home, contact, and the about us page.

ConceptController.groovy

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.

RemoteController.groovy

Handles the AJAX-calls like add, update and delete concept labels.

Layout & Views

Services

ConceptWikiApiService.groovy

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.

SearchHistoryService.groovy

TagLibs

Plugins

Classes

Mailing lists

This project provides the following mailing lists.

About Trac

Other NBIC software projects

All active NBIC software projects can be accessed from the project index.

Last modified 4 years ago Last modified on Jul 1, 2013, 3:51:34 PM