| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.fluxion.datapublisher.biomart.impl.BiomartBeanFactory
@ServiceProvider public class BiomartBeanFactory
An implementation of BeanFactory that generates beans from a Biomart datasource.
| Constructor Summary | |
|---|---|
BiomartBeanFactory()
 | 
|
| Method Summary | |
|---|---|
 void | 
acquireDatasourceConnection(java.util.Map<java.lang.String,java.lang.String> connectionDetails)
Acquire a connection to the underlying datasource.  | 
 boolean | 
dbms(java.lang.String dbms)
Determines whether a BeanFactory implementation can generate beans for the given dbms.  | 
 void | 
donotUseTableFiltering()
Use this if a single factory is used to generate multiple sets of beans, and you want to stop tables from being filtered.  | 
 void | 
generateBeans(java.io.File sourceDirectory,
              java.lang.String packageName,
              java.util.Set<java.lang.Class> metaBeans,
              java.lang.String... schemas)
Generate a set of beans to model the dbms the database this factory represents.  | 
 java.util.Map<java.lang.String,java.lang.String> | 
getDatasourceConnectionParameters()
Returns the map of connection parameters supplied for this BeanFactory.  | 
 java.lang.String | 
getPackageName()
Returns the package name known for this BeanFactory  | 
 void | 
terminateDatasourceConnection()
Close the connection to the underlying datasource.  | 
 void | 
useTableFiltering(java.io.File filterTables)
Enables filtering of tables by parsing a plain text file.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BiomartBeanFactory()
| Method Detail | 
|---|
public boolean dbms(java.lang.String dbms)
BeanFactory
dbms in interface BeanFactorydbms - the name of the dbms for a service provider, e.g. "mysql"
public void useTableFiltering(java.io.File filterTables)
                       throws java.io.IOException
BeanFactory
useTableFiltering in interface BeanFactoryfilterTables - the file to read that restricts the created owl
                     classes
java.io.IOException - if there is a problem reading from the filepublic void donotUseTableFiltering()
BeanFactory
donotUseTableFiltering in interface BeanFactorypublic java.util.Map<java.lang.String,java.lang.String> getDatasourceConnectionParameters()
BeanFactoryBeanFactory should return an initialised
 map containing the keys required for a connection to be acquired.
getDatasourceConnectionParameters in interface BeanFactory
public void acquireDatasourceConnection(java.util.Map<java.lang.String,java.lang.String> connectionDetails)
                                 throws BeanGenerationException
BeanFactorygetDatasourceConnectionParameters().keySet() to get the
 parameters that must be set.  Or do a lookup on these key values to get the
 default values (e.g. "anonymous" is the default username). This way, those
 parameters which have been set can be used, whilst null fields will be
 ignored if possible (for example, in the case where password="" in
 accessing a public MySql database).
acquireDatasourceConnection in interface BeanFactoryconnectionDetails - a map containing parameters for connection to the
                          database.
BeanGenerationException - if the connection could not be acquired
public void terminateDatasourceConnection()
                                   throws BeanGenerationException
BeanFactory
terminateDatasourceConnection in interface BeanFactoryBeanGenerationException - if there is a problem closing the
                                 connection
public void generateBeans(java.io.File sourceDirectory,
                          java.lang.String packageName,
                          java.util.Set<java.lang.Class> metaBeans,
                          java.lang.String... schemas)
                   throws BeanGenerationException
BeanFactory
generateBeans in interface BeanFactorysourceDirectory - The location for the generated source files to be
                        written topackageName - The package name to use for generated sourcesmetaBeans - the set of classes representing the database
                        metadataschemas - an array of database schema names to use in
                        generating the beans
BeanGenerationException - if the beans could not be generatedpublic java.lang.String getPackageName()
BeanFactory
getPackageName in interface BeanFactory
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||