PROJECT 4-1CS590L WS2002

Shuanghui Luo, Ying Li and Jin Xu

1. Web Interface/Working (sub)system

Home interfaces

Cheminformatics. Click this graph, the project introduction, purpose and the function will be shown, which will give users a general idea of the project.

Toxicity. Click this graph, toxicity information will be introduced to the users one the same page as the cheminformatics.

Safety. Click this graph, safety phrase will be shown to the users, which the user should pay attention to when they handle the chemical.

Risky. Click this graph, risky phrases will be shown to the users, which the user need to know,

Admin

If the client is an administrator, click “ Admin “ button. The web interface will go to admin.html which will ask administrator to enter username and password.

“ Submit Query “ button will prompt to another web interface which shows the administration menu and it include user administration part and chemical administration part. A JSP file “adminServlet.java” will be called to implement these functions.

After the administrator change the user account information, there will be a confirmation notice interface.

For user administration part, the main function is to update User Records. Click this choice and input the Username, and then choose the item that needs to be changed, and input the desire value of this item. Click “Submit”, the corresponding item in User DB will be updated.

If the client is a user, click “ User “ button, the web will go to the following web page. Users are required to enter User Name and Password to enter the system.

If the user is verified, the chemical query web page will be popped out. The system will ask to enter the chemical’s formula, then submits the request.

If the user is not verified, User can return to the main page. If a new user want to register a new account, a new login page will be popped out to enter the user’s personal information.

After the user “Submit Query”, a new user’s personal account will be established. Next time user can input the user name and password to enter the system.

Then the system will show all of the chemicals’ name with this formula and the choices that user can choose. User need to choose one of the chemical and the desired queries. The queries include:

  • Risky phrases
  • Safety phrases
  • Toxicity data
  • Toxicity comparison with analogy chemicals.

2. Test Case

Administrator

  • Scenarios

Administrator enter user name and password to enter the administration system. If the user name and password are correct, then enter the administration web page.

Administrator choose a function

  • Detailed testing description with objectives and success criteria for each test.

Add New User Record.

Objective: test the CreateUser function.

Criteria: If this function succeed, the user can log in the system and enter chemical information system.

Input: User’s choice (add new user), Username, Password, Firstname, LastName, Telephone, StreetName, City, State, ZipCode, Country.

Output: None

Delete User Record.

Objective: Test DeleteUser function

Criteria: If this function succeed, enter this user name and password will not be allowed to access the chemical information system again

Input: User name

Output: None

Update User Records.

Objective: test the updateUser function.

Criteria: If this function succeeds, the user’s certain information has been changed, such as password. Only the user enters the username, and the new password, can the user access chemical information system.

Input: User’s choice (add new user), Username, the item that user want to change and its value.

Output: None

Add New Chemical Record.

Objective: test the CreateChem function.

Criteria: If this function succeeds, the new chemical’s information can be retrieved. For example, the chemical’s name and its property can be retrieved.

Input: User’s choice (add new Chemical), Chem_name, CASNo., Formula, Synonym, Category, Stability, Toxicity, Risky phrases, Safety phrases

Output: New chemical.

Delete Chemical Record.

Objective: test the DeleteChem function.

Criteria: If this function succeeds, the chemical’s information will be deleted from the database. It cannot be retrieved any more

Input: User’s choice (delete Chemical), CASNo,

Output: None.

Update Chemical Record.

Objective: test the UpdateChem function.

Criteria: If this function succeeds, the chemical’s information will be updated from the database.

Input: User’s choice (delete Chemical), CASNo, the item name and the value.

Output: Updated chemical.

User

  • Scenarios

User enter user name and password to enter the chemical information system. If the user name and password are correct, then enter the formula page.

User enter the chemical formula

User choose the desired formula and the query item

The system show the user the toxicity information, risky information, safety information etc.

  • Detailed testing description with objectives and success criteria for each test.

Verify

Objective: test the Verify function.

Criteria: If this function succeeds, the user can access the chemical information system if the username and passwords are correct. Otherwise they cannot enter the system.

