org.utgenome.config
Class UTGBConfig

java.lang.Object
  extended by org.utgenome.config.UTGBConfig

public class UTGBConfig
extends Object

UTGB configuration. This object corresponds to config/{common, default}.silk file.

Author:
leo

Nested Class Summary
static class UTGBConfig.Database
           
static class UTGBConfig.WebAction
           
 
Field Summary
 Properties _
           
 List<UTGBConfig.Database> database
           
 String group
           
 String javaPackage
           
 String projectName
           
 String version
           
 List<UTGBConfig.WebAction> webAction
           
 
Constructor Summary
UTGBConfig()
           
 
Method Summary
 UTGBConfig.Database getDatabase(String id)
           
 String getProperty(String key)
           
 String getProperty(String key, String defaultValue)
           
 boolean hasPropertyOf(String key)
           
static UTGBConfig parse(URL configResource)
          Parse the input config file in Silk format, and return the UTGBConfig instance
static UTGBConfig parseSilk(String silk)
           
 void put(String key, String value)
           
 String toSilk()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public String version

group

public String group

projectName

public String projectName

javaPackage

public String javaPackage

webAction

public List<UTGBConfig.WebAction> webAction

database

public List<UTGBConfig.Database> database

_

public Properties _
Constructor Detail

UTGBConfig

public UTGBConfig()
Method Detail

put

public void put(String key,
                String value)

getProperty

public String getProperty(String key)

hasPropertyOf

public boolean hasPropertyOf(String key)

getProperty

public String getProperty(String key,
                          String defaultValue)

getDatabase

public UTGBConfig.Database getDatabase(String id)

parse

public static UTGBConfig parse(URL configResource)
                        throws IOException,
                               org.xerial.core.XerialException
Parse the input config file in Silk format, and return the UTGBConfig instance

Parameters:
configResource -
Returns:
UTGBConfig object
Throws:
IOException - when failed to read the resource
org.xerial.core.XerialException - when some syntax error is observed

parseSilk

public static UTGBConfig parseSilk(String silk)
                            throws org.xerial.core.XerialException,
                                   IOException
Throws:
org.xerial.core.XerialException
IOException

toSilk

public String toSilk()


Copyright © 2007-2012 utgenome.org. All Rights Reserved.