How to create and add a new default data provider (ucsc-rest-api-service is a module developed to integrate the UCSC Rest API to IGB as a default data provider; this can be used as a reference)

  1. Create a new module for the data provider and add the following classes:
  2. Methods that are needed to be implemented:
  3. Once all the code is implemented, add that provider to this file using the format below:

    {
         "factoryName": "factory name", //factory name for the provider, this should be the same as the Factory name used in the created DataProviderFactory class
         "name": "provider name", //provider name
         "url": "provider_url",
         "loadPriority": "load_priority_int", //this is used to determine the order in which data providers are initialized
         "defaultDataProviderId": "IgbDefaultDataProviderId:16" //this is like a key in a map, so it should be unique from the rest of the providers
    }
  4. All the default data providers should be present in igbDefaultPrefs.json, this file is used to initialize the data providers. If all the code is implemented for the provider and it’s not declared here, the provider won’t be initialized.
  5. When you created the module, it should be added to the modules dependency section in igb-project pom.xml like below:

    <module>core/ucsc-rest-api-service</module>
    
    <dependency>
    	<groupId>org.lorainelab.igb</groupId>
        <artifactId>ucsc-rest-api-service</artifactId>
        <version>${project.parent.version}</version>
        <scope>provided</scope>
    </dependency>
  6. Add it as a dependency in main pom.xml as well like below:
<dependency>
	<groupId>org.lorainelab.igb</groupId>
    <artifactId>ucsc-rest-api-service</artifactId>
    <scope>runtime</scope>
</dependency>