Skip to content

Commit

Permalink
Removed dead code and added some additional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Oct 20, 2008
1 parent 623ea2f commit 5518bc2
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions src/net/sourceforge/schemaspy/util/DbSpecificConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,23 @@
import net.sourceforge.schemaspy.Config;

/**
* Configuration of a specific type of database (as specified by -t)
*
* @author John Currier
*/
public class DbSpecificConfig {
private final String type;
private String description;
private final List<DbSpecificOption> options = new ArrayList<DbSpecificOption>();
private final Config config = new Config();


/**
* Construct an instance with configuration options of the specified database type
*
* @param dbType
*/
public DbSpecificConfig(final String dbType) {
type = dbType;
/*
class DbPropLoader {
Properties load(String dbType) {
ResourceBundle bundle = ResourceBundle.getBundle(dbType);
Properties properties;
try {
String baseDbType = bundle.getString("extends");
int lastSlash = dbType.lastIndexOf('/');
if (lastSlash != -1)
baseDbType = dbType.substring(0, dbType.lastIndexOf("/") + 1) + baseDbType;
properties = load(baseDbType); // recurse
} catch (MissingResourceException doesntExtend) {
properties = new Properties();
}
return Config.add(properties, bundle);
}
}
Properties props = new DbPropLoader().load(dbType);
*/

Properties props;
try {
props = config.getDbProperties(dbType);
Expand All @@ -50,6 +36,11 @@ Properties load(String dbType) {
}
}

/**
* Resolve the options specified by connectionSpec into {@link DbSpecificOption}s.
*
* @param properties
*/
private void loadOptions(Properties properties) {
boolean inParam = false;

Expand Down Expand Up @@ -88,6 +79,9 @@ public Config getConfig() {
return config;
}

/**
* Dump usage details associated with the associated type of database
*/
public void dumpUsage() {
System.out.println(" " + new File(type).getName() + ":");
System.out.println(" " + description);
Expand All @@ -96,7 +90,10 @@ public void dumpUsage() {
System.out.println(" -" + option.getName() + " " + (option.getDescription() != null ? " \t" + option.getDescription() : ""));
}
}


/**
* Return description of the associated type of database
*/
@Override
public String toString() {
return description;
Expand Down

0 comments on commit 5518bc2

Please sign in to comment.