Overview

The Data Info code is used to define the data provided by a web application, its grouping in a navigation tree and the linking between different web applications. All the data, grouping and linking information is stored in the glastgen database.

Beans, Filter and Tag Files

The code provides a set of classes to read/update the database and a set of beans to easily access this data in a JSP environment.
The beans are added to each of the application's sessions via a filter that is meant to be added to the application. The filter also adds additional functionality for saving/loading information via xml files.
Finally we provide a set of tag files containing forms to view/edit the data, grouping and linking information. These tag files can be easily embedded in web applications.

Beans

Three beans are available, one for each of the data operations provided: Info, Grouping and Linking.

Most of the features provided by this code are dictated by the following choice: the beans load only data for a given application.

Filter

The filter creates a new set of application specific beans every time an application is deployed (in the init(FilterConfig) method). To do this it requires the application initialization parameter containing the name of the application as it appears in the Applications table below.

When the doFilter method is invoked for a new session the static beans are added to the session's scope. So all the sessions for a given application share the same data info beans.

System user

Only logged in users can view the content provided by the tag files, i.e. the content of the data info database. Once a user is logged in he/she can create new groups and links. Some users can have special priviledges if they belong to the DataInfoAdmin group. In this case they can infact become system users and make changes to the datainfo table as well. Changes made by the system user propagate to all users.

Data Info Features

All the data info is accessed by the application directly on the bean when needed via appropriate JSP tags. This means that changes to the bean (and hence to the database) performed by one user are propagated immediately to all users.

Evaluated data: Currently it is not possible to define evaluated expressions (based on other data) as part of this infrastructure. By allowing this it would be possible to add JEL expressions on the data to the grouping and so to the tree.

Data Grouping Features

Using the data grouping bean a navigation tree is built for each application. Currently for each session we build a tree model using the data grouping bean, and store the tree model in the session's scope. This makes it impossible to propagate changes to the bean to the tree model in other sessions. These changes will be picked up the first time the tree model is rebuilt (for example when the login status changes).

Only one tree

Currently there is only one tree per application. This is the tree created by the system user. For a logged in user the tree model is modified by appending at the end a folder with the user's name containing the user defined groups (user groups cannot be attached to system groups).

More trees: Should it be possible to define more trees? These trees might be attached to a mode parameter that defines the level of detail to be represented on the tree. So the navigation tree for shifters would be different than the one for experts.

Toggle visibility: Should a user be allowed to toggle the visibility of parts of the system defined tree?

Mixing user/system: Should it be possible to mix user and system folder? In other words should a user be allowed to add leaves to a system group? Or to add a user group to a system group?

Mixing data: Currently the navigation tree can only contain data from the application it belongs to. Should it be possible to add data from different applications?

Database Overview

The following set of database tables are used by the Data Info code.

Applications

The Applications table defines the available applications.

Column Name

Description

APPID

The primary key.

APPLICATION

The name of the application.

SHORTNAME

A short name for the application; meant to be used in linking.

URL

The URL of the application without the context. To be used in linking.

PAGE

The page where the plots are. Also for linking.

DataInfo

The DataInfo table defines the application specific data. Most of the columns in this table are used for plotting purposes.

Column Name

Description

ID

The primary key.

NAME

The name of the data. This name must be unique within an application.

APPID

Foreign key to the application's primary key.

TYPE

The java type of the data object: hep.aida.IHistogram1D, hep.aida.IHistogram2D, org.glast.base.application.data.trending.TrendingDataChannel.

TITLE

The title of the corresponding plot.

LOGYAXIS

Boolean flag to set log y axis.

XAXISLABEL

The data x axis label.

YAXISLABEL

The data y axis label.

LABEL

The name of the data used in the navigation tree. It not provided the name will be used.

DESCRIPTION

Not used for now. The description is meant to be used to explain the data (tooltips, popups, boxes)

STYLE

Not used for now. Meant to be a list of comma separated style names to be applied when plotting the data.

PATH

Obsolete; used in System Tests for grouping To be removed.

DataGroups and GroupLeaf

The DataGroups and GroupLeaf tables are used to group data together. The GroupLeaf table defines the tree's leaves, while the DataGroups table defines the folders.

GroupLeaf

Using this table allows the same data to belong to multiple folders.

Column Name

Description

LEAFID

The primary key of the leaf.

DATAID

Foreign key to a data's primary key.

GROUPID

Foreign key to the primary key of the group (folder) to which the leaf belongs to.

DataGroups

Column Name

Description

GROUPID

The primary key of the group.

GROUPNAME

The name of the group as it appears on the navigation tree.

PARENTGROUP

Foreign key to a group's primary key. It allows a nested structure.

OWNER

The name of the group's owner. Used to display user's specific groups.

APPID

Foreign key to the application's primary key.

OPERATOR

Not used for now. Meant to somehow contain information on what to do to the contained data when the folder is selected.

DESCSHORT

Not used for now. Meant for ?.

DESCLONG

Not used for now. Meant for ?.

DataLinks and LinkLeaf

Links are connections between a data or a group in one application to a group and/or a set of data in the same or another application.

LinkLeaf

Column Name

Description

ID

The primary key of the leaf.

LINKID

The id of the link the leaf belongs to.

DATAID

Foreign key to the data's id contained in the leaf.

Column Name

Description

LINKID

The primary key of the link.

STARTAPPID

Foreign key to the application's id from which the link originates.

ENDAPPID

Foreign key to the application's id where the link ends.

FROMFK

Foreign key of the data from which the link starts.

TOGROUPID

Foreign key to the group's id where the link ends.

OWNER

The owner of the link. Used to display user's specific links.

TODATA

Obsolete. To be removed.

  • No labels