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)
It is mandatory to override the below method in the data provider class.
@Override public Optional<String> getFactoryName() { return Optional.of(CustomDataProviderFactory.FACTORY_NAME); } |
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 } |
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> |
<dependency> <groupId>org.lorainelab.igb</groupId> <artifactId>ucsc-rest-api-service</artifactId> <scope>runtime</scope> </dependency> |