memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · web viewif...
TRANSCRIPT
![Page 1: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/1.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
UMLUML Activity Diagram for Adding a New Database to WebFindit
Create real
database
Create the
codatabase
Add a new
database
to WebFindit
Modify related
scripts
Create database
related
documents
(see Note 1)
Create database
schema
(see Note 2)
Populate new
database
(see Note 4)
Populate new
database
(See Note 3)
![Page 2: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/2.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
Relational
database
OO
database
Register with
Orbix
(See Note 10)
Register with
OrbixWeb
(see Note 5)
Register with
EJB server
(see Note 7)
Register with
RMI server
(see Note 8)
Register with
Visibroker
(see Note 6)
Register with
DCOM server
(see Note 9)
OrbixWeb
EJB RMI
Visibroker
![Page 3: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/3.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
MO DC
text
Create new
ontology
(see Note 11)
Create new
codatabase
(see Note 15)
Ontology not exist Ontology exist
Create new
ontology
in related codb dir
(see Note 13)
Modify other
related
codatabase
(see Note 16)
Create new
codatabase
(see Note 12)
Modify other
related
codatabase
(see Note 14)
Create scripts to
![Page 4: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/4.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
register with
Orbix
(see Note 17)
Create scripts to
start codb server
(See Note 19)
Relational
database
OO
database
Create related
files to start db
server
(See Note 18)
Modify the script
to check system
availability
(See Note 20)
Modify related
files
(See Note 21)
Modify related
files
(See Note 22)
OO
![Page 5: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/5.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
database
support
xml queryNotes
1. Go to ~/public_html/webfindit/Documentation
Create a new directory, put the database related html files and images there.
For example, if the new database is QUT, create a new directory QUT in
~/public_html/webfindit/Documentation. In QUT, create directory html and
images.
2. Go to ~/public_html/webfindit/Documentation/schemas
Create a new directory. Then create default.htm containing the schema of the new
database there.
For example, if the new database is QUT, create a new directory QUT in
~/public_html/webfindit/Documentation/schemas. Part of the content of
default.htm is like:
Table people (
people_id int not null primary key,
first_name char(20),
surname char(20)
(
Table staff (
people_id int not null primary key,
office_number char(5),
office_phone char(15),
last_qualification char(30),
major_res_interest char(40),
![Page 6: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/6.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
num_publications int
(
3. Go to ~/WebFindit_3/Actual_Databases
Create a new directory. Then create SQL scripts to populate the database.
For example,
If the new database QUT is a DB2 database, create a new directory DB2_QUT
and take the scripts in DB2_Medicare as examples.
If the new database QUT is a INFORMIX database, create a new directory
INFORMIX_NT_QUT and take the scripts in INFORMIX_NT_ DONATION as
examples.
If the new database QUT is a MSQL database, create a new directory
MSQL_QUT and take the scripts in MSQL_MBF as examples.
If the new database QUT is a ORACLE database, create a new directory
ORACLE_QUT and take the scripts in ORACLE_QUH as examples.
If the new database QUT is a ObjectStore database, create a new directory
OBJ_STORE_QUT and take the scripts in OBJ_STORE_AMP as examples. The
most important one you should work on is Create_*_database.cc. 4. Go to ~/WebFindit_3/IDL
Create an idl file using AMP.idl as an example. Compile the idl file into Java and
C++ files. Go to ~/WebFindit_3/Actual_Databases/ and create a new dir Orbix_*.
Create files using files in Orbix_AMP as examples.
For example, the new database is QUT, the idl file is like the following. Field1,
Field2, Field3 represent the fields in the QUT database table.
#include "Types.idl"
#include "Query.idl"
typedef sequence<string> StringSeq;
![Page 7: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/7.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
interface QUT
}
StringSeq RetrieveAllField1();
StringSeq RetrieveAllField2();
StringSeq RetrieveAllField3();
... ...
string execute(in string query, inout Query::QueryStatus qs);
// gets the Documentation for a particular doc type from the database
Types::MimeObjectSeq getDocumentation(
in long docTypeId,
inout Query::QueryStatus qs);
// gets the database schema
string getSchema();
;{
5. If the database registers with OrbixWeb ORB, go to
~/WebFindit_3/Actual_Databases/OrbixWeb_Actual_Databases/ and modify
OwebServer.java. In OwebServer.java, add the code to create an instance of
DatabaseImpl. For example, the new database QUT is an DB2 database, add the
following code:
qut = new DatabaseImpl
("QUT Research",
"COM.ibm.db2.jdbc.net.DB2Driver",
"jdbc:db2://earth.nvc.cs.vt.edu:QUTR",
"http://www.nvc.cs.vt.edu/~project/webfindit/Documentation/schemas/
QUT/default.htm"); 6. If the database registes with Visibroker ORB, go to
![Page 8: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/8.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
~/WebFindit_3/Actual_Databases/VisiBroker_Actual_Databases/ and modify
OwebServer.java to create a new instance of DatabaseImpl and register it with
ORB. For example, if the new database is SGF, add the following code in
OwebServer.java:
DatabaseImpl sgf = new DatabaseImpl("State Government Funding",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@pluto.nvc.cs.vt.edu:1521:project",
"http://www.nvc.cs.vt.edu/~project/webfindit/Documentation/schemas/
SGF/default.htm");
orb.connect(sgf);
FileWriter output = new FileWriter("/people/project/WebFindit_3/IORs
/Actual_Database_IORs/sgf_db.ior");
output.write(orb.object_to_string(sgf));
System.out.println("Wrote Patient's IOR to file: sgf_db.ior");
output.close();
7. If the database registers with EJB server, go to
~/WebFindit_3/Actual_Databases/VB_CorbaEJB/ and modify
VbrokerServer.java. If the new database MIC is a Oracle database, add the
following code in VbrokerServer.java:
DatabaseImpl myejb = new DatabaseImpl
("company",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@jupiter.nvc.cs.vt.edu:1521:project",
"http://www.nvc.cs.vt.edu/~project/webfindit/Documentation/schemas/
MIC/default.htm");
![Page 9: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/9.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
orb.connect(myejb);
FileWriter output = new FileWriter("/people/project/WebFindit_3/IORs
/Actual_Database_IORs/MIC_db.ior");
output.write(orb.object_to_string(myejb));
System.out.println("Wrote Patient's IOR to file: MIC_db.ior");
8. If the database registers with RMI server, go to
~/WebFindit_3/Actual_Databases/VB_CorbaRMI/ and modify
VbrokerServer.java. If the new database QUH is a Oracle database, add the
following code in VbrokerServer.java:
DatabaseImpl QUH = new DatabaseImpl
("QUH",
"oracle.jdbc.driver.OracleDriver",
"jdbc:oracle:thin:@pluto.nvc.cs.vt.edu:1521:project",
"http://www.nvc.cs.vt.edu/~project/webfindit/Documentation/schemas/
QUH/default.htm"); orb.connect(QUH);
FileWriter output = new
FileWriter("/people/project/WebFindit_3/IORs/Actual_Database_IORs/QUH_db.
ior");
output.write(orb.object_to_string(QUH));
System.out.println("Wrote Patient's IOR to file: QUH_db.ior");
output.close();
9. If the database registers with DCOM server, go to
~/WebFindit_3/Actual_Databases/VB_CorbaDCOM/ and modify
VbrokerServer.java. For example, if the new database is an Informix database on
Windows NT, add the following code to VbrokerSerser.java.
![Page 10: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/10.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
DatabaseImpl sgf = new DatabaseImpl
("Donation",
"driver",
"informix",
"http://www.nvc.cs.vt.edu/~project/webfindit/Documentation/schemas/
DONATION/default.htm");
orb.connect(sgf);
FileWriter output = new FileWriter("/people/project/WebFindit_3/IORs
/Actual_Database_IORs/DONATION_db.ior");
output.write(orb.object_to_string(sgf));
System.out.println("Wrote Patient's IOR to file: DONATION_db.ior");
output.close();
10. Go to ~/WebFindit_3/Actual_Databases/ Orbix_*. Create files using files in
Orbix_AMP as examples. For example, if the new database is AMP, the follow
code are needed in Srv_main.cc:
// create a AMP object - using the implementation class AMP_i
AMP_i amp_db;
// This section is to store the AMP IOR into a file
char *tmpFileName = "";
char tmpFilePath[1024];
strcat(tmpFileName,
"/people/project/WebFindit_3/IORs/Actual_Database_IORs/amp_db.ior");
CORBA::Orbix.setServerName("AMP");
char *stringObj;
![Page 11: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/11.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
try {
stringObj =
amp_db._object_to_string(CORBA::IT_INTEROPERABLE_OR_KIND);
{
catch (CORBA::SystemException &sysEx) {
cerr << "Unexpected system exception " << endl; cerr << &sysEx;
{
// get Orbix to start processing incoming requests
try {
CORBA::Orbix.impl_is_ready("AMP",CORBA::Orbix.INFINITE_TIMEOUT);
{
catch (CORBA::SystemException &sysEx) {
cerr << "Unexpected system exception" << &sysEx << endl;
exit (1);
{
11. Go to ~/WebFindit_3/Codatabases/ and create a new directory
*_Codatabase_Source. Add new files, for example, if the new database belongs to
a new ontology Welfare, create new files such as Coalition_Welfare.hh and
Coalition_Welfare.cc. Also add new OS_MARK_SCHEMA_TYPE in schema.cc
as follows:
OS_MARK_SCHEMA_TYPE (Welfare);
Coalition_Welfare.cc is like
#include <string.h>
#include <stdio.h>
![Page 12: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/12.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
#include "Coalition_Welfare.hh"
Coalition_Welfare::Coalition_Welfare(char *keywords,
char *database_name, char *dbms, char * operating_system,
char *query_language)
}
strcpy(Keywords, keywords);
strcpy(DatabaseName, database_name);
strcpy(Dbms, dbms);
strcpy(OperatingSystem, operating_system);
strcpy(QueryLanguage, query_language);
;{
12. Copy all files in ~/WebFindit_3/Codatabases/RBH_Codatabase_Source/ to the
current directory and modify those files and rename files. The most important file
need to be modified is Create_*_Codatabase.cc. For example, the new database
RBH is an instance of Medical Ontology. The following code is added:
cout << PROGRAM_NAME << ": creating RBH instance in Medical
Ontology" << endl;
MC[0] = new(db1, Coalition_Medical_type) Coalition_Medical(
"Medicines, Patients, Doctors", "Fairfax_Hospital",
"Oracle", "Unix Solaris 2.6", "SQL"); DocumentationTypes *RBH_Medical_DocTypes[3];
RBH_Medical_DocTypes[0] = new(db1, DocumentationTypes_type)
Documentation Types(1, "Slow Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType
/slow.gif");
![Page 13: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/13.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
RBH_Medical_DocTypes[1] = new(db1, DocumentationTypes_type)
Documentation Types(4, "Medium Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType
/medium.gif");
RBH_Medical_DocTypes[2] = new(db1, DocumentationTypes_type)
DocumentationTypes(3, "Fast Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/fast.gif");
MC[0]->documentation_types.insert(RBH_Medical_DocTypes[0]);
MC[0]->documentation_types.insert(RBH_Medical_DocTypes[1]);
MC[0]->documentation_types.insert(RBH_Medical_DocTypes[2]);
13. Go to other *_Codatabase_Source directory, if the current database belongs to a
new ontology Welfare, create new files such as Coalition_Welfare.hh and
Coalition_Welfare.cc. Also add new OS_MARK_SCHEMA_TYPE in schema.cc
as follows:
OS_MARK_SCHEMA_TYPE (Welfare);
For example, the current database is RBH, in Create_RBH_Codatabase.cc, the
following part should be added:
cout << PROGRAM_NAME << ": creating Welfare Ontology" << endl;
Coalition_Welfare *MC[3]; // Instances in the Welfare Ontology
// Instances for RBH,...
os_typespec *Coalition_Welfare_type = new os_typespec("Coalition_Welfare");
cout << PROGRAM_NAME << ": creating RBH instance in Welfare
Ontology" << endl;
![Page 14: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/14.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
MC[0] = new(db1, Coalition_Welfare_type) Coalition_Welfare(
"Medicines, Patients, Doctors", "Fairfax_Hospital",
"Oracle", "Unix Solaris 2.6", "SQL");
DocumentationTypes *RBH_Welfare_DocTypes[3];
RBH_Medical_DocTypes[0] = new(db1, DocumentationTypes_type)
DocumentationTypes(1, "Slow Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/slow.gif");
RBH_Medical_DocTypes[1] = new(db1, DocumentationTypes_type)
DocumentationTypes(4, "Medium Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/medium.gif"); RBH_Medical_DocTypes[2] = new(db1, DocumentationTypes_type)
DocumentationTypes(3, "Fast Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/fast.gif");
MC[0]->documentation_types.insert(RBH_Medical_DocTypes[0]);
MC[0]->documentation_types.insert(RBH_Medical_DocTypes[1]);
MC[0]->documentation_types.insert(RBH_Medical_DocTypes[2]);
cout << PROGRAM_NAME << ": creating Queensland Cancer fund instance
in Welfare Ontology" << endl;
... ...
14. Go to other *_Codatabase_Source directories, if the new database and the current
database belong to the same ontology, modify Create_*_Codatabase.cc. For
example, the new database QUT and the current database RBH are both instances
of Medical Ontology. The following code is needed in the part of creating
Medical Ontology in Create_RBH_Codatabase.cc.
cout << PROGRAM_NAME << ": creating QUT instance in Medical
Ontology" << endl;
![Page 15: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/15.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
MC[2] = new(db1, Coalition_Medical_type) Coalition_Medical(
"medical, hospitals, health",
"Virginia_Tech_Research", "DB2", "Unix Solaris 2.6",
"SQL");
DocumentationTypes *QUT_MEDICAL_DocTypes[3];
QUT_MEDICAL_DocTypes[0] = new(db1, DocumentationTypes_type)
DocumentationTypes(5, "Slow Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/slow.gif");
QUT_MEDICAL_DocTypes[1] = new(db1, DocumentationTypes_type)
DocumentationTypes(0, "Medium Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/medium.gif");
QUT_MEDICAL_DocTypes[2] = new(db1,
DocumentationTypes_type)DocumentationTypes(4, "Fast Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/fast.gif");
MC[2]->documentation_types.insert( QUT_MEDICAL_DocTypes[0]);
MC[2]->documentation_types.insert( QUT_MEDICAL_DocTypes[1]);
MC[2]->documentation_types.insert( QUT_MEDICAL_DocTypes[2]);
If the new database and the current database both are instances of the new
ontology, copy the new ontology files to current directory. For example, both of
them are instances of new ontology Welfare. Copy Coalition_Welfare.cc and
Coalition_Welfare.hh and add OS_MARK_SCHEMA_TYPE (Welfare) in
schema.cc. Then add both databases to new ontology in Create_*_Codatabase.cc.
15. Go to ~/WebFindit_3/Codatabases/ and create a new directory
*_Codatabase_Source. Copy all files in
~/WebFindit_3/Codatabases/RBH_Codatabase_Source/ to the current directory
![Page 16: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/16.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
and modify files and rename files.
For example, the new database is QUT, change Create_RBH_Codatabase.cc to
Create_QUT_Codatabase.cc. In Create_QUT_Codatabase.cc, modify any places
related to current database.
For example, change
strcpy(theCoDb->localDatabaseIOR,
"/people/project/WebFindit_3/IORs/Actual_Database_IORs/rbh_db.ior");
to
strcpy(theCoDb->localDatabaseIOR,
"/people/project/WebFindit_3/IORs/Actual_Database_IORs/qut_db.ior");
Another example, change
strcpy(theCoDb->databaseName, "Fairfax_Hospital");
to strcpy(theCoDb->databaseName, "Virginia_Tech_Research");
16. Go to other *_Codatabase_Source directories, if the new database and the current
database belong to the same ontology, modify Create_*_Codatabase.cc.
For example, the new database QUT and the current database RBH are both
instances of Medical Ontology. The following code is needed in the part of
creating Medical Ontology in Create_RBH_Codatabase.cc.
cout << PROGRAM_NAME << ": creating QUT instance in Medical
Ontology" << endl;
MC[2] = new(db1, Coalition_Medical_type) Coalition_Medical(
"medical, hospitals, health",
"Virginia_Tech_Research", "DB2", "Unix Solaris 2.6",
"SQL");
![Page 17: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/17.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
DocumentationTypes *QUT_MEDICAL_DocTypes[3];
QUT_MEDICAL_DocTypes[0] = new(db1, DocumentationTypes_type)
DocumentationTypes(5, "Slow Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/slow.gif");
QUT_MEDICAL_DocTypes[1] = new(db1, DocumentationTypes_type)
DocumentationTypes(0, "Medium Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/medium.gif");
QUT_MEDICAL_DocTypes[2] = new(db1,
DocumentationTypes_type)DocumentationTypes(4, "Fast Connection",
"http://www.nvc.cs.vt.edu/~project/webfindit/DocumentationType/fast.gif");
MC[2]->documentation_types.insert( QUT_MEDICAL_DocTypes[0]);
MC[2]->documentation_types.insert( QUT_MEDICAL_DocTypes[1]);
MC[2]->documentation_types.insert( QUT_MEDICAL_DocTypes[2]); 17. Go to ~/WebFindit_3/Actual_Databases/, modify runorbixdbs to run new Orbix
database server. For example, the new database QUT is an ObjectStore database,
add the following line to runorbixdbs:
Orbix_QUT/server &
18. Go to ~/WebFindit_3/admin/db/, create a new file start_*_db using start_amp_db
as an example. Go to ~/WebFindit_3/admin/db/scripts/, create a new file
*_db_server.pl using amp_db_server.pl as an example. For example, the new
datbase is QUT, create a new file qut_db_server.pl:
#!/usr/local/bin/perl
print "starting database server (QUT) registered with Orbix ORB\n";
print "on host elara.nvc.cs.vt.edu\n";
print "\n\n";
system ('rsh elara.nvc.cs.vt.edu \'setenv WEBFINDIT_HOME
![Page 18: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/18.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
"/people/project/WebFindit_3"; source $WEBFINDIT_HOME/etc/orbix.env;
source $WEBFINDIT_HOME/etc/objectstore.env;
$WEBFINDIT_HOME/Actual_Databases/Orbix_QUT/server
>&$WEBFINDIT_HOME/log/db/qut_db_server.log\' &');
19. Go to ~/WebFindit_3/admin/codb, create some new scripts according to the
ontologies the database belong to. For example, if the new database is QUT,
which is an instance of Research Ontology, create start_qut_research_codb as
follows:
#!/bin/csh
setenv WEBFINDIT_HOME /people/project/WebFindit_3
source $WEBFINDIT_HOME/etc/webfindit.env
source $WEBFINDIT_HOME/etc/objectstore.env
source $WEBFINDIT_HOME/etc/orbix.env
$WEBFINDIT_HOME/admin/codb/scripts/research/QUT.pl
Go to ~/WebFindit_3/admin/codb/scripts/, if the database doesn’t belong to any
ontologies, make new scripts in the current dir. If the ontologies that the database
belong to exist, go to the corresponding ontology directories and make new
scripts there. If the ontologies don't exist, make new directories and scripts.
For example, the new database QUT is an instance of Research Ontology, create a
file QUT.pl in research directory:
#!/usr/local/bin/perl
print "starting codb server for database QUT Research\n";
print "in coalition research on host elara.nvc.cs.vt.edu\n";
print "\n\n"; system ('$WEBFINDIT_HOME/bin/CoDatabaseServer
QUT_CoDatabase_coalition_research Virginia_Tech_Research
![Page 19: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/19.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
saturn:$OSTORE_DB_HOME/saturn/QUT_Research_Codatabase/qut
_Codatabase.db
$WEBFINDIT_HOME/IORs/Codatabase_IORs/qut_codb_coalition_research.
ior &');
20. Go to ~/System_Start/, modify check_all and check_and_restart.
For example, if the new database QUT is an instance of Research Ontology,
which is running on elara, add the following code to check_all:
set wc_line=`rsh -l project elara ps -ef | grep QUT_CoD | grep proj | grep -v gr
ep |wc`
if ("$wc_line[1]" == "0" ) then
echo QUT CoDatabaseServer is not running
rsh -l project elara /people/project/WebFindit_3/admin/codb/start_qut_re
search_codb&
endif
In check_and_restart, the process number on elara increases from 7 to 8, change
set wc_line=`rsh -l project elara ps -ef | grep CoD | grep proj | grep -v grep |
wc`
if ("$wc_line[1]" != "7" ) then
echo There is only "$wc_line[1]" codatabase servers on elara
rsh -l project elara /people/project/System_Start/stop_codatabases
rsh -l project elara /people/project/System_Start/start_codatabases&
endif
to
set wc_line=`rsh -l project elara ps -ef | grep CoD | grep proj | grep -v grep |
![Page 20: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/20.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
wc`
if ("$wc_line[1]" != "8" ) then
echo There is only "$wc_line[1]" codatabase servers on elara
rsh -l project elara /people/project/System_Start/stop_codatabases
rsh -l project elara /people/project/System_Start/start_codatabases&
endif
21. If the new database supports XML query, modify
~/WebFindit_3/ui+qp/src/au/edu/qut/cis/webfindit/ui/WebFinditPanel.java.
For example, the new database is QUT, change
if (dbName.equals("Internal_Revenue_Service") || dbName.equals("Social_Secu
rity_Administration") || dbName.equals("Medicare") ||
dbName.equals("American_Association_of_Pediatrics")) }
// If it supports XML, enable the XML Query Tab
tabbedPane.setEnabledAt(3, true);
{
else
}
// Else if it doesn't support XML, disable the XML Query Tab
tabbedPane.setEnabledAt(3, false);
{
to
if (dbName.equals("Internal_Revenue_Service") || dbName.equals("Social_Secu
rity_Administration") || dbName.equals("Medicare") ||
dbName.equals("American_Association_of_Pediatrics") || dbName.equals
("QUT"))
![Page 21: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/21.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
}
// If it supports XML, enable the XML Query Tab
tabbedPane.setEnabledAt(3, true);
{
else
}
// Else if it doesn't support XML, disable the XML Query Tab
tabbedPane.setEnabledAt(3, false);
{
In ~/WebFindit_3/ui+qp/src/au/edu/qut/cis/webfindit/ui/XMLQueryPanel.java,
also change
// XML supported databases are hard coded here
if (dbName.equals("Internal_Revenue_Service") || dbName.equals("Social_Sec
urity_Administration") || dbName.equals("Medicare") ||
dbName.equals("American_Association_of_Pediatrics"))
to
if (dbName.equals("Internal_Revenue_Service") || dbName.equals("Social_Secu
rity_Administration") || dbName.equals("Medicare") ||
dbName.equals("American_Association_of_Pediatrics") || dbName.equals
("QUT"))
22. If the new database is ObjectStore database, modify
~/WebFindit_3/ui+qp/src/au/edu/qut/cis/webfindit/WebFinditWebInterface.java.
For example, the new database is QUT, change
if ((dbName.equals("Trigon")) || (dbName.equals("Arlington_Hospital")) || (d
bName.equals("Ambulance"))){
![Page 22: memberfiles.freewebs.commemberfiles.freewebs.com/88/02/62680288/documents/uml.docx · Web viewIf the new database QUT is a DB2 database, create a new directory DB2_QUT and take the](https://reader035.vdocuments.site/reader035/viewer/2022070610/5aea2c6c7f8b9a3b2e8c4cd6/html5/thumbnails/22.jpg)
WWW.CSWBUT.WEBS.COME MAIL:[email protected]
to
if ((dbName.equals("Trigon")) || (dbName.equals("Arlington_Hospital")) || (d
bName.equals("Ambulance")) || (dbName.equals("QUT"))){ In ~/WebFindit_3/ui+qp/src/au/edu/qut/cis/webfindit/qp/QueryProcessorImpl.java
add
else if (dbName.compareTo("QUT")==0) {
t.stop();
IE.Iona.OrbixWeb.CORBA.ObjectRef _objRef =
IE.Iona.OrbixWeb._OrbixWeb.Object(orb.string_to_object(ior));
QUT db = QUTHelper.bind(
":" + _objRef._implementation(), _objRef._host());
System.out.println("... got qut_db " + db);
returnResult = db.execute(queryString, new QueryStatusHolder(qs));
{
after each
if (dbName.compareTo("Trigon")==0) {
t.stop();
//AMP db = AMPHelper.narrow(orb.string_to_object(ior));
System.out.println("before string_to_object");
IE.Iona.OrbixWeb.CORBA.ObjectRef _objRef =
IE.Iona.OrbixWeb._OrbixWeb.Object(orb.string_to_object(ior));
System.out.println("before bind");
AMP db = AMPHelper.bind(":" +_objRef._implementation(), _objRef._host());
System.out.println("... got amp_db " + db);
returnResult = db.execute(queryString, new QueryStatusHolder(qs));
{