Sunday, December 30, 2007

Create a new portlet in tDar

In order to add one new portlet in the tDar portal. Some basic procedures are required to follow:
  1. Create a class which inherits from "org.gridlab.gridsphere.provider.event.jsr.ActionFormEvent";
    1. It's better to create a separated project for the new porlet; in the project, we have
      1. a directory 'src'
      2. a directory 'webapp', under which some important configuration files are, like portlet.xml, layout.xml.
      3. build.properties
      4. build.xml: configurations about the compiling, deployment etc. (probably manual changes are required)
  2. Make relative configurations
    1. webapp/WEB-INF/portlet.xml:
      1. description information about the portlet class
    2. conf/gridsphere/layout.xml
      1. description information about the portlet class
    3. build.xml:
      1. add the build information about the new portlet
  3. Run 'ant deploy', and restart tomcat.

A good idea might be to create a code template for a new porlet.

tDar Setup Guide

To set up the tDar environment, there are some basic procedures to follows. At this time, we use the package provided by Allen, and it makes the work much easier.
  1. All files including scripts, classes, jsp, libs etc, are all put in the directory "geon-tomcat"; first download this directory and put it in the local machine (say, C:/).
  2. We also need download another package "work", where all source codes and necessary third-party libraries are for the purpose of development.
  3. Preparation of Database
    1. Install PostgreSQL 8.x, and start the db service; (probably some configurations should be done)
    2. Create a user "geonportaluser", it should be easy if pgAdmin.exe is used.
    3. Create databases, "geonportaldb", "geoncat" and "tdar". (owner is "geonportaluser").
    4. Import the data from dump files "geoncat.dump" and "geonportaldb.dump", by the following command:
      1. psql -U geonportaluser $db < $db.dump;
    5. "cd work", and run the command, "ant init-db" to create tables in the database "tdar".
  4. Create environment variables:
    1. $JAVA_HOME : where Java directory is;
    2. $PATH : where Java bin directory is.
    3. Example:
      1. export JAVA_HOME=/usr/lib/jvm/java-6-sun
      2. export PATH=$PATH:$JAVA_HOME/bin
  5. Start of Tomcat: go to the directory "geon-tomcat/bin", and run the command:
    1. Linux:  "sudo ./startup.sh";
    2. Window: "startup.exe" (the link: http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/87B9844AF29A886D852570530054F28B could help!)


Monday, December 24, 2007

Create a Spring project in Eclipse

First, let's take a look at how to create a Spring project in Eclipse. I would like to put the procedure step by step as follows. We assume that the project we're creating is a regular java project. There are some different ways to create a Spring project in Eclipse.  You can create a Spring project by using an Eclipse plug-in for Spring, such as Sping IDE; and you can also use existing example codes as a template, and you can also do everything just from scratch. I believe the last one is always a good choice because people can really learn something from the procedure.

But as I am also a beginner for Spring, I decide to use the simplest way first of all. I first installed the Spring IDE for Eclipse, by the URL: http://springide.org/updatesite. Note that:
Don't try to install the "Spring IDE Dependencies (only for Eclipse 3.2.x)" from the "Dependency" category on Eclipse 3.3. This feature is intended only for Eclipse 3.2 and is to keep Spring IDE backward-compatible. You will not be able to continue with the installation if you select this feature on Eclipse 3.3
It seems taking a while to download all packages, since it's composed of many library files. In the end, I found it doesn't help much with the project construction, since it doesn't generate the configure XML file for you, doesn't add the necessary third-party libraries for you, ... It seems to do nothing for you! Not lucky! We must take the last choice anyway. Probably it's a better idea to start with walking instead of running.

Before starting, we need download some third-party libraries, which would be mentioned later during the construction.
  1. Open Eclipse.
  2. New a Java project.
  3. Compile "applicationContext.xml" file, a simple template can be like, (nice, the format is kept when I did C&P.)
    1. <?xml version="1.0"?>
<!-- The template of configuration file for Spring framework. @author Yan Qi, @date 20071224 -->
<bean id="test" class="">
  <property name="">
    <bean class=""/>
  </property>
</bean>
</beans>
  1. Create source codes.
  2. Basically, at least two libraries are necessary, including spring.jar, commons-logging.jar. Add them in the lib path.
  3. One package as an example is below: http://ficsr.googlecode.com/files/LearningSpring.zip

That's it! I believe it's a good starting point to study Spring.

Coming back

Sometimes, people could be lost somewhere you never know. Not every one can come back though. About those who finally make it, I believe there must be one moment: all of a sudden, everything becomes making sense again!
Then, welcome back, my friend!

Saturday, June 16, 2007

Today, I will fly to San Jose, and start an intern's life lasting around 3 months. Hope I could achieve sth. J

Sunday, April 22, 2007

Status of the Implementation of Demo (FICSR)

The demo is composed of the following parts[1]:

I. Read coding information (text) and Construction of Hierarchical Ontology

A. Modify Maria’s code, and integrate it into the demo; (10%)

B. Store the hierarchical structure with the OWL file. (0%)

II. Import and Export OWL file.

A. Read OWL file

1. Status: done.

B. Parse OWL file and Extract important information, including

Item

Status

Class

Done

individual (members of class)

