TracNav
Table of Contents
Introduction
MOLGENIS application overview
- Browsing and editing
- CSV file loading
- Connecting to R
- Connecting to SOAP web services
- Connecting to REST web services using CURL
- Molgenis as a datasource for Galaxy
Toolkit Installation
- Preperation on Windows
- Preperation on Ubuntu/Linux
- Installation of Eclipse/Galileo
- Installation of Eclipse/Helios
- Download MOLGENIS
Generating your own applications
- MOLGENIS workspace basics
- Running the generator
- Modeling a new MOLGENIS
- Modeling an existing database
- molgenis.properties file
Adding plug-ins
Building on the MOLGENIS framework
MOLGENIS Data Modeling Language Reference
MOLGENIS User Interface Modeling Language Reference
MOLGENIS framework API
Frequently asked questions
- How to change molgenis url from /molgenis_distro to xyz
- How to change the MolgenisServlet, e.g. to add more services
- How to extend an existing database model
- Case sensitivity and issues between windows, linux and mac
- How to create a hyperlink from plugin to another form
- How to create a hyperlink from plugin to another form
- How to create a hyperlink from plugin to another form
Accessing the database via Molgenis Database
MOLGENIS Database class provides efficient methods to add, update, remove, find and count data inside your MOLGENIS either one-by-one or in an efficient batch modus.
In a standalone program
Assuming you use the MolgenisAddressBookExample you can create and execute the following file:
import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; import addressbook.data.JDBCDatabase; import addressbook.data.types.Contact; public class TestDatabaseApi { public static void main(String[] args) throws Exception { //Create a database from the properties file Database db = new addressbook.data.JDBCDatabase("molgenis.properties"); //List all contacts: for(Contact c: db.find(Contact.class)) { System.out.println(c); } //Add one object to the database: Contact one = new Contact(); one.setDisplayname("testone"); db.add(one); //Add many objects efficiently in batch System.out.println("add many contacts:"); List<Contact> many = new ArrayList<Contact>(); for(int i = 0; i < 10; i++) { Contact c = new Contact(); c.setDisplayname("simulation"+i); many.add(c); } db.add(many); //Observe that after insert the autoid 'id' colunmn is set for(Contact c: many) { System.out.println(c); } //Finally, remove all the data you just added: System.out.println("remove contacts:"); db.remove(one); db.remove(many); } }