Title: Chemical Toxicity and Safety Information System
1Chemical Toxicity and Safety Information System
- Shuanghui Luo Ying Li
- Jin Xu
2Outline
- Introduction
- Goals and system functionalities
- Technologies and tools
- System architecture
- Illustration of the implementation
3Cheminfomatics
- Cheminformatics is an exciting and rapidly
developing field, and focuses on solving problems
arising from chemistry using methodology from
computer science. - The practice not only to leverage the accumulated
knowledge in various forms but also to derive new
understanding based on the available knowledge
using information technologies and tools.
4Introduction
- Significance
- Our designed system is to provide a useful
on-line resource for different users such as
scientists, students and so on. - To show the selected chemical toxicity, risky
and safety - information.
- To compare the toxicity data, risky and safety
phrases with the analogue chemicals. - To indicate the risky phrases and safety
guidelines, for example, some chemicals are high
toxic and need to keep away from human being and
living entities.
5Metadatabase
Metadata Data that describes data Structured
data about data.
- ? Precise Enables the creation of customized
virtual collections--pulling objects
together seamlessly from any digital space to
meet exact information requirements. - ? Flexible Supports any search engine, search
strategy, transport or display option - ? Efficient Provides immediate access to the most
appropriate asset for the searcher. - ? Durable independent of changes to hardware,
software and network infrastructure - ? Interoperable Can be seamlessly shared across
the web with disparate hardware, software,
network infrastructure and search engines
6Goals
- Establish a distributed chemical toxicity and
safety information service system using a
multi-tier architecture - Follow the process of software development
- Learn and apply middleware technologies (EJB and
XML) - Understand distributed meta-database service
Browser
Client Tier
Servlet
Representation Tier
EJB
Business Tier
Integration Tier
meta-data layer
DB2
Resource Tier
DB1
DB3
7System Functionalities
- Online search application
- Presents users chemical toxicity, risky, and
safety information and services - Manages user logins for security
- The meta data layer will integrate data from
distributed sources and does some analysis and
returns the corresponding data table and view in
graph.
8Technology and Tools (1/3)
Browser
EIS resources
Web container
EJB container
Meta Data Layer
HTML
Servlets
Enterprise Beans
Entity Bean
9Technology and Tools (2/3)
- EJB ( Enterprise Java Beans)
- Server-side architecture for distributed,
transactional components. - Framework for easily creating business
objects.(e.g. transaction, naming, persistence
services) - Relive developers from managing
- Low-level transaction and state management
- Multithreading and resource pooling
- Security
- Persistence and other complex APIs.
- Provide standard Java component architecture.
- Allow combining components developed using
different tools. - Compatible with existing server platforms,
existing Java APIs and CORBA. - Write once, and run anywhere.
10Technology and Tools (3/3)
- Java programming language
- Servlet web presentation
- XML used to write deployment descriptor
- Jboss-Jetty
- Ant - Build Tool
- MS-Access DB1
- SQL-Server DB2
- Oracle DB3
11System architecture
Tier 1
Tier 2
Tier 3
EJB container
UserDBBean (Entity Bean)
ChemDBBean Entity Bean
SafeDBBean Entity Bean
RiskDBBean Entity Bean
Database
AdminBean Sesssion Bean
QueryBean Sesssion Bean
LoginBean Sesssion Bean
Web Browser
Servlet
Web container
12Proposed System architecture
Web Browser
Web container
Servlet
EJB Container
LoginBean Sesssion Bean
AdminBean Sesssion Bean
QueryBean Sesssion Bean
UserDBBean (Entity Bean)
Knowledge Database
Entity Bean
Meta Data Layer
ChemDBBean Entity Bean1
ChemDBBean Entity Bean3
ChemDBBean Entity Bean2
DB3
DB2
DB1
13EJB Beans
- Four Entity Beans
- UserDBBean store user information for user
management. - ChemDBBean store chemical toxicity, and chemical
properties. - RiskDBBean store chemical information about
risky phrases. - SafeDBBean store chemical information about
safety phrases - Three Session Beans
- LoginBean handle user verification (uses
UserDBBean check the user ID and password) - AdminBean for administrator to manage user
accounts - QueryBean handle client request retrieve
chemical information
14Servlets
- LoginServlet User verification.
- FormulaServlet Query by chemical formula.
- QueryServlet Query for chemical information
including toxicity, risky and safety phrases. - Compareservlet Compare chemical information by
category.
15File structure (1)
Root/cheminfo
Ant Project scripts /build
Package com.cheminfo /com/cheminfo
chem
risk
safe
user
query
login
admin
servlet
html
16File structure (2)
17Container-managed Persistence(CMP)
- Container automatically manages persistence.
(Developer does not write database calls.) - The CMP-field element describe a container
managed field. The field element includes an
optional description of the field, and the name
of the field.
18Container-managed Persistence(CMP) contd
- Since the container is accessing the database on
behalf of the bean, the container need to know - a) the fields that are to be persisted by
the container - b) the type of persistence, connection to
database - c) the table name, the mapping between table
columns - d) field names in the beans
- e) the semantics of the finder methods and
so on. - This information is specified in the deployment
descriptors ejb-jar.xml jboss-web.xml, web.xml,
jaws.xml
19ejb-jar.xml
- This file tells the EJB server which classes
make up bean implementation, the home interface
and the remote interface. Also called deployment
descriptor.
20ejb-jar.xml example
- lt?xml version"1.0" ?gt
- lt!DOCTYPE ejb-jar (View Source for full
doctype...)gt - ltejb-jargt ltdisplay-namegtChemical Toxicity and
Safetylt/display-namegt - - ltenterprise-beansgt
- - ltentitygt
- ltdescriptiongtUser databaselt/descriptiongt
- ltejb-namegtUserDBBeanlt/ejbnamegt
- lthomegtcom.cheminfo.user.UserDBHomelt/homegt
- ltremotegtcom.cheminfo.user.UserDBlt/remotegt
- ltejb-classgtcom.cheminfo.user.UserDBBeanlt/e
jb-classgt - ltpersistence-typegtContainerlt/persistence-t
ypegt - ltprim-key-classgtjava.lang.Stringlt/prim-ke
yclassgt - ltreentrantgtFalselt/reentrantgt
- -ltcmp-fieldgt ltfield-namegtUserNamelt/field-name
gt lt/cmp-fieldgt - - ltcmp-fieldgt ltfield-namegtPassWordlt/field-nam
egt lt/cmp-fieldgt - - ltcmp-fieldgt ltfield-namegtEmaillt/field-namegt
lt/cmp-fieldgt - -ltcmp-fieldgt ltfield-namegtAddresslt/field-namegt
lt/cmp-fieldgt - -ltprimkey-fieldgtUserNamelt/primkey-fieldgt
- lt/entitygt
21jboss-web.xml file
- Specify servlets beans about their setup to
deploy the web application. -
- Example
- A servlet wants to call methods on a bean
B - B bean home.create(pk)
- the servlet must declare a reference to
the ejb in - its deployment descriptor.
- This is done by an ltejb-refgt tag in the
web.xml file.
22jboss-web.xml example
- lt?xml version"1.0" encoding"UTF-8" ?gt
- - ltjboss-webgt
- - ltejb-refgt
- ltejb-ref-namegtejb/Adminlt/ejb-ref-namegt
- ltjndi-namegtcheminfo/Adminlt/jndi-namegt
- lt/ejb-refgt
- - ltejb-refgt
- ltejb-ref-namegtejb/Loginlt/ejb-ref-namegt
- ltjndi-namegtcheminfo/Loginlt/jndi-namegt
- lt/ejb-refgt
- - ltejb-refgt
- ltejb-ref-namegtejb/Querylt/ejb-ref-namegt
- ltjndi-namegtcheminfo/Querylt/jndi-namegt
- lt/ejb-refgt
- ltejb-refgt ltejb-ref-namegtejb/ChemDBlt/ejb-ref
-namegt ltjndi-namegtcheminfo/ChemDBlt/jndi-name
gt lt/ejb-refgt - ltejb-refgt
ltejb-ref-namegtejb/RiskDBlt/ejb-ref-namegt
ltjndi-namegtcheminfo/RiskDBlt/jndi-namegt
lt/ejb-refgt - ltejb-refgt ltejb-ref-namegtejb/Safe
DBlt/ejb-ref-namegt ltjndi-namegtcheminfo/SafeDB
lt/jndi-namegt lt/ejb-refgt lt/jboss-webgt
23jaws.xml file
- JAWS is the mapper used by JBoss to manage CMP
entity beans. - Specify a datasource and the type-mappings to use
with it - Set a bunch of options concerning jaws behavior
- Specify how JAWS should build/use your tables
- Define finders to access you entity beans
- Define a type mapping
24jaws.xml example
- ltjawsgt
- ltdatasourcegtChemInfoDBlt/datasourcegt
- lttype-mappinggtMS SQLSERVERlt/type-mappinggt
- ltenterprise-beansgt
- ltentitygt
- ltejb-namegtUserDBBeanlt/ejb-namegt
- lttable-namegtuserlt/table-namegt
- ltcreate-tablegtfalselt/create-tablegt
- ltcmp-fieldgtltfield-namegtUserNamelt/field-namegt
- ltcolumn-namegtUserNamelt/column-namegtlt/cmp-fieldgt
- ltcmp-fieldgtltfield-namegtPassWordlt/field-namegtlt
column-namegtPassWordlt/column-namegtlt/cmp-fieldgt - ltcmp-fieldgtltfield-namegtEmaillt/field-namegtltcolu
mn-namegtEmaillt/column-namegtlt/cmp-fieldgt - ltcmp-fieldgtltfield-namegtAddresslt/field-namegtltco
lumn-namegtAddresslt/column-namegtlt/cmp-fieldgt - lt/entitygtnamegt
- ltcreate-tablegtfalselt/create-tablegt
- ltcmp-fieldgt ltfield-namegtUserNamelt/field-namegt
- ltcolumn-namegtUserNamelt/column-namegt
lt/cmp-fieldgt - ..
25(No Transcript)
26Administrator
Change users information
27User
New User register
New User registered successfully
28Query a chemical
29Query page
30Safety, risky, toxicity result page
31Toxicity comparison result page