View Javadoc

1   package migratool.datasources.superDataSourceFactory;
2   
3   import migratool.datasources.DataSourceFactory;
4   import migratool.definition.parser.MigBean;
5   import migratool.datasources.geometric.GeometricDataSourceFactory;
6   
7   /**
8    * 
9    * MIGRATOOL Program to migrate spatial databsets.
10   * Copyright (C) 2007 Fábio Luiz Leite Júnior
11   * Universidade Federal de Campina Grande
12   * contact: fabioleite@gmail.com
13   *
14   * This program is free software; you can redistribute it and/or
15   * modify it under the terms of the GNU General Public License
16   * as published by the Free Software Foundation; either version 2
17   * of the License, or (at your option) any later version.
18   *
19   * This program is distributed in the hope that it will be useful,
20   * but WITHOUT ANY WARRANTY; without even the implied warranty of
21   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22   * GNU General Public License for more details.
23   *
24   * You should have received a copy of the GNU General Public License
25   * along with this program; if not, write to the Free Software
26   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
27   *
28   * @author fabio
29   *
30   */
31  
32  public class SuperDataSourceFactory {
33  
34  	/**
35  	 * retorna a inst�ncia
36  	 * @param type O tipo da FormatterFactory
37  	 * @return A inst�ncia
38  	 */
39  	public static DataSourceFactoryIF getInstance(MigBean migDefinition) {
40  		if (migDefinition.getDataSourceFactoryType().equals("GeometricOra2Postgres")) {
41  			return GeometricDataSourceFactory.getInstance(migDefinition);
42  		}
43  		return DataSourceFactory.getInstance(migDefinition);
44  	}
45  
46  }