Done

subClassOf

done

instanceOf

done

data property

to do

property characteristics and restricts

to do maybe

...

...

C. Visualization of Ontology

1. Status: almost done, something to be improved includes

a) the direction of the edge

b) the optimization of the layout (should be more beautiful)

D. Export ontology to OWL file

1. Status: to do, the future work includes

a) convert the constraints introduced by our algorithm, like exclusive choice, coordinated choices etc., into some suitable forms satisfying OWL syntax.

b) export all of results into a well-format OWL file.

c) find a way how to represent the USER's integrity constraint in the OWL file

III. Matching Ontologies

A. Automatic matching

1. Text similarity based matching

a) extract all names of items (class, individual ...), status: done

b) match items in different ontologies (OWL files), status: done

(1) stemming,

(2) comparison

2. Visualization of the matches

a) use a table to display all text matches

(Status: done 95%)

(1) user can decide which matches are useful, or not.

B. Manual matching

1. User can decide which pair of vertices (one to one matching) in different ontologies is matched, through the visual representation of the ontologies. (Status:done 85%)

2. Other kinds of manual matching (one to many, or many to many matching), (Status: to do???)

C. Matching items in different ontologies based on Kim's algorithm (Status: to do)

1. I checked the definition of the OWL file. It seems that no items in the same owl file can have the same name/identity.

IV. Merging Ontologies

A. Integrate different ontologies based on the matching from the previous step, by introducing such constraints as

1. exclusive choice, (status: done)

2. coordinated positive choice, (status: done 95%)

3. coordinated negative choice, (status: to do, user involved)

B. Visualize these constraints in the integrated view,

1. exclusive choice, status, (done)

2. coordinated positive/negative choices, (status: done 80% except negative choice)

V. Zonal Conflicts Identification and Agreement Computation

A. Zone Identification (Status: done)

B. Zone Visualization (Status: to do soon)

C. Agreement Computation

1. Status: done 95%. (enumeration of all models)

VI. Visualization of the Integrated Graph with Agreements

A. Remove virtual vertices introduced by the constraints (exclusive choice, coordinated choices, etc.) (Status: done)

B. Connect sources and sinks in the zone with edge associated with agreement (Status: done)

C. Visualize the integrated view. (Status: done)

VII. Path Query Processing and Results Visualization

A. Parsing query expression

1. extract information and analyze the components in the path. (Status: done)

B. Evaluating the query

1. Using "JOIN" mechanism

a) find the shortest paths among 2 vertices (status: done)

b) JOIN the results together, (status: to do soon, maybe)

(1) one question here is how to rank the final results. Note that the shortest path here is only applied for a pair of vertices, not a serial of vertices;

(2) additionally, the wildcard '//' and the star '*' should be also corrected handled.

2. Using "Spanning Tree" to process the complex path query (status: to do)

VIII. Conflicts Analysis and Fuzzy Program Generation

A. Analyze different types of conflicts in the results

1. Zonal Conflicts

a) find zonal conflicts in one pair of paths; (status: done 96%)

2. Path Integrity Conflicts

a) final acyclic conflicts in any pair of paths; (status: done 95%)

b) on the other hand, when other kinds of path conflicts are concerned, like the order of vertices in the path, it's a little complex, since the concerned ontology could be arbitrary rather than a binary tree. (status: to do ???)

B. Generate the Lingo fuzzy program based on the conflicts

1. Generate Lingo fuzzy program based on the conflicts; (status: done 95%)

a) it could be improved when more conflicts are considered.

IX. Solve Fuzzy Program and Update the Agreement Values

A. The fuzzy program is run and the result is achieved. (status: done 95%)

B. The results are analyzed and agreement of edges are updated. (status: done 90%)

X. Visualization of the Update

A. The updated agreements are displayed to the user (status: to do soon)

XI. Feedback from the Use (status: to do soon)

A. Adjust the weights in the fuzzy program code

B. Change the ranking of the results,

C. Give positive or negative response to some results for the path query.



[1] Note that, I list all potential tasks (hopefully), for each of which a status is associated with. The status includes

1. done, completed;

2. almost done, bugs existing.

3. to do soon, will complete in future with higher priority;

4. to do, will complete in future.

5. On the other hand, we also use property to represent the completion, where 100% means it’s completed, and 0% means it could be done in future.

Status of the Implementation of Demo

The report is a simple version of the status of our demo. More details could be found in the other report. Here we exploit property from 0% to 100% to measure the completion of the functions in the demo. Thus, 100% means it’s done; and 0% means it could be done in the future.

  1. Generate Ontology and Export to OWL

1) Construct the hierarchical structure based on Maria’s work. (10%)

2) Export the hierarchical structure to OWL file. (1%)

  1. Import Data
  2. Data Matching and Merging

1) Data matching (80%)

2) Data merging (50%)

  1. Conflicts Resolution

1) Zone identification (95%)

2) Zonal conflicts (95%)

3) Path query evaluation / enumeration (95%)

4) Integrity constraints

a. Specifications of conflicts (zonal conflict, acyclicity conflict)

b. Computations of degree of conflicts (90%)

5) Fuzzy program generation (95%)

6) Feedback to the user (20%)

7) User’s feedback (10%)