Input: User’s choice, user name and password.

Output: True or false.

getChemName

Objective: test the getChemNamefunction.

Criteria: If this function succeed, the chemical’s names will be returned to the user with the same formula

Input: User’s choice (delete Chemical),formula

Output: Chem_Name

getToxi

Objective: test the getToxi function.

Criteria: If this function succeed, the chemical’s toxicity information will be returned to the user.

Input: User’s choice (getToxi), Chemical name, formula

Output: Toxicity information.

getRisk

Objective: test the getRisk function.

Criteria: If this function succeed, the chemical’s risky information will be returned to the user.

Input: User’s choice (getRisk), Chemical name, formula

Output: Risky information information.

getSafe

Objective: test the getSafe function.

Criteria: If this function succeed, the chemical’s safety information will be returned to the user.

Input: User’s choice (getSafe), Chemical name, formula

Output: Safety information information.

3. Implementation status report

  • work completed/work to be completed and the description:

Work completed:

This project extended our previous project. Except the implemented web interfaces and basic system functions, the new system can access distributed heterogeneous databases and do some advanced knowledge analysis. In this project, we have set up three heterogeneous databases including MS Access, MS SQL and Oracle databases to store the chemical toxicity and safety information. We have implemented three database adaptors including AccessAdaptor, SQLAdaptor and OracleAdaptor. These adaptors configure the data resource mapping. We have added a metaDB entity bean, which stores the collected information in a virtual table and hides the underlying distributed heterogeneous databases. When a user submits a request, the QueryBean connects with metaDB bean and metaDB bean communicates with the adaptors. The implementation was done using Java Jboss_Jetty application server.

The new system architecture is shown in the following Figure 1.

Figure 1. System architecture

EJB components (Application Server/Database Server Interface):

  • AccessAdaptor (Entity Bean): It is used to directly make queries to MS Access database. It maps underlying Access data format to unified meta-data format. MetaDB bean communicates with this entity bean and obtain required chemical toxicity and safety information.
  • SQLAdaptor (Entity Bean): It is used to directly make queries to MS SQL database. It maps underlying SQL data format to unified meta-data format. MetaDB bean communicates with this entity bean and obtain required chemical toxicity and safety information.
  • OracleAdaptor (Entity Bean): It is used to directly make queries to Oracle database. It maps underlying Oracle data format to unified meta-data format. MetaDB bean communicates with this entity bean and obtain required chemical toxicity and safety information.
  • MetaDB (Entity bean): It accepts the queries from QueryBean and communicates with three underlying database adaptors. It stores the collected chemical toxicity and safety information in a virtual table.
  • AdminBean (Session Bean): It provides customized accessing function for user database and chemical toxicity and safety database.
  • LoginBean (Session Bean): It connects UserDBBean to verify the username and password.
  • QueryBean (Session Bean): It provides customized query function for chemical databases.
  • UserDB bean (Entity Bean): It stores information for user management

Servlets (Application Server/Web Server interface):

  • LoginServlet: provide user authentication and new user creation.
  • QueryServlet: answer browser request for chemical toxicity database query.
  • FormulaServlet: query by chemical formula
  • CompareServlet: compare chemical information by category
  • Barchart.java: view the comparison in bar chart

Web pages (Web Server/Browser interface):

  • Index.html: homepage of the chemical toxicity and safety query system.
  • Admin.html: administrator menu
  • Login.html: user authentication page

Work to be completed:

  • More rule-based analysis criteria will be used to analyze the chemical toxicity, risky and safety information. It will be implemented using knowledgeDB session bean.
  • More documentation and test cases need to be done.

Person

Our team members cooperate together to finish this project. We meet twice a week to discuss the system design and implementation. Shuanghui is in charge of the system architecture and deployment of the system, and metaDB bean and its connection to the adaptor entity beans. Ying focuses on the database setup and connection. Jin focuses on the database setup and connection and system deployment.

Time

The following is the estimate of the time we have worked on the Project 4-1:

Shuanghui Luo150 hours

Ying Li150 hours

Jin Xu 150 hours