uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chavan, Girish" <chav...@upmc.edu>
Subject RE: JDBC
Date Fri, 06 Nov 2009 13:06:24 GMT
You can pass database connection parameters using the configuration parameters for your TAE.
You can then read them in the initialize method using the UIMAContext variable.

	String driver = (String) uimaContext.getConfigParameterValue(IFConstants.PARAM_DB_DRIVER);
	String url = (String) uimaContext.getConfigParameterValue(IFConstants.IF_PARAM_DB_URL);
	String userName = (String) uimaContext.getConfigParameterValue(IFConstants.PARAM_DB_USERNAME);
	String password = (String) uimaContext.getConfigParameterValue(IFConstants.PARAM_DB_PASSWORD);

	Connection conn = DriverManager.getConnection(url, userName, password);

After this, you can initialize any of your variables with the output of a database query.
I hope that answers your question.


-----Original Message-----
From: ashkan taassob [mailto:ashkan_taassob@yahoo.com] 
Sent: Friday, November 06, 2009 4:44 AM
To: uima-user@incubator.apache.org
Subject: JDBC

I have a question. In order to use database output in UIMA, can we give adressĀ“s database
accsses (JDBC) in UIMA. for example, I want to give an adress in class "TutorialDataTime.jav"
instead of this constants in line " static final String shortMonthNames = "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec)";
" the output from a database access. how can I do it?
thanks a lot for your helps,
sincerely yours,
Ashkan Taassob

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message