The MOMIS FAQ
Q.[1].The faq version
this is last update
$Id: faq.txt,v 1.111 2004/01/21 11:20:46 corni Exp $
Q.[2].Important notes
here
-
this file should be written in English
-
this file must be written in accordin to the Faq format (see below)
and line must be less than 80 characters width.
-
You are encouraged to use this file to write significant
documentation about the technical developement of the Momis
prototype.
Various (to be organized)
Istruzioni sulle Faq
Q.[3].convenzioni per scrivere questo file delle faq
questo file di faq e' un file di testo (plain text ascii) scritto con
un editor di testi quale emacs, winedit o notepad.
E' necessario rispettare alcune convenzioni stilistiche
per permettere l'elaborazione automatica delle faq
(e quindi l'esportazione di questo file in formati diversi dal testo)
Le convenzioni sono le seguenti:
Il file e' diviso in categorie e sotto categorie
le categorie iniziano per
---- nome categoria
le sottocategorie iniziano per
-- nome sotto categoria
la singola faq. ha due sezioni: la domanda, prefissata da:
q.
e la risposta, prefissata da:
a.
Il testo (a parte le categorie) inizia a colonna 3,
i primi 3 caratteri sono ignorati.
Il testo che inizia nelle colonne da 4 in poi,
viene trasformato in in testo html preformattato, esempio:
testo preformattato.
Il testo che inizia esattamente a colonna 3 viene convertito
in normale testo html.
Viene aggiunto un a-capo nel caso in cui una riga finisca con
un punto, punto esclamativo, interrogativo o due punti.
Attenzione: in questo file (come in tutti i file sorgenti),
cercare di NON superare le 80 colonne.
Q.[4].Tools per produrre HTML da questo file
E' stato sviluppato il tool perl
parseFaq
il seguente comando crea una pagina html (senza headers)
a partire da questo file
parseFaq faq.txt > faq.html
Overview
Q.[5].What is MOMIS
See site http://www.dbgroup.unimo.it/Momis/
The development environment
Q.[6].Environment setup on a window (2000/xp) machine
here the basic steps to initialize a cygwin the enviroment
from scratch:
Environment setup:
It should be all.
Now try to go in
c:/bin
and perform a ceck out
cvs co momis
and compile the whole momis:
cd $dmt
ant init
Q.[7].The $dmt (momis) directory structure
Here is a small tree of the momis development directory structure
with notes:
0note.txt files 0note.txt describes directorys content
build.properties (5k) a "make" related file
build.xml (28k) the main "make" file
setVars.sh (275b) for tests, to initialize the CLASSPATH
./CVS [2] data for the "CVS - Concurrent Versions System"
./bin [1]
byaccj_1.8_j0.92_modificato.tgz (96k) sources for the yacc used in MOMIS
compileJavaCC.sh (146b) a compilation Script
cvsUpdate.sh (104b)
./bin/win32 [2]
byacc.exe (100k)
./classes [1] momis compiled code
./conf [1] default configurations and config examples
corbaExample_full_m2.conf (1k)
momis.conf (1k)
siDesigner.conf (1k)
Torque.properties (4k) Torque (jdbc) configuration for accessing WordNet
./conf/declarationsIDL [2] Corba (IDL) MOMIS declarations
./conf/declarationsWSDL [2] WebServices (WSDL) MOMIS declarations
./conf/samplesIdl [2] Corba configuration examples
./conf/samplesWrapperCore [2] Wrappers configuration examples
./conf/samplesWsdl [2] WebServices configuration examples
./conf/schema [2] Wordnet relational schema in XML
./doc [1] Momis documentation direcgtory
0note.txt (80b)
faq.txt (88k) This faq file
parseFaq (16k) A script to convert the faq.txt to Html
./doc/api [2] MOMIS apis generated by "ant doc"
./doc/guides [2] Other various documents in faq format
multiWordnet.txt (7k)
webServices.txt (30k)
./images [1] Images files used in Gui programs (SiDesigner)
./lib [1] Libraries used by MOMIS
./samples [1] Variuos integration samples (may be out-of-date)
stato.xml (48k) reference example (this should be never outOfDate)
./src [1] MOMIS source code directory
odli3.y (108k) the ODL_i3 language parser for byacc
OntologyManagerClient_parser.jj (9k) a Wordnet client language for JavaCC
oql.y (49k) the OQL_i3 language parser for byacc (not used)
./src/it [2] the MOMIS Package root dir
./src/sql [2] Torque generated SQL for WordNet
./templates [1] Torque templates
./trash [1] Useless temporary files
./var [1] Autogenerated files (that varies over the time)
convention on file name prefix in the var dir:
run require a user interaction
start starts a serve daemon
build script used in compilation
Usage
Q.[8].How to use SI_Designer on sparc20 server
Starting from a terminal
cd /export/home/progetti.comuni/Momis/prototypeNew
source 0setVars
var/runSiDesigner.sh
Q.[9].Ant, basic usage
Basic parameters
-
ant init: use this command joust after the CVS check out
to initialize the whole momis.
This will perform the following operations
-
script generation in the directory $dmt/vars
-
generates the ODLi3 parser java code form the Yacc form
-
builds the corba stub and skeleton from the IDL files
-
builds the SQL and Java code for the Object Relational Mapping
implemented by Torque
-
compiles the whole source code
-
ant doc:
generates the javadoc documentation in the dir
$dmt/doc/api
-
ant clean:
cleans all the previously generated classes
-
ant scripts:
generates every scripts to start SiDesigner and related modules in the dir
$dmt/var
-
ant project:
generates the interfaces to connect to momis wordnet database
-
ant -projecthelp
shows all the ant possible parameters
-
ant [compile]:
whith no further parameters, compiles all the project
nota:
-
joust after one update it is good to recompile the
whole momis code,
here are the commands:
cd $dmt
ant init
Q.[10].The CVS, basic commands
here
-
check out
cvs co momis
-
update
cd $dmt
cvs upd -P -d 2> /dev/null | sort | awk '{printf("cvs ci -m \"%s-\" %s\n", $1, $2); }' > updatedfiles.txt
otherwise use the commands
cd $dmt
cvs upd -P -d | sort | less
-
add: add a file in the repository
cvs add filename
-
remove: remove a file from the repository
rm filename
cvs rm filename
-
commit:
make permanent the local modifications in the
repository.
Modifications are:
-
files added are really added to the repository
-
files removed are really removed from the repository
-
files modified are really modified in the last version in
the repository.
Run it:
cvs ci fileName
for a whole directory (and sub directories):
cvs ci directoryName
cvs ci .
Q.[11].CVS, advanced commands
here
Q.[12].How to use the bin/cvsUpdate.sh command
the script
$dmt/bin/cvsUpdate.sh
performs a CVS update and writes a formatted output into the file
$dmt/updatedfiles.txt
like this:
cvs ci -m "?-" vmtemplates/schemaXml_localClasses.vm_orig
cvs ci -m "?-" ws.wsdd
cvs ci -m "M-" src/it/unimo/dbgroup/momis/SIDesigner/SIM/MetodiSim.java
cvs ci -m "M-" src/it/unimo/dbgroup/momis/SIDesigner/SIM/SIM.java
the meaning of the "M-" or "?-" is:
"?-" the file exists on you Computer but does not exists
in the CVS repository
"M-" the file exists in the repository and you modified it on
your computer
The following is the exautive list of possible flags.
This is from the CVS documentation (info cvs)
U FILE
The file was brought up to date with respect to the repository.
This is done for any file that exists in the repository but not in
your source, and for files that you haven't changed but are not
the most recent versions available in the repository.
P FILE
Like `U', but the CVS server sends a patch instead of an entire
file. These two things accomplish the same thing.
A FILE
The file has been added to your private copy of the sources, and
will be added to the source repository when you run `commit' on
the file. This is a reminder to you that the file needs to be
committed.
R FILE
The file has been removed from your private copy of the sources,
and will be removed from the source repository when you run
`commit' on the file. This is a reminder to you that the file
needs to be committed.
M FILE
The file is modified in your working directory.
`M' can indicate one of two states for a file you're working on:
either there were no modifications to the same file in the
repository, so that your file remains as you last saw it; or there
were modifications in the repository as well as in your copy, but
they were merged successfully, without conflict, in your working
directory.
CVS will print some messages if it merges your work, and a backup
copy of your working file (as it looked before you ran `update')
will be made. The exact name of that file is printed while
`update' runs.
C FILE
A conflict was detected while trying to merge your changes to FILE
with changes from the source repository. FILE (the copy in your
working directory) is now the result of attempting to merge the
two revisions; an unmodified copy of your file is also in your
working directory, with the name `.#FILE.REVISION' where REVISION
is the revision that your modified file started from. Resolve the
conflict as described in *Note Conflicts example::. (Note that
some systems automatically purge files that begin with `.#' if
they have not been accessed for a few days. If you intend to keep
a copy of your original file, it is a very good idea to rename
it.) Under VMS, the file name starts with `__' rather than `.#'.
? FILE
FILE is in your working directory, but does not correspond to
anything in the source repository, and is not in the list of files
for CVS to ignore (see the description of the `-I' option, and
*note cvsignore::).
Installation
Q.[13].Momis Development environment installation on Windows (2000 o XP)
here:
-
Install Cygwin (www.cygwin.com), install at least the following
pakages:
bash, cvs, cygutil, less, man,
openssh, perl, unzip e vim.
-
Create a "system" directory where install development related tools.
The MOMIS default directory is:
C:\bin
-
in the just created directory install:
in the same dir will be installed momis
C:\bin\momis
You must ensure to install somewhere the
Java Software Development Tool Kit
the version should be at least the version 1.4.1
-
CygWin should create the dir directory c:\cygwin\home\userName
(where userName is the name you logged with)
-
In this directory copy the MOMIS environment
configuration files.
Such files sets variables, program default settings
and provides useful scripts.
Where to get such files
-qui- SISTEMARE QUESTA PARTE:
-
Setup cygwin:
Sometime it you should modify the file
/etc/profile
adding at the end of the file (after last line) the following
command:
. .bashrc
-
Personal environment setup.
-
Install WordNet.
Se the section below.
-
Run the Cygwin-bash go in the dir
c:/bin
and follow the instruction in the next question
How to obtain the last version of "MOMIS"
Q.[14].How to obtain the lastest version of "MOMIS"
You must have an account on the CVS server and the rights to access
to the repository.
Client requirements:
-
a CVS client that supports SSH (I use the cvs distributed in cygwin),
-
byacc che generi codice java
-
una versione dell'ambiente di sviluppo composto da tdk, jsdk1.4, ant
per compilare i sorgenti.
I seguenti comandi sono validi per scaricare i sorgenti nel caso di
uso con UNIX o con i tools CYGWIN di Windows:
questo compilera' momis
gli script per avviare le applicazioni maggiormente usate.
Per compilare la documentazione html dei sorgenti usare il comando
ant doc
Q.[15].Compile on the Sparc20
Sequence of commands to compile the first time momis under the Sparc20:
edit the files
conf/schema/id-table-schema.xml
conf/schema/momiswn-schema.xml
and remove the second line:
<!DOCTYPE database SYSTEM "file://c:/bin/momis/schema/database.dtd">
then use the following commands
setenv JAVA_HOME /usr/local/j2sdk1.4.0
setenv PATH "$JAVA_HOME/bin:$PATH"
ant scripts; chmod +x var/*.sh
ant init # will produce several compilation errors
cp $JAVA_HOME/jre/lib/rt.jar lib
ant
The wrappers
Q.[16].Running a wrapper directly from the command-line Client
There is a directory of examples in
conf/samplesWrapperCore/
For example:
-
to run a wrapper Dummy open and take a look to the file
conf/samplesWrapperCore/samplesWrapperDummyFromFile/stato.conf
and run the rapper inside the command line client:
var/runWrapperClient.bat \
conf/samplesWrapperCore/samplesWrapperDummyFromFile/stato.conf
the only command allowed will be
\dx
-
to run a jdbc wrapper from the client open and take a look to the file
conf/samplesWrapperCore/samplesWrapperJdbc/mySql.conf
edit parameters such as
driver to load
uri where to connect
username
password
according to the jdbc source you want connect to.
Then run the rapper inside the command line client:
var/runWrapperClient.bat \
conf/samplesWrapperCore/samplesWrapperJdbc/mySql.conf
This is an example useful to test JDBC wrapper connections
or new wrapper implementation (if any).
Q.[17].Configuring a JDBC wrapper for ODBC sources (MS Access, MS Excel)
These instructions should be valid for a generic ODBC data sources but I have
run tests using a MS Access file and a MS Excel file.
When you want to wrap an ODBC source you have to follow these steps:
-
Create a System DSN ODBC data source according to the kind of data source
you have (Access, Excel, for example).
-
Set all the required parameters for your sources (username, pwd, if any).
-
Now you can run SiDesigner (var/runSidesigner.bat for win system).
-
Set the Global Schema name.
-
Set the name for the new source you want to wrap.
-
Select the JDBC Wrapper from the list:
it.unimo.dbgroup.momis.communication.core.jdbc.WrapperJdbcCore
-
Set the following parameters:
WrapperJdbcCore.DriverClassName=sun.jdbc.odbc.JdbcOdbcDriver
WrapperJdbcCore.Url=jdbc:odbc:dataSourceNameDefined
WrapperJdbcCore.User=userNameDefined
WrapperJdbcCore.Password=pwdDefined
WrapperJdbcCore.debug=true
NOTE: The username and pwd are optional.
-
Select "new source" to wrap your source.
Q.[18].Configuring a JDBC wrapper for ODBC sources (MS SQLServer)
These instructions are valid fo MS SQLServer sources.
When you want to wrap a DB on MS SQLServer you have to follow these steps:
-
Copy these JDBC driver files for SQLServer (mbase.jar, mssqlserver.jar,
msutil.jar) in the dir "momis\lib" of your local version.
The specified files can be found on sparc in this dir:
progetti.comuni\progetti\SEWASIE\OntologyBuilder\DriverJDBC_for_MSSQLServer
-
Now it is necessary to run "ant scripts" from your develop dir to update
the classpath.
-
Now you can run SiDesigner (var/runSidesigner.bat for win system).
-
Set the Global Schema name.
-
Set the name for the new source you want to wrap.
-
Select the JDBC Wrapper from the list:
it.unimo.dbgroup.momis.communication.core.jdbc.WrapperJdbcCore
-
Set the following parameters:
WrapperJdbcCore.DriverClassName=com.microsoft.jdbc.sqlserver.SQLServerDriver
WrapperJdbcCore.Url=jdbc:microsoft:sqlserver://ComputerAddress:1433;DatabaseName=SQLServerDataBaseName;User=UtenteSQLServer;Password=PWDSQLServer
WrapperJdbcCore.User=SQLServerUser
WrapperJdbcCore.Password=PwdSQLServer
WrapperJdbcCore.debug=true
-
Select "new source" to wrap your source.
Q.[19].Running a CORBA wrapper demon
Steps to run a Jdbc/CORBA wrapper
-
obtain the last sources from the CVS repository
-
compile everything
ant init
-
run the orb
var/startOrb.bat
-
crate a configuration file,
for an oracle example see
conf/samplesIdl/wrapperJdbcOracle.conf
that is a well commented example.
#### IMPORTANT NOTE ####.
To use the oracle jdbc driver you need the jar file
NOT distributed in the MOMIS CVS code.
-
run the CORBA demon that will run the wrapper type:
use the command
var/startWrapperCorba.bat conf/samplesIdl/wrapperJdbcOracle.conf
that's all!
-
run a wrapper client.
It is important to test the wrapper.
We provide a comman line tool to do this for ANY wrapper.
To work the WrapperClient needs a configuration file
where are described which Wrapper load
and the parameters for the wrapper itself.
An example of configuration file for connecting to
the previous corba wrapper is (READ IT!)
conf/wrapperJdbcOracle_client.conf
To run the client type
var/runWrapperClient.bat conf/samplesIdl/wrapperJdbcOracle_client.conf
How use the WrapperClient:
End.
Q.[20].Running Configure and run a WEB SERVICE wrapper demon
To configure the environment
To start the service
var/runAxisAdminClient.bat conf/samplesWsdl/dummy/wrapper.wsdd
or
var/runAxisAdminClient.bat \
-lhttp://localhost/axis/services/dummyWrapper \
conf/samplesWsdl/dummy/wrapper.wsdd
to test the running service
echo -e "\\\\dx\\n\\\\x" | var/runWrapperClient.bat \
conf/samplesWsdl/dummy/wrapper_client.conf
To stop the service
var/runAxisAdminClient.bat conf/samplesWsdl/dummy/wrapper_undeploy.wsdd
var/runAxisAdminClient.bat \
-lhttp://localhost/axis/services \
conf/samplesWsdl/dummy/wrapper_undeploy.wsdd
Other examples:
-
WSDLWrapper test (see the faq "The Test web service"):
-
edit the deploy file
conf/samplesWsdl/jdbc/wrapper.wsdd
and the client configuration file
conf/samplesWsdl/jdbc/wrapper
-
run axis and deply the service using (for localhost):
var/runAxisAdminClient.bat conf/samplesWsdl/jdbc/wrapper.wsdd
-
test the client
echo -e "\\\\dx\\n\\\\x" | var/runWrapperClient.bat \
conf/samplesWsdl/jdbc/wrapper_client.conf
or run the client
var/runWrapperClient.bat conf/samplesWsdl/jdbc/wrapper_client.conf
and type the following sequence
o select * from turbine_permission
getColumnCount
getColumnName 1
next
getString 1
getDouble 1
getFloat 1
getLong 1
getBoolean 1
getChar 1
close
-
to undeploy the service
var/runAxisAdminClient.bat conf/samplesWsdl/jdbc/wrapper_undeploy.wsdd
Other services
Q.[21].odbtools notes
here
Q.[22].Using The OdbTools WebService interface
here
-
To use the OdbTool service in siDesigner
use the class
it.unimo.dbgroup.momis.SIDesigner.SIM.OdbToolInterface
see an example in
it.unimo.dbgroup.momis.SIDesigner.SIM.SIM
this provide a unique interface for both web service and
corba service.
If Web service fails CORBA is tried.
In the file conf/siDesigner.conf there are the following
configuration directives:
#
# ODBTools
#
# odb-tools webService
odbt_webServiceUri=http://sparc20.ing.unimo.it/axis/services/odbToolsApplic
#
# odb-tools
odbt_orbPort=1050
odbt_orbServer=sparc20.ing.unimo.it
odbt_namingName=odbt
-
the OdbTools WebService is a set of code that
allows to remotely use odbTools engine
through web services.
The server side require a valid installation of the
"olcd-designer" and of the "limita" tool.
See
conf/samplesWsdl/odbTool/odbToolsApplic.wsdd
for how to configure the path where these tools are located.
-
features:
The only supported feature is invoking the
ocdl-designer
given a olcd file,
the olcd run will return a xml output file.
-
to start and test the service
Be sure the axis is correctly configured.
To start the service:
var/runAxisAdminClient.bat conf/samplesWsdl/odbTool/odbToolsApplic.wsdd
to test the running service
var/runOdbToolClient.bat http://localhost:8080/axis/services/odbToolsApplic conf/samplesWsdl/odbTool/stato.olcd
To stop the service
var/runAxisAdminClient.bat conf/samplesWsdl/odbTool/odbToolsApplic_undeploy.wsdd
that's all.
-
Implementation notes:
The implementing classes are in the package
it.unimo.dbgroup.momis.wsdl.odbToolsImplementation
and are:
The WordNet in Momis
Q.[23].Introduction to WordNet in Momis
here
-
SLIM works using both JDBC wordnet connection
and the files
-
The SLIM interface is integrated with
the wordnet editor ingterface to allow the designer
to quickly extend wordnet
-
In the future will be possible to export
the new (extended) synset and relation used
in the schema annotation in the XML describing the
source.
Q.[24].How to initilize MySql
This is the procedure
-
install the MySql server.
Note for Linux users of MySql 4.0: for security reason, the
skip-networking options is active. Please, change the /etc/mysql/my.cnf
file commenting out the option like this:
#skip-networking
This way you will be able to connect to the database.
-
put the mysql/bin dir is in the path
-
modify the $dmt/build.properties line as follow
database = mysql
-
compile the sql code using
ant project
-
modify the $dmt/conf/Torque.proporties e
$dmt/conf/siDesigner.conf lines as follow:
torque.database.default.driver=org.gjt.mm.mysql.Driver
torque.database.default.url=jdbc:mysql://localhost:3306/momiswn
torque.database.default.username=momiswn
torque.database.default.password=momis
torque.database.MOMIS.driver=org.gjt.mm.mysql.Driver
torque.database.MOMIS.url=jdbc:mysql://localhost:3306/momiswn
torque.database.MOMIS.username=momiswn
torque.database.MOMIS.password=momis
-
be sure the mysql daemon is running
-
create the database:
mysqladmin create momiswn
-
create the user:
connect to the mysql system database
mysql mysql
and execute the following instructions (copy and paste them)
INSERT INTO user ( Host, User ) VALUES ( 'localhost', 'momiswn' );
#
UPDATE user SET
Select_priv = 'Y',
Insert_priv = 'Y',
Update_priv = 'Y',
Delete_priv = 'Y',
Create_priv = 'N',
Drop_priv = 'N',
Reload_priv = 'N',
Shutdown_priv = 'N',
Process_priv = 'N',
File_priv = 'N',
Grant_priv = 'N',
References_priv = 'N',
Index_priv = 'N',
Alter_priv = 'N'
WHERE user='momiswn';
#
UPDATE user SET Password=PASSWORD('momis') WHERE user='momiswn';
#
INSERT INTO db (
Host,
Db,
User,
Select_priv,
Insert_priv,
Update_priv,
Delete_priv,
Create_priv,
Drop_priv,
Grant_priv,
References_priv,
Index_priv,
Alter_priv
) VALUES (
'localhost',
'momiswn',
'momiswn',
'Y',
'Y',
'Y',
'Y',
'Y',
'Y',
'Y',
'Y',
'Y',
'Y'
);
#
#
FLUSH PRIVILEGES;
-
create the db schema:
cd $dmt/src/sql
mysql momiswn < momiswn-schema.sql
That's all folks. Now you have to write in the database all
wordnet data or get a dump of the database already initialized.
Q.[25].How to initilize the MySql db from a dump
steps are:
-
create a user (described above)
-
save locally the dump of the momiswn database.
A dump can be created by accessing the sparc20 with the command
ssh <username>@dbgroup.unimo.it
and then running:
mysqldump -u momiswn -p --opt momiswn > momiswn.dump
-
restore the dump with the following command:
mysql -u root momiswn < momiswn.dump
That's all.
Q.[26].Where MOMIS looks for the WordNet database?
By defautl momis expect Wordnet in the following directories
for windows: c:\wn16
for unix: /usr/local/wordnet1.6/
it is possible to choose any other directory, or relative path
to do this, MOMIS looks for the java System property "WNHOME".
An example of how to give a relative path:
edit the file
var/runSiDesigner.bat (or var/runSiDesigner.sh)
and add the parameter
-DWNHOME=../wn
on the java command line, in the following way:
java -DWNHOME=../wn it.unimo.dbgroup.momis.SIDesigner.SI_Designer ...
Q.[27].Note on the WordNet files:
Wordnet in windows should be in
c:/wn16
if it is in any other place,
try this command:
java -DWNHOME=theFullPathToWordnet it.unimo.dbgroup.momis.SIDe...
the Silm libraries will look into the
theFullPathToWordnet
path for the wordnet files
Q.[28].Useful Query
here
select LENGTH(DESCRIPTION)
from WN_RELATIONSHIP_TYPE
order by LENGTH(DESCRIPTION) desc;
Momis and Web services
Q.[29].Momis and Web services
Momis uses Apache Jakarta Axis as Web-Service engine.
WSDL intefaces must be stored in the directory
$dmt/conf/declarationsWSDL/
and stub/skeletons are usually compiled in the directory
$dms/wsdl
Q.[30].using the Axis java2WSDL
here:
-
define a public interface
package it.unimo.dbgroup.momis;
public interface Aa {
public void addNode(String nodeDescription_inXml);
}
-
compile it in the classpath, for example:
ant compile
-
then use the command
java org.apache.axis.wsdl.WSDL2Java \
-o . -d Session -s -S true -Nurn:Aa bb wp.wsdl
java org.apache.axis.wsdl.Java2WSDL \
-o wp.wsdl -l"http://localhost:8080/axis/services/aa" \
-n "urn:Aa" -p"it.unimo.dbgroup.momis" "urn:Aa" \
it.unimo.dbgroup.momis.Aa
Momis e Java Web Start
Q.[31].JWS - HOW TO Install from sources
here:
Q.[32].JWS - How to test the Prechooser
use this preChooser.bat
@echo off
rem
rem starts siDesigner GUI tool with PreChooser
rem
set PATH=%PATH%;.\\lib\\windows
set CLASSPATH=...findThisUsing: . setvars; echo $CLASSPATH
rem echo %CLASSPATH%
rem echo .
java it.unimo.dbgroup.momis.SIDesigner.PreChooser %1
to enable the debug in Java Web Start
modify the Java Web Start configuration file (javaws.cfg)
and sets the following options:
javaws.cfg.logToFile=true
javaws.cfg.logFileName=pathLogFileName/logFileName
Developement and Code Convention
Q.[33].programming style
refere to the sun java conventions:
http://java.sun.com/docs/codeconv/
see for example the line lenght convention
http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#313
Q.[34].Instance variable of the classes
The instance variable of the classes
must be private
and must begin with unterscore.
Example
private HashMap _relTargetMap = new HashMap();
Q.[35].javadoc
The tags
-- tag -- since version
@author 1.0
{@docRoot} 1.3
@deprecated 1.0
@exception 1.0
{@inheritDoc} 1.4
{@link} 1.2
{@linkplain} 1.4
@param 1.0
@return 1.0
@see 1.0
@serial 1.2
@serialData 1.2
@serialField 1.2
@since 1.1
@throws 1.2
{@value} 1.4
@version 1.0
for more information you are strolgly encouraged
to se the jdk documentation
j2sdkDir/doc/docs/tooldocs/windows/javadoc.html
Q.[36].Torque related issues
a few points on SQL queries
-
use the "Criteria" object to build database queries
to be as independent as possible from the db.
-
Write such database queries in the Peer objects
-
If possible do non use Peer object static methods outside
the ..om (object model) package.
tips
Q.[37].Emacs tips
compile inside emacs:
Use the command
M-x compile
and type
ant -emacs -f c:/bin/momis/build.xml
Q.[38].How do I create symbolic links in NTFS?
Use the junction tool available at:
http://www.sysinternals.com/ntw2k/utilities.shtml
Example:
To create a symbolic link for the 'classes' directory
under the 'WEB-INF' directory of my webapp under TOMCAT.
The symbolic link has to point at the classes directory of my
momis project. Change directory to WEB-INF of your tomcat
application and execute the following command:
junction.exe classes $dmt/classes
NB!!!:
Debugging
Q.[39].Using the System.out.println
The suggested way to perform the debug is
modify source code adding temporary ad hoc output
instruction.
This is useful and fast if You know well the code.
Otherwise You can try a GUI debugger
Q.[40].Using the JSwat debugger
JSwat
http://sourceforge.net/projects/jswat/
http://jswat.sourceforge.net/
http://www.bluemarsh.com/java/jswat/
JSwat is a standalone, graphical Java debugger front-end,
written to use the Java Platform Debugger Architecture (JPDA)
library provided by JavaSoft. JSwat is licensed under the GNU
General Public License which makes it freely available in both
binary and source code form.
To use the JSwat in momis,
uncompress the distribution file in the dir
$dmt/jswat
the content of such dir will be something like the following:
alberto 16:35:14 momis:l jswat/
total 2168
1 -rw-r--r-- 1 567 Apr 29 08:18 AUTHORS.txt
5 -rw-r--r-- 1 4176 Apr 29 08:18 BUGS.txt
27 -rw-r--r-- 1 26876 Apr 29 08:18 HISTORY.txt
18 -rw-r--r-- 1 18007 Apr 29 08:18 LICENSE.txt
53 -rw-r--r-- 1 53533 Apr 29 08:18 OLD_HISTORY.txt
12 -rw-r--r-- 1 11831 Apr 29 08:18 README.html
1 -rw-r--r-- 1 150 Apr 29 08:18 TODO.txt
352 -rw-r--r-- 1 359519 Apr 29 08:18 jclasslib.jar
892 -rw-r--r-- 1 912984 Apr 29 08:18 jswat.jar
795 -rw-r--r-- 1 813211 Apr 29 08:18 parser.jar
The following step will run SI-Designer into the jswat:
-
run jswat (see below)
-
configure jswat for Momis (see below)
-
run SI-Designer from jswat (see below)
here step by step:
Q.[41].using the EJP profiler
EJP Profiler
http://ejp.sourceforge.net/
The Extensible Java Profiler (EJP) is a Java profiling
tool that enables developers to test and improve the
performance of their programs running on the JVM. A profiling
tool measures and reports the time spent in different parts of
a program. Using it allows developers to identify any code
making heavy use of the CPU.
Intro:
-
the tracer generates a trace file of any java execution.
-
the presenter is the off-line analisys tool that reads the
trace file and let the user analyze the run.
Steps:
-
uncompress the tracer and the presenter into the dirs
$dmt/tracer
$dmt/presenter
-
copy (or move) the tracer library in the
momis libraries directory
cp tracer/lib/tracerapi.jar lib/
then regenerate the scripts
ant scripts
and modify the
var/runSiDesigner.bat or .sh
to run with the profiler adding the option
-Xruntracer
to the main command line, in this way:
java -Xruntracer it.unimo.dbgroup.momis.SIDesigner.SI_Designer ...
-
run the siDesigner
-
run the presenter
java -jar presenter/lib/ejp-presenter.jar
Software modules
Wrappers
Technical notes
Q.[42].CORBA implementation: running several wrapper server in the
same Virtual Machine
(Alberto)
Ho verificato se e' possibile lanciare piu' serever nella stessa
virtual machine usando:
orbd e servertool
ho avuto dei problemi...
quindi vengono lanciati in VM diverse
Q.[43].Wrapper: a bit of theory
Wrapper introduction
-
wrappers are designed to be as modular as possible,
at least for the Java developers.
Basically a wrapper is something that allows a (java) client
to access to a source so a Wrapper can be described
with a simple (Java) interface
it.unimo.dbgroup.momis.communication.Wrapper
with the following methods:
public String getDescription() throws WrapperException;
public String getDescriptionXml() throws WrapperException;
public String getSourceName() throws WrapperException;
public String getType () throws WrapperException;
public WrapperRS runQuery (String oql) throws WrapperException;
public void close() throws WrapperException;
most of them are intuitive, for more information look at the source
code.
The method runQuery makes exception since returns
an object of type
it.unimo.dbgroup.momis.communication.WrapperRS
that is a Wrapper Result Set and defines the methods:
void close() throws WrapperException;
long getColumnByName(String column) throws WrapperException;
long getColumnCount() throws WrapperException;
String getColumnName(int column) throws WrapperException;
char getChar(int column) throws WrapperException;
double getDouble(int column) throws WrapperException;
float getFloat(int column) throws WrapperException;
long getLong(int column) throws WrapperException;
String getString(int column) throws WrapperException;
String getRSAsString() throws WrapperException ;
boolean next() throws WrapperException;
Names are intuitive too.
Here is implemented the concept of "cursor", so there are
method to "close" the cursor, move to the "next" record
or get the current record information (getString, getFloat, etc.)
or access to the record metadata information (getColumnByName,
getColumnCount).
Wrapper generalization
-
the interfaces Wrapper and WrapperRS are all we need to access
a source INDEPENDENTLY from the type of source.
The only thing the client need to know is:
-
the interfaces Wrapper and WrapperRS
-
the class that implements the wrapper
-
the parameters to let the wrapper working
The idea is to make the Client as much INDEPENDENT
as possible from the used wrapper, so we tried to standardize
also the way to pass specific parameters.
This is through the interface
it.unimo.dbgroup.momis.communication.WrapperCore
that extends the interface Wrapper adding the methods
public void initialize(Map parameters) throws Exception;
public String getParamersAsPropertiesTemplate();
All wrappers implementing the WrapperCore interface have
the same initialization interface!
Parameters are passed through a java.util.Map object
that must contain a set of couple (key, value) where the
key is a String, the name of the parameter
and value is the value of the parameter specific for the
instance initialization.
Every Wrapper implementation must be initialized passing
a set of specific parameters.
String parameters in a Map can be represented in the
"Properties" form. java.util.Properties is a core java tool class
used to store/retrieve application configuration parameters.
A couple (key, value) can be represented in a plain text file
(or string) writing a couple per line
key=value
like the following example:
#
# Time out in seconds
timeOutGracePeriod=28800
timeOutCheckPeriod=3600
lines starting with # are ignored. Are simply comments.
See next section for more examples.
Source specific wrappers
-
These are few examples of wrapper the Momis Client (such as
SI-Designer) will instance to access data sources.
-
the Dummy wrapper:
This is not a real wrapper.
The only thing this wrapper can do is read a schema
description from a given xml file and pass it to the client
when the getDescriptionXml() is invoked.
The class to be instanced is
it.unimo.dbgroup.momis.communication.core.dummy.WrapperDummyFromFile
This wrapper requires the following parameter
WrapperDummyFromFile.sourceDescriptionFileName=samples/file.xml
-
the Jdbc wrapper:
This is the wrapper for accessing JDBC data source.
Opens a JDBC Connection using standard JDBC features.
The wrapper simply translates requests from the Wrapper interface
into JDBC throuth the open connection.
The class to be instanced is
it.unimo.dbgroup.momis.communication.core.jdbc.WrapperJdbcCore
This wrapper requires the following parameter
WrapperJdbcCore.DriverClassName=oracle.jdbc.driver.OracleDriver
WrapperJdbcCore.Url=jdbc:oracle:thin:user/pwd@artemi...
WrapperJdbcCore.User=user
WrapperJdbcCore.Password=pwd
WrapperJdbcCore.debug=true
-
the corba client wrapper
This is the wrapper for accessing standard CORBA data source
that implements the idl interface
conf/declarationsIDL/CorbaWrapper.idl
The CorbaWrapper.idl defines the same methods of the Java Wrapper
interface but is for the CORBA standard.
Opens a CORBA connection with a remote CORBA server.
The wrapper simply translates requests from the Wrapper interface
into CORBA requests sent to the given CORBA server.
The class to be instanced is
it.unimo.dbgroup.momis.communication.client.corba.CorbaWrapperClient
This wrapper requires the following parameter
# Where runs the "orb-naming server"
namingServerName=localhost
# At which port responds the "orb-naming server"
namingServerPort=1050
# Name to use to register "this" corba wrapper
wrapper_serverName=oracleSource
-
the Web Services client wrapper
This is the wrapper for accessing standard WebServices data source
that implements the wsdl interfaces:
conf/declarationsWSDL/WSDLWrapper.wsdl
conf/declarationsWSDL/WSDLWrapperRS.wsdl
The WSDLWrapper.wsdl defines the same methods of the Java Wrapper
interface while WSDLWrapperRS describes the
methods for the ResultSet object
compliant with the WebService standard.
Both such wsdl interfaces are "invisible" to the user.
The wrapper simply translates requests from the Wrapper interface
into WS requests sent to the given WS server.
The class to be instanced is
sam.wrapperClassName.5=it.unimo.dbgroup.momis.communication.client.wsdl.WSDLWrapperClient
This wrapper requires the following parameter
# endpoing of the wrapper web service to be connected
endpointURL=localhost
Communication wrappers
-
The idea is to implement servers that translates
source data requests from a standard comunication protocol
(such as CORBA, WebServices, or other)
implementing such servers that translates the
communication protocol requests into
the Wrapper interface requests.
Now we can publish in a standard communication protocol
any "Source specific wrappers" making any possible combination.
examples
-
the corba server/client communication wrapper
and the idl interface for external interfacement
(client for input, server for output).
The CORBA communications wrapper server
defines CORBA object server that implements the idl interface
declarationsIDL/CorbaWrapper.idl
The server accepts requests through the CORBA protocol
and translate them into Wrapper interface requests.
To be as fexible possible also this server uses
parameters,
one of required parameters is the name of the
Source specific wrappers to use.
Here are the required parameters
# Where runs the "orb-naming server"
namingServerName=localhost
# At which port responds the "orb-naming server"
namingServerPort=1050
# Name to use to register "this" corba wrapper
wrapper_serverName=oracleSource
# These parameters are for Query pre-emption
# a query object is killed after a time(out) of inactivity
timeOutGracePeriod=28800
timeOutCheckPeriod=3600
# the Source specific wrappers to use
wrapper_coreClass=it.unimo.dbgroup.momis.communication.core.jdbc.WrapperJdbcCore
Usually in the configuration file there are the parameter
for the "Source specific wrappers to use" initialization.
In this case
WrapperJdbcCore.DriverClassName=oracle.jdbc.driver.OracleDriver
WrapperJdbcCore.Url=jdbc:oracle:thin:user/pwd@artemi...
WrapperJdbcCore.User=user
WrapperJdbcCore.Password=pwd
WrapperJdbcCore.debug=true
-
the WebServices server/client communication wrapper
and the WSDL interface for external interfacement
(client for input, server for output)
This is not implemented yet..
NOTA
-
The communications wrapper server used with the
corresponding communications wrapper client
simply works as communication bridge between
any Source specific wrappers and a remote client
since "source" data are taken from the source specific
core wrapper through the interface Wrapper used by the
"communications wrapper server"
and are provided to the client again
through the interface Wrapper
by the communications wrapper client.
See the question "Wrapper: An introduction for developers"
for a few developer specific hints
Q.[44].Wrapper: An introduction for developers
Introduction
-
From the Java developement poin of view
we can see a Wrapper as an object that implements the
it.unimo.dbgroup.momis.communication.Wrapper
interface.
As first step You should read the well
commented source code of such interface.
Such interface is used by Client to access a data source.
Actually real Wrappers must be initialized specifing parameters for
accessing the data source (usually a username, password or host name).
For this reason it exists the interface
it.unimo.dbgroup.momis.communication.WrapperCore
that inherits from the Wrapper interface
and adds two method specific for wrapper initialization.
Note that a Wrapper is really composed by two parts:
the one supports the Wrapper interface and is the object
representing the source.
The second part implements the
it.unimo.dbgroup.momis.communication.WrapperRS
(that means Wrapper Result Set)
and is the code that manages the queries to the Source.
Capabilities
-
A wrapper is basically able to perform 2 tasks
-
1. the source introspection.
This describes the source "schema" in a MOMIS way, using
both ODLi3 or an XML description.
Nowaday (January 2003) the XML is better because is able
to carry more information like the schema annotation
or support attribute names with spaces or other strange
characters.
-
2. the source quering (WrapperRs).
The wrapper (by the interface WrapperRS)
enables a client to access data through a Result Set,
that data resulting from a query are accessible
as cursor on a table.
Operation allowed are to get the numeber of
selected columns, get value of a given column and move
the cursor on the next row of the table.
A few examples
The Annotation Ontology (SLIM)
Q.[45].the AnnotationOntology command line client interface
here
-
invocation example
var/runClientAnnotationOntology.bat conf/siDesigner.conf
var/runClientAnnotationOntology.bat conf/siDesigner.conf < in.txt
see the syntax examples in the directory
samples/clientAnnotationOntology
-
technical notes:
Since the Mapping Table task is next,
I had to test and get practice with
Java Parser Generators from grammar (such as yacc)
that are not byacc.
So I choose to make the ontology interface
a script interpreter with variables and
a few other concepts.
The grammar was written from scratch using
JavaCC https://javacc.dev.net/
- note on JavaCC.
This is now an official Sun project.
As of June 2003, JavaCC is open source.
The source code can be found at java.net.
- compilation with javaCC.
From emacs You can use
bash c:/bin/momis/bin/compileJavaCC.sh
-
Examples:
GlobalClasses
Q.[46].Classes from June 2003
The new "GlobalClsses" are now called "GlobalInterface"
and inherits from the class Interfaces.
In the same way, the GlobalAttributes inherits from the
Attribute and so for the GlobalSource and Source.
This allows to extends to the global schema the odli3 features
such as foreign keys, inheritance and types.
Q.[47].Mapping Table from June 2003
The new mapping table is defined in the package
it.unimo.dbgroup.momis.odli3.mappingTable
The MappingElement class is at the Top hierarchy class of the
MappingElements.
There are 5 types MappingElements:
-
MappingElementDefault:
there is a default mapping that is, the global attribute
has a constant value.
-
MappingElementComposedAnd extends MappingElementComposed:
implements the "and" mapping.
the attribute is mapped, on the same local interface,
in a set of local attributes.
In case of string the AND can have the mening of
"string concatenation".
-
MappingElementComposedUnion extends MappingElementComposed:
implements the "union" mapping.
the attribute is mapped, on the same local interface,
in a set of local attributes.
Old simple mapping was substituted by the
MappingElementComposedAnd element since the and can be for the
same attributes of the class but also between elements of
different classes in join.
Now, each MappingElementComposed links a collection (Vector)
of local Attributes objects.
The null mapping is given by the absence of mapping.
Q.[48].What is a SourceClass
I (Alberto) found a few problmes understanding what is a SourceClass
when I had to write the XML dump/parse routines for JoinMap.
This is a piece of code from
it.unimo.dbgroup.momis.SIDesigner.joinMap.JoinMapPanel
here:
private Vector makeJoinMap(java.lang.String gcName){
Vector rv = new Vector(0);
Vector locClasses=getLocCl(gcName);
int cont = 0;
LocalClass[] sc1=null;
sc1=new LocalClass[locClasses.size()];
LocalClass[] sc2=null;
sc2=new LocalClass[locClasses.size()];
String out="";
for( int i=0; i<locClasses.size(); i++){
sc1[i] = (LocalClass)locClasses.get(i);
for( int j=cont; j<locClasses.size(); j++){
sc2[j] = (LocalClass)locClasses.get(j);
if (sc1[i]==sc2[j]) continue;
SourceClass s1=new SourceClass(sc1[i].source,sc1[i].name);
SourceClass s2=new SourceClass(sc2[j].source,sc2[j].name);
JoinMap jm;
jm=new JoinMap(s1,s2);
System.out.println(jm.firstElement.name
+" "+jm.secondElement.name);
rv.add(jm);
}
cont++;
}
return rv;
}
It seems quite clean that Source classes represents LOCAL CCLASSES!!!!
The question is:
WHY, WHY USE at least TWO CLASSES FOR THE SAME INFORMATION?
Moreover, a localClass is represented by the odli3.Interface ojbect!
This is a really difficult problem.
.
.
It seems the SourceClass is a LocalClass specialization...
A SourceClass rappresenta una LocalClass all'interno di una
GlobalClass. Questo perche' la SourceClass contains information
specific and optimized for the given GlobalClass.
.
I think the right place where to put the method is
getSourceClass(fullName)
that can be invoked on every GlobalClass instances.
Fields of the SourceClass should be filled according to the
mapping tables.
Q.[49].New XML TYPE representation
Here are the supported types of MOMIS.
On the left column there is the odli3 Class name
representing the type,
on the right the name in the XML.
Type not represented in XML are not supported by
the MOMIS parser.
-- odli3 class ---+-- xml name-------------------
StructType
UnionType
EnumType
InterfaceType <TypeInterface name="Person" />
AnyType <TypeAny />
BooleanType <TypeBoolean />
CharType <TypeChar />
DateType <TypeDate />
TimestampType <TypeTimestamp />
FloatingType <TypeFloating />
DoubleType <TypeDouble />
IntegerType <TypeInteger />
OctetType <TypeOctet />
RangeType <TypeRange min="inf" max="333" />
StringType <TypeString length="20" />
- template types -
ArraySequence <TypeArraySequence>...</TypeArraySequence>
BagType <TypeBag><TypeInteger /></TypeBag>
ListType <TypeList><TypeInteger /></TypeList>
SetType <TypeSet><TypeInteger /><TypeSet>
Incontri
Q.[50].riunione del 21 Gennaio 2004
partecipanti
-
Domenico, Daniele Miselli, Alain, Roberta, Luca Ghetti,
Alberto Corni, Francesco Guerra
argomenti
-
documento di riferimento SEWASIE:
esiste un documento su sparc20 (elis2004)
-
le sole query che siamo tenuti ad implementare
sono QUERY CONGIUNTIVE.
-
ipotesi:
-
traduciamo UN UNICO PREDICATO ALLA VOLTA
anche se questa non e' la scelta ottima.
-
punto sul QM
-
interrogazioni:
-
e' una forma congiuntiva fatta su una
singola classe globale.
-
tutto il parsing e il trattamento delle query
viene fatta all'interno del QM di Luca Ghetti.
-
OdlI3 si prende carico di effettuare la riscrittura
degli atomic statements.
Il linguaggio usato e' OQLi3.
Non si prevede la riscrittura de statements specifici
per il tipo di sorgente. Questo e' demandato al Wrapper.
Esempio:
-
il Like.
Oql usa il "%" come wildchar, mentre alcuni
dbms usano l'"*".
La traduzione del "%" in "*" dev'essere fatto dal
wrapper e non dal QM.
-
interrogazioni di sorgenti XML.
Ora NON e' stato ancora affrontato,
ma occorrera' scrivere wrapper che trasformano
le query OQL in (per esempio) XML-Query.
-
discussione degli esempi dall'articolo di
Chen-Chuan K.Chang e Garcia Molina
- si usano regole di traduzione
si possono optare 2 strade
- traduzione per ogni tipo di "tipo di dato"
- traduzione ad hoc per ogni singolo attributo globali
-
passaggio delle informazioni da QueryManager (Luca)
alle classi che si preoccupano del GlobalToLocal mapping.
Un oggetto:
constructor:
Localizer(Statement globalAttributesStatement, Source sorgente)
methods:
getLocalizedTree()
boolean getFull()
Gli statements sono quelli del package
it.unimo.dbgroup.momis.odli3.functions.statements
Le variabili de AlberoConGlobalAttributes
devono essere scritte nel package
it.unimo.dbgroup.momis.odli3.functions.queryManagerInterface
devono usare la classe
StatementVariableGet_QMGlobal extends Statement
che contiene:
-
GlobalAttribute globalAttribute
-
Map locaAttributesNames
Uteriori informazioni saranno sul verbale redatto da Luca Ghetti
Q.[51].Riunione Momis, 19/1/04 10.16
Partecipanti:
-
Sonia, Maurizio, Francesco, Alain, Alberto
Problemi evidenziati da Sonia
-
momis non funzionava alla demo a Karls Suhe
-
Anna Tavernari ha avuto problemi a importare sorgenti Excel
-
il "main", alla fine degli attributeName non e' chiaro.
La prima istanza NON deve avere come estensione il nome dell'intBody.
-
il sw NON e' stabile.
-
Sandro Bernardino, si dovrebbe verificare che OdbTool
funziona sotto Win2000.
-
Il gruppo di sviluppo dovrebbe preparare un test script e
procedure sull'interfaccia grafica.
-
Maurizio dovrebbe preparare titoli di tesi Nod e Vod.
Q.[52].29 Dic 2003 Riunione via Internet
Attivitą svolte ieri:
-
Analisi della struttura esistente tra XML, immagine UML,
codice
-
Analisi della nuova struttura delle MappingTable
-
Spiegazione detagliata delle IntBody
-
Assunzione nel caso relazionare una Interface contiene solo
una IntBody. Questo e' garantito dal SiDesigner e garantisce
il vincolo di avere un nome unico di un campo in una
tabella.
-
Analisi del MappingElement e analisi delle funzioni da
applicare agli attributi locali e globali (da concludere)
-
Analisi della JoinMap valutazione delle funzioni (da fare)
-
Analisi della struttura di rappresentazione delle funzioni
(da estesa per passare le funzioni a wrapper)
-
Analisi sulla scelta di implementazione funzionale,
con la versione attualmente proposta si eliminerebbero le
ottimizzazioni semantiche attualmente in funzione sul QM per
cui si e' pensata una strada per risolvere il problema e
continuare ad implementare questo modello funzionale.
-
Def: funzioni interpretabili da altri sorgenti:
data una funzione
f : A --> B questa e' eseguibile su di un sorgente remoto se
e solo se nel sorgente remoto vi e' definita la stessa
funzione f : A1 --> B1 e se A1 contiene oppure e' uguale
Nota: la funzione identita' e' sempre un sottoinsieme di
questa.
-
Da sviluppare tecnicamente per implementare questo tipo di
funzioni occorre definire un meccanismo di mappatura delle
funzioni per poterle passare ai wrapper. Nota: e' importante
che il QM sappia quali condizioni della clausola where
vengono eseguite sui wrapper. Da fare un meccanismo di
generazione della sintassi della funzione.
Alberto ha espresso la volontą di riscrivere la struttura dati
OQL, fatta da precedenti tesisti, in ODLi3,
-
ritengo
l'esercizio attualmente inutile, penso che chi ha definito la
struttura OQL abbia fatto un buon lavoro ed attualmente quella
parte di codice e' stato utilizzato, stabilizzato, esteso,
inoltre ritengo importante procedere il pił rapidamente
possibile con l'implementazione delle "funzioni" secondo
l'analisi di cui sopra, questo permetterebbe di ottenere un QM
con le stesse funzioni di ottimizzazioni attualmente
presenti. Riscrivere OQL comporterebbe una frattura del
progetto nel momento in cui si sta cercando di allineare i
vari componenti, inoltre questo sposterebbe i tempi di
realizzazione del progetto, penso che in questa fase sia
importante concentrarsi sull'aspetto funzionale delle
MappingTable.
Come da accordi ci sentiamo la prossima settimana per
analizzare i progressi sulle funzioni.
Q.[53].29 Dic 2003 note a Luca Ghetti, documento integrazione
here
Q.[54].Riunione 8 Nov 2003
punti
-
Partecipanti
Bergamaschi, Beneventano, Vincini, Guerra, Corni,
Fergnani, Miselli, Gelati,
Luca Ghetti
-
Sewasie o Momis?
Sewasie richiede l'interazione con Roma per cui
occorre usare il motore di Lenzerini per riscrivere
le query da Global a Local.
Momis invece NON dispone del motore di Roma quindi
dovrebbe essere sviluppato in Modena.
Scelta:
MOMIS, roma/sewasie e' meno importante
-
Gestione delle IsA e ForeignKeys per le classi Globali.
-
La decisione e' Svincolarsi da SQLServer.
Serve uno strumento che permetta di implementare
il FullOuterJoin e in futuro gli algoritmi
relativi alle JoinTable (in via di studio).
Opzioni:
-
Liberia dei Tedeschi (??)
-
(solo Alberto sostiene) Hypersonic
-
Funzioni associative...
Se ne e' parlato ma
non saprei dov'e' che le funzioni devono essere
associative.
-
IMPORTANTE: occorre fare chiarezza nelle teoria sulle
JoinMap.
Q.[55].Incontro del 19 Sept 2002
cose da fare
-
schema x roma
-
descritto in xml l'esempio di Kostantin
-
occorre fare la versione x roma
-
Come fare il Join in mancanza di JoinMap:
si usa comunque il natural outer join
e quindi si ottiene il prodotto cartesiano di tutte le tuple.
Q.[56].the meeting of October 15 2003 (Mapping Tables):
We stated:
We need to face with two problems:
-
1 the mapping from local attributes to the global attribute
-
2 the "reverse mapping" from the global attribute to
the local attributes
Here are discussed:
-
The mapping is natural to be expressed with a function
that returns a single value for the global attribute and
and has as parameteres alla local attributes the
global attributes maps on.
-
The reverse mapping is not trivial.
The problem is to map the where clause of a global query
into the more restrictive possible query on the local sources.
The "reverse mapping" or "query rewriting"
depends at least by the localInterface and the kind of operator the
statement is based on (equals statemente: nome = "corni",
gt statement: eta > 21, like statement, nome likes "Co%Al%").
The identity
-
In case of identity
(one global attributes maps on only one local
attribute per local interface) is quite simple. It is enough to
sobstitute the name of the "global attribute" with the name
of the local one. It is not necessary modify anything else.
-
In case of not identity we must define a mapping template
that states how produce the local where clause
for each local interface and operator.
Example:
Here is a mapping for a local attribute
.
source | university | department | | GLOBAL |
----------+-------------------+---------------+ +----------+
interface | person | student | | person |
----------+--------+----------+---------------+ +----------+
attribute | name |lastName | studentName | | name |
----------+--------+----------+---------------+ +----------+
| | | | | |
| | | | | |
|Alberto |Corni | Corni Alberto | | ----- |
| | | | | |
.
An example of "direct" mapping can be:
GLOBAL.person.name =
f(university.person.name
, university.person.lastName
, department.student.studentName
) {
name = department.student.studentName;
if (name == null) {
if (university.person.lastName != null) {
name = university.person.lastName;
if (university.person.name != null) {
name = name + " " + university.person.name;
}
} else {
name = university.person.name;
}
}
return(name);
}
this gives the precence to the
department.student.studentName
if this is not deifined (is null) tries to compone the name
concatenating the university.person attributes.
The "reverse" mapping:
that is how to rewrite the global query:
select * from person where name = "Alberto Corni"
We must provide 2 templates, one for university.person and
one for department.student for rewriting the stement
name = "Alberto Corni"
Let us examine the department.student mapping that is simpler.
In this case there is identity so the rewriting is
[select ... where ... ] student.studentName = "Alberto Corni"
The university.person is not so trivial.
In this case whe should implement an alogoritm that tryes to
split the name in first and second and then builds templates.
{
s = 'person.name + " " + person.lastName = "$GLOBAL.person.name'
return s;
}
or:
{
# perl like regular expression statement
(name,separator,lastName) =
split($GLOBAL.person.name, "(.*[ \t\n]*.*)");
s = 'person.name = "$name" and person.lastName = "$lastName"
or person.name = "$lastName" and person.lastName = "$name"';
return s;
}
or: we could define even more complex functions to handle the
cases
"Francesco De Gregori"
"Carlo Alberto Conti"
that, for example produces a different list of possibilities
# Francesco De Gregori
person.name = "Francesco" and person.lastName = "De Gregori"
or person.name = "Francesco De" and person.lastName = "Gregori"
# De Francesco Gregori
or person.name = "De" and person.lastName = "Francesco Gregori"
or person.name = "De Francesco" and person.lastName = "Gregori"
# De Gregori Francesco
...
# Francesco Gregori De
...
done:
Q.[57].version 0.1
here:
sistemare la compilazione sulla sun
[Dic 2002]
- relazioni di thesaurus:
- non importa correttamente il validated
- wrappers
- remove the method
WrapperRS.getColumnType(int columnNumber)
we assume that who performs a query
can get all information through the getDescription (schema)
method.
- use the DatabaseMetaData object to get column description.
Was created the object
it.unimo.dbgroup.momis.communication.core.jdbc.WrapperJdbcCore_metaData
- dalle librerie, togliere
oracle_classes12.jar
per 2 motivi:
- 1 non e' freeware, i diritti sono della Oracle
- 2 occupa tanto spazio sul repository.
- bug corbaChannel: non supporta i null!
[Oct 2002 Veronica Guidetti]
-
WordNet Editor
-
aggiungere i commenti agli oggetti
nei packages
om, wnEditor
-
mWNbase:
Spostare il main in una classe di wnEditor.
Main parametrico per il caricamento del database
e la creazione del reverse index.
-
Editor
-
panel Lemma (lemmi relativi ad un synset).
Insert a new synonym:
mettere il campo di testo a destra del bottone
-
add/view relations ad un synset:
aggiungere un bottone che porta
-
Search gloss:
-
i lemmi devono essere caricati dal renderer.
Ogni riga deve essere associato ad un oggetto synset
(la classe GlossEntry deve essere abbandonata)
- sostiuire il ";" con lo spazio e
per ora non usare il "\" come escape char
-
sort di un Vector:
Comparator c = WnRelationshipPeer.getComparatorOn_type();
Object a[] = wnRelationships.toArray();
Arrays.sort(a, c);
rv = a;
-
query
select s.gloss, s1.gloss, r.wn_relationship_type_id
from wn_relationship r, wn_synset s, wn_synset s1
where s.gloss like '%2-wheeled motor vehicle%'
and s.wn_synset_id = r.wn_source_synset_id
and s1.wn_synset_id = r.wn_target_synset_id
-
gestione del "WnSynset selectedWnSynset":
il pannello "lemma" e la parte sx delle relazioni
dovranno "pescare" i dati da tale oggetto.
-
porting de
-
wrappers
-
modulo slim (Interfaccia a Wordnet)
- gestione:
- intoduzione della "provenienza" del dato.
un tipo definitio by typedef sa dove e' stato definito
(interface o module).
- primo passo
le strutture vengono caricate in memoria
senza controlli (e senza assegnare il campo provenienza).
secondo passo
sistemare i campi "provenienza" e
-
[] other
-
Note sul parser odli3.
[Maggio 2000] Revisione del parser e strutture ODL_i3
by Alberto Corni.
- ATTUALE gestione dei tipi
- tipi condivisi da tutte le sorgenti di uno schema
- IDEALE gestione dei tipi.
Vorrei che i tipi fossero gestiti "ricosivamente" tenendo
conto dei moduli, in questo modo:
- una sorgente e' un modulo
- per ogni modulo mantenere:
-- informazioni:
- la lista dei moduli
- lista delle interface
- lista dei tipi definiti
-- metodi:
- getType(String name) trova un tipo dato un identificatore
- Per ogni INTERFACE
-- informazioni:
- modulo in cui e' contenuta
- lista degli attributi
- lista delle relazioni
- lista dei tipi definiti nell'interface
- MODIFICHE:
- Gestione dei tipi tramite "TypeContainer"
- Trascurata la gestione dei "templateTypes"
in quanto si tratta di tipi come gli altri.
- Introdotta una fase di post-processing per la risoluzione
de:
- DefinedType
- StructType
- EnumType
- UnionType
Questi tipi sono referenziati in ODL-i3 da identificatori.
Per fare cio' ho introdotto una serie di nuovi tipi:
- DefinedTypeToSolve
- StructTypeToSolve
- EnumTypeToSolve
- UnionTypeToSolve
che ereditano da SimpleType. Di fatto sono dei tipi
temporaneamante non risolti che prevedono tutte le funzioni dei
tipi risolti contengono anche un puntatore al tipo "risolto" e
tutte i metodi invocati su questi oggetti vengono ridiretti al
tipo "risolto". Per risolvere i nomi in ogni TypeContainer tengo
la lista dei tipi da risolvere che risolvero' solo alla fine del
parsing.
-
type (odli3.Type) handling and wrapper:
-
types exported by wrappers must map on the odli3 types
this already works
Ha senso esportare solo questi tipi?
/*
* ResutSet TYPE.
*/
/* Unsupported Type */
const long TYPE_Unsupported = -1;
/* Long Type */
const long TYPE_Long = 1;
/* Char Type */
const long TYPE_Char = 2;
/* Double Type */
const long TYPE_Double = 3;
/* Float Type */
const long TYPE_Float = 4;
/* String Type */
const long TYPE_String = 5;
-
implementazione funzioni toOlcd
-
traduzione degli attributes filtrando i nomi lunghi
(utilizzare la classe TranslationMap)
-
traduzione delle rules
Q.[58].version 0.3
here
-
[dec 2002] new jdbc wrapper support
-
razionalizzare gli script sotto $dmt/var
-
(Alberto) - wrappers
-
(Alberto) write the documentation
-
write: "Running a wrapper"
-
write the "How to write a wrapper"
-
compilazione
-
verificare la nuova versione compila sotto linux.
It Works (2003 Jan 14 15:11)!
Test on linux.democenter.it
Linux RedHat 8.0
Mem: 261795840
model name : Intel(R) Pentium(R) 4 CPU 1.60GHz
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
It is a bit tricky the for the compilation of
Jikes an byacc, and for the files in var/*.sh
that are not marked executable by default.
-
Daniele Miselli, slim
-
cosa e' CVS
-
torque (ant, etc.)
-
ant project:
creazione di nuove classi/tabelle a partire da un file
xml che descrive le tabelle
-
object/relational mapping
-
interfaccia alla parte back-end di slim
-
Allow to export a global schema as a source.
-
big bug!:
change the MOMIS XML definition!
The XML was not supporting the concept of IntBody
it.unimo.dbgroup.momis.odli3.IntBody
All the attributes where wrongly
flattened in a single interface body.
Now we introduced the InterfaceBody tag.
-
order the xml output:
Creating two xml dump of the same source file ever
are created in a different way
because of the internal data allocation structure are
hash table and the order is based on the hashcode of the
java object.
In output it is good to sort
sources
interfaces
intbodies
attributes
by name before output them introducing the methods
getSourcesOrderByName
getInterfacesOrderByName
getIntbodiesOrderByName
getAttributesOrderByName
-
web services:
creare il file
http://dbgroup.unimo.it/Momis/webservices/WSDLWrapper.wsdl
con targetNamespace
http://dbgroup.unimo.it/Momis/webservices/WSDLWrapper
- creates the java stub from wsdl:
var/wsdl2java.bat -Do tmp declarationsWSDL/WSDLWrapper.wsdl
server side
var/wsdl2java.bat -so tmp declarationsWSDL/WSDLWrapper.wsdl
whith package
var/wsdl2java.bat -sDv -o tmp \
-p it.unimo.dbgroup.momis.communication.wsdl \
declarationsWSDL/WSDLWrapper.wsdl
where var/wsdl2java.bat is something like this:
set CLASSPATH=...aLotOfJarsFiles...
java org.apache.axis.wsdl.WSDL2Java %1 %2 %3 %4 %5 %6 %7
-
new package for exchanging Wrapper query result sets (Alberto & Jonathan):
the package is
it.unimo.dbgroup.momis.communication.tools.dataSet
these are the data structures used by a set of tools such ash
var/runParserDataSetXml.bat
to manage resultset in xml format.
The main dataStructure is tht class
DataSet
it exists the parser that fills a DataSet from an XML file
DataSet dataSet = DataSetParserXml.(InputStream inputStream)
and that returns the xml representation from the data structure
dataSet.toXmlString()
-
Ridurre il numero di costruttori di si-designer.
Ora sono solo 2.
-
[12 Jul 2003] MySql server on Sparc20
has been enabled to serve connection from any host
on the database momiswn
-
[Done by Daniele Miselli]
WordNet porting toward the momiswn database
Resource:
-
Really important task.
It ideal for a thesis.
-
We need a full time programmer for a 20-30 days (thesis).
-
Alberto for guidelines (3-4 days)
We want the SiDesigner works using both the
RDB "momiswn" and the files from the WN distribution.
Nowaday SiDesigner, and in particular, the SLIM module
and related packages, works accessing WordNet distribution files.
The works to do is to restructure the Slim and related package
maintaining the existing features.
List of current features:
-
features
-
Creating relationships
-
looking for ....
-
here...
DoneThings
-
annotation with respect of the extended wordnet.
-
make SLIM working using the JDBC wordnet connection
instead of the files
-
Optionally integrate the SLIM interface with
the wordnet editor ingterface to allow the designer
to quickly extend wordnet
-
Script to create the Wordnet MySQL indexes
ALTER TABLE WN_SYNSET
ADD INDEX synset_id_index (WN_SYNSET_ID);
ALTER TABLE WN_LEMMA
ADD INDEX lemma_id_index (WN_LEMMA_ID);
ALTER TABLE WN_LEMMA
ADD INDEX lemma_lemma_index (LEMMA);
ALTER TABLE WN_LEMMA_SYNSET
add INDEX lemma_synset_synsetId_index (WN_SYNSET_ID);
ALTER TABLE WN_RELATIONSHIP
add INDEX relationship_sourceSynset_index (WN_SOURCE_SYNSET_ID);
Q.[59].The SLIM REPORT (Daniele Miselli) - italian
A few note on Slim
-
Creazione dell'oggetto SLIM:
Quando SLIM viene istanziato
viene chiamata la funzione
initComponenets()
All'interno di questa funzione vengono creati gli oggetti
SlimTree e ThesaurusTable.
-
Creazione dell'oggetto SlimTree:
(Qui iniziano i primi problemini...)
Le funzioni che vengono chiamate all'interno del costruttore
di SlimTree sono (in ordine):
-
loadCacheAndProxy():
carica i file di cache pensati da Malvezzi (che quindi
funzionano solamente con la versione vecchia e non
estensibile di SLIM)
-
creaAlbero():
crea l'oggetto JTree che visualizza l'albero, ma non ne
istanzia il modello (solamente il renderer)
-
setDataFromSchema():
(funzione da rivedere) Questa funzione legge l'oggetto
Schema e crea il modello dell'albero JTree. Per ogni
interfaccia ed attributo viene creato un oggetto SlimNode
e passato al costruttore di un oggetto
DefaultMutableTreeNode ed aggiunto all'albero (tramite
SlimNode.getAdditionalInfo() vengono recuperati i sensi
dell'annotazione salvati sull'XML).
Dopo aver fatto cio',
come ultima cosa, viene chiamata la funzione di SlimTree
preLoadSignificati()
Tale funzione chiama, per ogni
SlimNode creato nell'albero, la funzione di SlimNode
setMeanings(). Quindi vengono subito caricati in memoria
tutti i significati di tutti i nodi.
-
L'Oggetto SlimNode
-
Crezione (Constructors):
la creazione di un nuovo oggetto SlimNode e' possibile in
due modi differenti:
-
partendo da un nuovo nodo vuoto (caso
in cui una sorgente viene importata in MOMIS per la
primav olta)
-
oppure copiando i settagli (namePath, formaBase ed
il vettore Sensi) da uno SlimNode creato a partire dal
parser XML (se si carica uno stato
salvato)
ATTENZIONE!!!: Se il nuovo nodo SlimNode viene
creato a partire dalle informazioni salvate in uno stato
XML le operazioni che vengono fatte sono le seguenti
(chiamo SN1 il nodo da creare e SN2 il nodo creato dal
parser a partire dall'XML):
-
SN1.namePath = SN2.namePath
-
SN1.formaBase = SN2.formaBase
-
Se il vettore dei sensi annotati
(un vettore di int) non e' vuoto viene chiamata la
funzione di SlimNode setMeanings().
Per gli SlimNode la cui annotazione e' stata quindi
salvata sull'XML i significati vengono caricati 2 volte
tramite la funzione setMeanings() chiamata nel costruttore
di SlimNode e da SlimTree nella funzione
preLoadSignificati().
-
Funzione addSenso():
(comportamento discutibile) la funzione addSenso di
SlimNode viene chiamata ogni volta che si aggiunge un
senso (tramite l'annotazione o quando lo SlimNode viene
creato a partire dal parser XML).
Tale funzione non si limita a controllare se il senso e'
gia contenuto nei vettori di SlimNode ed ad aggiungerlo,
ma chiama la funzione
trovaParenti()
(ebbene si'...) di SlimTree.
La funzione trovaParenti() cerca i 'fratelli' e le
'sorelle' del synset selezionato (Malvezzi li ha chiamati
cosi', io non ho colpe...).
I fratelli di un synset sono quelli che hanno almeno tre
lemmi collegati uguali (di cui uno e' quello della
formaBase dello SlimNode di partenza).
Le sorelle di un synset sono quelle che hanno almeno un
lemma in comune (la forma base dello SlimNode di partenza)
e lo stesso ipernimo.
Al fine della annotazione i significati parenti vengono
considerati uguali. Infatti se si aggiunge un senso ad un
SlimNode si cercano anche i suoi parenti e vengono
aggiunti al vettore dei significati selezionati
anch'essi. (Non so se questa sia una funzione utile o
meno, ma sicuramente rallenta un bel po' il caricamento
dei significati di SLIM).
-
CONSIDERAZIONI
-
E' effettivamente necessario cercare i parenti di un
senso selezionato e considerarli equivalenti??
-
La struttura di SlimNode potrebbe essere semplificata
(una grossa semplificazione potrebbe essere permettere
solamente la selezione di un senso per volta durante
l'annotazione). Una semplificazione enorme sarebbe portare
il significato dell'annotazione sulle interfacce ed
attributi ODLi3.
-
SlimNode andrebbe per lo meno commentato,
ci sono diverse funzioni e variabili che, nonostante io ci
abbia lavorato diverse volte, fatico tuttora a comprendere.
-
Mi sto convincendo sempre di piu' che sarebbe meglio
(direi piu' performante) non caricare tutti i significati
all'inizio e tutte le volte che si accede al pannello di
SLIM (poiche' ricordiamo che anche l'update() di SLIM
implica la ricarica dei significati...). Inoltre per
creare il thesaurus, fine ultimo di slim, importano
solamente i significati selezionati, non tutti quelli
possibili (la performance della creazione del thesaurus
dovrebbe rimanere praticamente invariata).
-
Controllando mi sono accorto che,
in caso siano stati selezionati piu' sensi per uno stesso
slimNode, l'algoritmo di creazione del thesaurus dovrebbe
utilizzarli tutti, almeno cosi' mi pare.
Il come, non si sa.
Q.[60].version momis-0-4-0
here
-
New GlobalClasses.
These extends the "local classes"
In such a way whe inherits the concepts of
-
inheritance among classes
-
foreign keys
To convert old schema.xml files for the new
format, use the following converter:
-
how to convert a old xml momis file
into the new xml format. Use the command:
var/runParser.bat -inXmlOld -outXml oldFileName.xml
The "new" file is on the standard Output, so do this:
var/runParser.bat -inXmlOld -outXml oldFileName.xml > newFileName.xml
If you are in trouble try this:
var/runParser.bat -debug -inXmlOld -outXml oldFileName.xml
-
note on the xml schema
-
bugFix: <Jonathan Gelati MSN> Ciao.
Ho riscontato il seguente problema: quando
tiro su un result set di una query e lo trasformo in xml, ne caso di
valore null di un attributo, viene riportato nel xml il valore
dell'attriubto precedente. Potresti verificare se e' cosi' anche da te?
-
The DataSet tool package now supports the Null value!
-
in SimpleAttribute.
Verify if are useful the fields
_fixArraySize - yes. It is managed also in the xml representation
unknownType
-
il metodo "control" nella classe odli3.TemplateType
non recupera il tipo del tipo della "collection"
partendo dal nome.
questo implica che:
I tipi set, list, bag sono tipi di dati
riconosiuti da MOMIS ma trattati in maniera non soddisfacente
This "control" problem should not apply to the
xml parser from version 0.4.
Q.[61].version momis-0-4-1
here
-
Ontology abstraction.
-
new XML format:
Con Daniele stiamo cambiando il modo di descrivere
le annotazioni.
Il nouvo formalismo e' il seguente:
<Interface
name="CS_Person"
persistent="false"
>
<Extent name="CS_Persons" />
<Key name="PrimaryKey" >
<KeyAttribute name="first_name" />
<KeyAttribute name="last_name" />
</Key>
<Annotation>
<AnnotationValue
lemmaValue="person"
lemmaSyntacticCategory="1"
lemmaSenseNumber="1"
/>
</Annotation>
....
purtroppo NON e' compatibile con il passato
<InterfaceAdditionalInfo>
<SlimNode formaBase="location" >
<SlimNodeSense number="-2" />
<SlimNodeSense number="1" />
</SlimNode>
Sto per fare il commit su cvs della nuova versione che usa il nuovo
formalismo.
Per poter usare i vecchi esempi esiste lo strumento di conversione
esempio:
var/runParser.bat -inXmlV0.4.0 -outXml samples/stato.xml
genera su stdout il nuovo formalismo per il file
samples/stato.xml
The annotationOntology Package:
-
design a modular, extensible sw package
for managing annotation with respect of
wordnet.
features:
-
will replace the
-
wordNetManager package
-
and MWordNetManager class
-
allows to access WordNet (by now Read-Only)
-
allows several way to access wordnet.
At present
-
using the wn file distribution
-
using the Momis jdbc/Torque relational version of Wn
-
manage cache of data for performance improvement
Organization
-
the package is
annotationOntology
contains
-
all code that implements the Momis interface
to the ontology.
The internal Momis code will use such objects
to access to WordNet.
-
contains the superclass that gives the basic methods
to access to the Ontology data.
Moreover contains sub-packages that override such class
implementing the real code for accessing to the
ontology (eg. through files or database).
Q.[62].version momis-0-4-2
here
-
Mapping tables.
-
Use of the Si-designer through the JavaWebStart (Sandro Bernardini)
Wordnet and related
-
new SLIM (Daniele)
-
rewrite SlimNode
-
modify few part of the slimTree
-
add the needed methods to the OntologyManager
-
OntologyManager
-
corresponding OntologyManagerCache
-
the Inteface OntologyManagerImplementation
-
all corresponding OntologyManagerImplementation
-
odli3 (Alberto)
-
altro
Q.[63].version momis-0-4-3
here
-
Mapping tables.
-
classes have been re-designed, so the XML
is no more compliant (so we changed the version)
-
the parser for the functions of localToGlobal mapping
and globalToLocal rewriting templates
-
vedere "IBM Enterprise Information Integration Software":
see the document
200311_ibmIntegration.txt
-
odli3 classes, changes in dottedName dump and
interpretation:
Since the Attributes can be part of semistrucurated
interfaces/sources we need a way to distinguish the IntBody
the Attribute belongs to.
We choosed this way,
an attribute's dotted notation will be represented as:
sourceName.interfaceName.attributeName.interfaceBodyName
By default, the name of the main interfaceBodyName should be
main
Interested method will be
Attribute.getDottedName()
Schema.getObject()
-
implement the Join Map
-
Various
-
QM implementation
todo:
Q.[64].todo: Short term scheduled todo and required resources
here
-
Wordnet
-
clean the code from the old SLIM implementation
-
make it multilingual
-
import the Wordnet2.0 into the TorqueDB
-
Wrappers:
-
implements attribute name identified by the IntBody name
-
The annotationOntology Package Guide
-
Design and implement the new "Tunim" module.
-
Schema Viewer (Daniele Miselli) (see details below)
-
Develop the theory on the Join Maps
and Write the join map editor module JOMA.
-
Discuss the OLDi3 objects handling.
Q.[65].momis types
here is the hierarchy of types defined in the Odli3:
Type
TypeToSolve
ValueType
ConstrType (structured types)
EnumType
StructType
UnionType
SimpleType
BaseType
AnyType
BooleanType
CharType
DateType
FloatingType
IntegerType
OctetType
RangeType
StringType
DefinedType (new type defined by the odli3 "type" operator NOT SUPP.)
TemplateType (collection types)
ArraySequence
BagType
ListType
SetType
Q.[66].todo: Long term scheduled/important todo
here
-
New Join table
-
Query manager (see details below)
-
Source handling (odli3.Source):
resolve these flexibility problems
-
Allow a user to completely remove a source!
-
Allow a user to reload a source schema.
Changes on the new schema must be handled!
Q.[67].Low priority tasks
here:
-
interfaccia SI-Designer:
-
sistemare la GUI Source Acquisition Module in modo
che la combo box sia ridimensionabile.
.
Resource:
-
Lo priority task. Alberto 1 day or someone that
knows Java graphical interfaces.
Q.[68].todo other (da verificare se farlo)
here
Detailed todos
Q.[69].The OLDi3 objects handling.
the problem:
-
if in a LOCAL SOURCE we have a source declaration like this:
<Interface name="Professor" > ... </interface>
<Interface name="Test" >
...
<Attribute name="prof" >
<AttributeType> <TypeInterface name="Professor" /></AttributeType>
</Attribute>
...
</interface>
How can we access the fields of the professor referenced
by the "Test" field?
The problem is that nowadays the wrappers does not supports
the object reference (supports only simple plain ANSI-sql queries)!
That is that such OO construct is not supported at all.
-
if in a GLOBAL VIRTUAL VIEW we have a source declaration like this:
<GlobalInterface name="Professor" > ... </interface>
<GlobalInterface name="Test" >
...
<GlobalAttribute name="prof" >
<AttributeType> <TypeInterface name="Professor" /></AttributeType>
</Attribute>
...
</interface>
How can we access the fields of the professor referenced
by the "Test" field?
At run time we could design our QueryManger to link to the
Professor view. We sould only define the behavior of the link!
I expect that the field
test.prof
really carries the object identifier of the related Professor row
or at least, carries the value of the key that identifies
such a row.
Q.[70].todo: Schema Viewer (Daniele Miselli)
here
-
Interfaccia Grafica (SourceVisualizationTool)
-
Where to put the Visualization information
<InterfaceAdditionalInfo>
<SlimNode formaBase="research_staff" >
<SlimNodeSenso numero="1" />
</SlimNode>
<SourceVisualizationTool posx="133" posy="144" widht="" height=""/>
</InterfaceAdditionalInfo>
-
Momis additional Info
_momisObjectAdditionalInfo
.putAdditionalInfo(SlimTree.SLIMKEY_NodeTag, _slimNode);
-
Per fare testing:
- Il tool esistente si trova in
/export/home/progetti.comuni/prototipo/java
per provarlo:
appletviewer tmp_vf_file.html
mi raccomando NON usarlo!
Q.[71].todo: Wordnet and related
here
-
Study and implement techniques for lemma disambinguation
from the context.
-
Extension reconciliation
-
portabilita' dell'annotazione, lo stesso nuovo significato
annotato su due client diversi dovra', per quanto possibile,
essere riconosciuto come "lo stesso significato"
dal server che confronta le annotazioni
(gestione con indici di similarita' e soglia delle annotazioni).
We need:
-
define (in the previous points) an xml data
format to carry the extension knowledge
-
Export of the new (extended) synset and relation used
in the schema annotation in the XML describing the
source.
-
study algorithms and techniques to map meanings
from at least two different extensions.
-
Wordnet:
-
Support for multi wordnet instance (one for language)
and (like in euroWordnet) relation among
Synsets and Lemmas in the various languages
-
Multi Wordnet
-
Study
-
Try to load a database with only the italian terms
-
in the future, extend the db to support multiple languages
at the same time
Q.[72].todo: Query manager
Resources
-
I do not want to estimate it
Credo dovremmo finalmente allinearci anche su:
-
uso del naming dei packages (it.unimo....)
-
uso di CVS
-
(technical) come fare il parser OQL.
Il parser deve porer eseguire sia l'analisi sintattica che semantica
della query.
-
(technical/teory)
discutere come scrivre interfaccie sw e data structure da
adottare per la fase di ottimizzazione.
Sono d'accordo, una cosa che volevo proporti e' di considerare
separate le esigenze tra SiDesiner e QM, dato il GS il QM puo'
trasformare la struttura del GS per generarsene uno ottimizzato per
le sue esigenze; questa operazione verrebbe eseguita allo startup
del QM in modo che a runtime l'operazione sia attiva.
-
Altra cosa su cui mi piacerebbe omogeneizzare le cose e' sulla
gestione dei Logs.
-
sostituire il DBMS con un motore di Join (XLL) proprietario.
Per ora, valutare Hypersonic.
-
(technical) documentazione
-
occorre fare l'integrazione con i sorgenti
di MOMIS.
E' l'occasione per
-
verificare cosa e' stato fatto e come e' stato fatto
-
pianificare il da farsi
-
come procedere:
-
secondo me (Alberto) occorre spendere (credo, circa) 5gg uomo
per spulciare il codice di Luca Ghetti e integrarlo nel
codice "ufficiale" di Momis.
-
Potrebbe essere l'occasione per coinvolgere altre persone
nello sviluppo del prototipo con l'obbiettivo principale
di un trasferimento (sharing) di Know How.
I candidati sono (oltre ad Alberto):
-
Miselli:
e' da valutare il modo in cui programma.
Di fatto gia' conosce e ha modificato i sorgenti di Momis
relativi al modulo Slim. Significa che gia' conosce
il 60% delle cose da sapere sul prototipo.
-
Francesco, se lo ritiene opportuno:
conosce gia' l'architettura e le problematiche del prototipo
oltre al fatto che ne e' il responsabile per la parte
di "intgrazione".
-
Sandro:
-
Il ruolo di Luca Ghetti.
Nel periodo di integrazione Luca Ghetti NON dovra' fare modifiche
al codice.
Dovra' invece essere a disposizione per eventuali chiarimenti
(ce ne sara' da parlare).
Alla fine dell'integrazione/analisi potremo assegnare i
"task" in modo piu' chiaro e definito.
-
Sviluppo futuri.
Durante l'analisi/integrazione si verifichera' come implementare
(modalita' e tempi) le seguenti funzionalita'.
-
realizzazione del parser oql
-
toria: individuare la sintassi da usare per le query oql
-
pratica: implementazione
-
realizzazione del nuovo algoritmo di full disjunction
(kostantin).
-
uso delle librerie di indicizzazione (chiedere a Federica)
in modo da sganciarsi dal database.
-
propongo (Alberto) di realizzare un'architettura "open"
in modo che si possano usare piu' "moduli alternativi"
per fare la "fusione" delle query.
Tra questi
-
l'attuale, fatto da Luca Ghetti basato su Ms SqlServer
-
quello basato sulle librerie "Federica"
-
eventualmente un modulo basato su HyppersonicSQL (Alberto)
Q.[73].todo: New mapping/Join table
Resources
-
I do not want estimate it
Quello che si vuole:
una struttura dati per la rappresentazione delle joinmap piu'
espressiva ed estensibile.
Questa si puo ottenere lavorando con gli alberi (come la clausola
where delle query... questa e' effettivamente una clausola where!!!).
Se aggiungiamo i giusti metodi (interfaccie) agli oggetti,
la complessita' di questa struttura dati diminuisce grandemente.
Ecco come si potrebbe fare:
-
una JoinTable con i metodi
public void setMapping(Interface interfaceLeft
, Interface interfaceRight
, JoinMap joinMap
)
public JoinMap getMapping(Interface interfaceLeft
, Interface interfaceRight
) {
-
una JoinMap con i metodi
(costruttore)
public JoinMap(Attribute attributeLeft, Attribute attributeRight) {
public void addMappingAttributeEqual(Attribute attributeLeft
, Attribute attributeRight){
public void getStringRepresentation(Attribute attributeLeft
, Attribute attributeRight){
-
metodi di "trasformazione sulla" struttura dati:
JoinMap:
String getStringRepresentation()
che, ritorna qualcosa del tipo:
sorgente.interface1.attrNome1 = sorgente.interface2.attrNome1
oppure
( sorgente1.interface1.attrNome1 = sorgente2.interface1.attrNome1
and
sorgente1.interface2.attrNome1 = sorgente2.interface2.attrNome1
)
-
Un parser, che dalla rappresentazione stringa produca l'albero
-
PARTENDO DALLA FUNZIONE
getStringRepresentation
SI PUO' CREARE QUALCOSA DI ANALOGO CHE PRODUCE L'SQL PER IL JOIN
DEL QUERY MANAGER!!!
Vantaggi.
Il grosso vantaggio di questa soluzione e' la facilita'
di estendere le clausole where.
Per introdurre un nuovo operatore o una nuova funzione
e' sufficiente creare la relativa classe java che
implements JoinMapTreeNode
che contiene il codice per generare l'opportuno SQL
oppure (piu' avanati) sa come deve essere applicato l'operatore
e lavora sulle strutture dati XLL o simili.