Dashboard > BinBase > Welcome > provide your own meta data provider

View Attachments (1) Info

provide your own meta data provider

Providing your own meta data provider

What is a meta data provider

this is nothing else than a tool which provides BinBase with meta data related to a specific sample/class/experiment and provides the possibility to store results.

General procedure 

This is a fairly simple procedure. 

  1. implement an interface
  2. create a factory class
  3. pack it up and deploy it
  4. register your service

Implementing the interface.

Please implement this interface. You can find our reference implementation here.

package edu.ucdavis.genomics.metabolomics.binbase.bci.setupX;

import edu.ucdavis.genomics.metabolomics.exception.BinBaseException;

public interface SetupXProvider{

	public String getSetupXId(String sampleName) throws BinBaseException;

	public String getMetaInformationByClass(String setupXId) throws BinBaseException;
	public String getMetaInformationBySample(String setupXId) throws BinBaseException;
	public String getMetaInformationByExperiment(String setupXId) throws BinBaseException;
	public void upload(String experimentId, String content) throws BinBaseException;
}

How should the output look like for BinBase of your provider

 Currently we are only using 3 methods of the metadata provider in BinBase since more is not needed. These methods are

  • getSetupXId
  • getMetainformationBySample
  • upload

The method "getSetupXId" just return the unique id for the given sampleName as a plain string. An example would be

 12312312

 The "upload" method expects the id for the current experiment and a string containing the binary data for the upload. The binaery date will represent a zip archive which contains more data. This means you need to convert the retrieved data on your site into a byte array and store somewhere. We know that this is ugly, but it's related to historical code.

The Method "getMetainformationBySample" is the most important method and has to return a specific xml string in this format. We will integrate an XSD for this in the future. An example would be:

generated by setupx!

<sample>
  <classInfo>
    <atom key="Species">Arabidopsis thaliana</atom>
    <atom key="Genotype">Wild type Col0: 1</atom>
  </classInfo>
  <runInfo>
    <atom key="Type">Sample</atom>
    <atom key="Folder">Acquired Samples</atom>
    <atom key="MSMethod">343605</atom>
    <atom key="DPMethod">85</atom>
    <atom key="Name">020222byusa100</atom>
    <atom key="tray">1</atom>
    <atom key="QC Method">Gas Chromatograph (GC) Methods quick-splitless_working</atom>
    <atom key="ASMethod">Mass Spectrometer (MS) Methods quick_1700V</atom>
    <atom key="GCMethod">Data Processing (DP) Methods fiehn default</atom>
    <atom key="Vial" />
  </runInfo>
  <genericInfo>
    <atom key="Sample ID">343605</atom>
    <atom key="Class ID">343626</atom>
    <atom key="Experiment ID">343581</atom>
    <atom key="filename">070719byusa300:1</atom>
    <atom key="label">WtCol04:1-1</atom>
    <atom key="comment">Wild type Col-0 Mutant Experiment #4 sample 1-1</atom>
  </genericInfo>
</sample>

generated by the binbase scheduler

<sample>
  <classInfo>
    <atom key='Species'>not specified</atom>
    <atom key='Genotype'>not specified</atom>
    <atom key='Organ'>not specified</atom>
  </classInfo>
  <genericInfo>
    <atom key='Sample ID'>1</atom>
    <atom key='Class ID'>1</atom>
    <atom key='Experiment ID'>1</atom>
    <atom key='filename'>test</atom>
  </genericInfo>
  <runInfo>
    <atom key='Type'>Sample</atom>
    <atom key='Folder'>unknown</atom>
    <atom key='MSMethod'>unknown</atom>
    <atom key='Name'>test</atom>
    <atom key='tray'>1</atom>
    <atom key='QC Method'>unknown</atom>
    <atom key='ASMethod'>unknown</atom>
    <atom key='GCMethod'>unknown</atom>
    <atom key='Vial' />
    <atom key='Owner'>test</atom>
  </runInfo>
</sample>

This is basically the smalles accepted xml code.

 Creating the factory class.

 Once the interface is implemented you need to write a factory class for it which needs to be extended from this class.

/**
	 * creates the provider itself
	 *
	 * @author wohlgemuth
	 * @version Nov 17, 2005
	 * @return
	 */
	public abstract SetupXProvider createProvider(Properties p);

 Packing it up and deployment

once you got your implementation done and wrote the factory you need to pack your classes in a way that the application server can load them. The easiest way is to create a jar archive and deploy it as an ejb3 file

register you service

finally you need to register  your server with the correct JMX bean.

Domain Name:binbase
service: MetaProvider
MBean Java Class: edu.ucdavis.genomics.metabolomics.binbase.bci.server.jmx.MetaProviderJMX

 You can use the jmx-console for this or can use the api.


Browse Space
- Pages
- Labels
- Attachments
- Mail
- Bookmarks
- News
- Activity
- Advanced

Explore Confluence
- Popular Labels
- Notation Guide

Your Account
Log In

 

Other Features

View a printable version of the current page.

Add Content


Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki.
Bug/feature request - Contact administrators