Propositions

From Armarius

Jump to: navigation, search

Contents

[edit] Here we write the future development issues

Return to the develoment documentation Development_documentation

[edit] Annotations

How to get an specific annotation? In fact there is no way to identify an annotation. We can add an unlimited number of annotations over the same zone. (For exemple when filling the system with the WordSpotting results, if the script is re-executed there will be no wanted additional annotations...) An issue it's maybe to compare those zones in order to merge similar annotations.


[edit] Comments

In order to save the annotation's comments into the DB we will maybe need more than 100 characters (VARCHAR(100) is the actual size)

[edit] Ideas for brainstorming

[edit] New functionnalities

- Word spotting sesions

- Personnalizable first page (word spotting sessions, favourite keywords, transcriptions, documents)

- Show only (my/firnds/all) keywords, show only a certain type of metadata

- Advanced search

Brainstorming report (see it on svn)

[edit] Developement

- include Yahoo! User Interface Library (http://developer.yahoo.com/yui/) or other Ajax frameworks This framework allow develop easily front ends because it handles for example the compatibility with different kind of browsers. The tools (windows, handlers, etc) are simple to configure and to personalize (using style sheets) Several websites implements this framework when dealing with Javascript

- use SMARTY Template Engine (http://smarty.php.net/) in order to facilitate the separation of application code from presentation. PHP scripts are separated from HTML content. Using templates allows programmers to work on scripts and designers on presentation.

- use DOXYGEN (http://www.stack.nl/~dimitri/doxygen/) to generate continuously an updated PHP Documentation of our scripts

[edit] Here is what Alberto and Nathalie will be doing next weeks

To do (in priority) :

- User management + avalaible collection list for users -> Nathalie

- Collection management -> Alberto

- French interface + dynamic language list -> Nathalie


1) Programmation + specifications + tests plan

2) Separated tests (Alberto, Nathalie) using 3 users of each type

3) Integration

4) Global tests


To do (after)

Complete specifications concerning wordspotting sessions (review database architecture, maybe add a table called “sessions”)

Create new interface drafts implementing the filtering system.

[edit] Management of groups of users and rights (propositions)

[edit] Tables needed and modifications of the database :

All the tables of the database will begin with armarius_ instead of prefix_

A new table prefix_rights will be created such as : armarius_rights (rg_col_id, rg_group_id, rg_rights) . rg_rights is a binary word that encodes permissions like in Unix system.


The table armarius_volumes,armarius_page_orders,armarius_orderings and armarius_category will be removed and a table armarius_collections_content will be created and will such as : armarius_collections_content(cc_col_id,cc_content,cc_content_type). cc_content is an id for a page or for a subcollection. To know if cc_content indicates a page or a subcollection, we will use the field cc_content_type containig "2" for a page and "1" for a subcollection.
Therefore, to list the content of a collection, we have to look at the table and where there is cc_col_id which corresponds to the collection we want to show, we look at the cc_content associated. If it's a page (cc_content_type ="2"), we show it ; if it's a subcollection (cc_content_type ="1"), we start again, replacing cc_col_id by the id of the subcollection and we continue in a recursive way.

There will also be a table armarius_groups with the fields group_id (ID of the group) and group_name (name of the group), and armarius_groups_content with the fields gc_group_id (ID of the group), gc_user_id (ID of the user).

(Elod) The Group and Collection table structures are not homogeneous. Either we separate the table armarius_collections_content into armarius_collections_content and armarius_subcollections, or we merge the tables: armarius_groups_content and armarius_subgroups.

Here is the new Armarius database (scripts to create tables)
Here is the new Armarius database structure

  • Questions :


What is the order of the pages in the new structure ? Because, for each page in a collection or in a subcollection, we need to know its order.
How will we show the pages ?

Answer(Elod)
I think that page orders should be assiciated with Groups. We will add more tables with group and user preferences and views. We will integrate the page orders there. Nevertheless, if you have another point of view go ahead and tell us.

[edit] Functions which may be used :

  • create_user ($Login,$password,$Username,$Email) -> creates an user with the information $Login,$password,$Username and $email, and returns the ID of this user ($Userid).
  • delete_user ($Userid) -> deletes the user which is identified by $Userid.
  • create_group ($nameG) -> creates a group called $nameG and returns the ID of this group ($idG)
  • add_user ($idG,$idU) -> adds the user which has $idU to the group which has $idG.
  • remove_user ($idG,$idU) -> removes the user which has $idU from the group identified by $idG.
  • delete_group ($idG) -> deletes the group identified by $idG.
  • get_rights($idG,$idC) -> for a collection identified by $idC, returns the rights of the group identief by $idG.
  • get_groups_with_rights ($idC,$rights) -> returns the groups which have the rights $r,$a and $f for the collection identified by $idC.
  • get_collections_with_rights ($idG,$rights) -> returns the collections which are associated with the groups identified by $idG and the rights $r,$a and $r.

[edit] Querys associated to the functions

  • create_user ($Login,$password,$Username,$Email)
INSERT INTO armarius_users (user_login,user_password,user_name,user_email,user_lastlogin,user_created,user_activated)
VALUES($Login,$password,$Username,$Email,heure courante,heure courante,1);
  • delete_user ($Userid)
DELETE FROM TABLE amarius_users WHERE user_id = $Userid;
DELETE FROM TABLE armarius_groups_content WHERE gc_user_id = $Userid;
  • create_group ($nameG)
INSERT INTO armarius_groups (group_name) VALUES($nameG);
  • add_user ($idG,$idU)
INSERT INTO armarius_group_content (gc_group_id,gc_user_id) VALUES ($idG,$idU);
  • remove_user ($idG,$idU)
DELETE FROM armarius_groups_content WHERE gc_user_id = $idU AND gc_group_id = $idG;
  • delete_group ($idG)
DELETE FROM armarius_groups WHERE group_id = $idG;
DELETE FROM armarius_groups_content WHERE gc_group_id = $idG;
DELETE FROM armarius_rights WHERE rg_group_id = $idG;
  • get_rights($idG,$idC)
SELECT rg_rights FROM armarius_rights WHERE rg_col_id = $idC AND rg_group_id = $idG;
  • get_groups_with_rights ($idC,$rights)
SELECT rg_group_id FROM armarius_rights WHERE rg_col_id = $idC AND rg_rights = $rights;
  • get_collections_with_rights ($idG,$rights)
SELECT rg_col_id FROM armarius_rights WHERE rg_group_id = $idG AND rg_rights = $rights;


[edit] Scripts used and their functionnalities (Last programmed version of Armarius)

They're all in app/admin.

  • admin_panel.php : Administration panel with menu (Users, Groups, Collections)
  • admin_inscription.php : Script used when a user wants to register
  • create_user.php : Script to create a new user, giving its name,email,password,login (only for the system admin)
  • edit_user.php : Script to edit the name and the email of a selected user (only for the system admin)
  • manage_user.php : Script (only for system admin) to see all the users registered and their information : login,email,date of last connexion,date of creation,groups in what he belongs,if he's activated ; the admin can do actions on it:activate/suspend,remove or edit. The list can be sorted by alphabetical orer, date of last connexion or by date of creation.
  • create_group.php : Script to create a new group, giving its name and if we want users to add to the group (only for system admin)
  • edit_group.php : Script to edit the members of a slected group (only for admin system)
  • manage_group.php : Script to see all the groups (sorted by alphabetical order) registered and for each group, its users (only for admin system)

This files are associated with template files because we've used Smarty.
Then, there are treatment scripts :

  • add.php : Script to update the session variable if we want or not add a user to a selected group
  • admin_deconnexion.php : When a user disconnects, his information is destroyed and there is a return to the main page
  • image.php : File to create the security image when a user wants to register
  • login.php : Tests if the login is correct. In this case, the message "You are connected as .." and the buttoDisconnect appears on the main page instead of the traditional "Login". If there is a problem, a message appears on the main page indicating the error to the user.The user can try to connect again. This file is also used for the administrator operations like manage users, groups or collections.
  • order.php : Script to update the session variable with the order selected to show the list of users
  • remove_group.php : Script to remove a group from the database
  • treatement_user.php : Script which tests if the login is correct. In this case, the message "You are connected as .." and the button Disconnect appear on the main page instead of the traditional "Login". If there is a problem, a message appears on the main page indicating the error to the user. The user can try to connect again.
  • users_group.php : Puts the id of the user added to the group into in a session variable and puts 0 to the session variable containing the id of the user we want to remove.


All the files are called with an URL such as : To call create_user.php, the URL is ?create:user.

[edit] Management of "Collections" in the Armarius Framework

[edit] General introduction

At the moment the collections are structured of the following way : The base set is the collection. A collection is composed by zero, one or several volumes. Within a volume there is zero, one or several pages.

The tables concerned by these three sets are respectively :

  • `armarius_collections`
  • `armarius_volumes`
  • `armarius_pages`

Nevertheless these tables are succeptibles to change.

The inclusion of a volume within a collection is done through the table `armarius_volumes` The inclusion of a page within a volume is done through the table `armarius_page_orders`. The order of the pages inside the volume is defined too in this table.

The fundamental working element in Armarius is the "page" that contains the annotations (transcripts, keywords, comments, etc) inside the document units. We undestand by “document unit” the rectangle that delimits over the page, the physical area to which the annotation makes reference.

[edit] New structure

There will be now collections composed by sub-collections. A sub-collection can be composed by pages or by sub-collections (like files (=> pages) and folders (=>collections/sub-collections) in an Operative System)

[edit] Functionalities :

Details of functionalities for collections management

The manage collections interface must allow to do:

  • Create a Collection
  • Edit "some details" of the Collection
  • Delete a Collection
  • Create a Sub-collection
  • Edit "some details" of the Sub-collection
  • Delete a Sub-collection
  • Add a page to a collection or sub-collection
  • Delete a page
  • Edit the page information
  • Move the page to an other collection or sub-collection
  • Delete a page from a collection/sub-collection

[edit] Functions to be deployed to accomplish those fonctionalities :

Php Class Collection


In a global point of view the only difference between a collection and a sub-collection is that the first one does not have a parent collection. It is the root in the collections tree. That is the reason why the tree following functions (add, edit and remove collections) are exactly the same for manage collections or subcollections.

How to manage collections

Collections Management Interface


function create_collection($collection_name, $collection_parent) 
returns col_id

This function will create an empty collection into the Database by registering a row into the `armarius_collections` table.


function edit_collection_name($id_collection, $collection_name) 
returns void

function remove_collection($id_collection) 
returns void

When removing a collection, all the content inside (pages and sub-collections) will be also removed.


function move_collection($id_collection_parent, $id_subcollection) 
returns void

function import_page($url_to_page, $id_collection, optional $page_title) 
returns id_page

function edit_page($id_page, $page_title) 
returns void

function move_page($id_page, $id_collection) 
returns void

function move_pages_set($array_of_id_pages, $id_collection) 
returns void

function delete_page($id_page) 
returns void

function delete_pages_set($array_of_id_pages) 
returns void

function find_collection($id_collection) 
returns route_from_root

function locate_page($id_page) 
returns cc_col_id

[edit] Functionnalities and interfaces (propositions)

[edit] Functionnalities

  • Create a new user : giving correctly a login, password, name and email, a new user can be created.

To create, click on the link "Create user" in the administration panel. Of course, this functionnality is also available in the main page because a user can register if he wants !


  • See all the users registered : an array shows all the users and for each user, his login, email, last connexion, date of his creation, his groups, and if he is activated.

The array can be sorted by the alphabetical order, by last connexion, or by date of creation. The choice is made by the administrator. To see the members, click on the link "Manage users" in the administration panel.


  • Suspend a user registered : Activation is then equal to 0. This operation is only possible if the user is activated. The administrator has to click on the button "Suspend" in the array containing the user.


  • Activate a user registered : Activation is then equal to 1. This operation is only possible if the user is not activated. The administrator has to click on the button "Activate" in the array containing the user.


  • Remove a user registered : The administrator has to click on the button "Remove" in the array containing the user and he's deleted.


  • Edit a user registered : The administrator has to click on the button "Edit" in the array containing the user and he can modify the login and the email of the user selected.


  • Create a new group : giving correctly a name, a new group can be created. We can add users registered to this group if we want.

To create, click on the link "Create group" in the administration panel.


  • See all the existing groups : an array shows all the groups (sorted by alphabetical order) and for each group, its users.

We can remove the by clicking on the button "Remove" or edit it by clicking on the button "Edit". To see the groups, click on the link "Manage groups" in the administration panel.


  • Remove a group : The administrator has to click on the button "Remove" in the array containing the group and it's deleted.


  • Edit a group : The administrator has to click on the button "Edit" in the array containing the group and he can modify the name and the users members of the group selected.


  • See all the collections with groups which have rights on them : an array shows all the collections and for each collection, the groups which have rights on it, the users members of the group, the rights of the group. The array can be sorted by the alphabetical order, or by date of creation of the collection. The choice is made by the administrator.

To see the collections with groups and rights, click on the link "Manage collections" in the administration panel.


  • Edit a group of a collection selected : The administrator has to click on the button "Edit" in the array containing the collection selected and he can modify the rights and the users of the group selected for the collection selected.


  • Remove a group of a collection selected : The administrator has to click on the button "Remove" in the array containing the collection selected and he can delete the group selected for the collection selected.


  • Remove a collection selected : The administrator has to click on the button "Remove the collection" in the array containing the collection selected and he can delete the collection selected.


  • Add a group to a collection selected : The administrator has to click on the button "Add a group" in the array containing the collection selected and he can give rights to the group chosen for the collection selected.


[edit] Interfaces

  • Administration panel

Image:Administration panel.jpg
In the headings « Users », « Groups », « Collections », there are only links.


  • Create user

Image:Create user.jpg
Here, a new user can be created if the fields are all completed and correct.
To do this, the function create_user will be used.
To validate, we have to click on the button “Create”.
In the menu, there are always the links.


  • Manage users

Image:Manage users.jpg
Here, the list of the existing users is shown.
For each user, we can see his login, email, last connexion, date of creation, his groups, and if he is activated.
The list of users can be sorted by alphabetical order (default), or by last connexion, or by date of creation. The choice is made with a drop-down list.
Moreover, for each user, we can remove him. In this case, we click on the button “Remove” and the user is deleted. We can also suspend him (puts 0 into activation because activation was equal to 1) by clicking on the button “Suspend”.
This button is replaced by the button “Activate” if the activation of the user equals to 0. If we click on it, it will activate the user (puts 1 into activation). We can edit the information of each user by clicking on the button “Edit” that will lead to the page “Edit users”.
In the menu, there are always the links.


  • Edit users

Image:Edit users.jpg
Here, the login and the email of a user can be edited if the fields are completed and correct.
To validate, we have to click on the button “Edit”.
In the menu, there are always the links.


  • Create group

Image:Create group.jpg
Here, a new group can be created giving its name. For the question “Add members”, there will a drop-down list. If the person chooses Yes, the heading with “Users of the group” and “Users” appears, giving the right to add users registered (in “Users”) to the group (in “Users of the group”) with the arrow pointing on the left. The person can also remove a user put in “Users of the group” with the arrow pointing on the right. If the person chooses No, the heading with “Users of the group” and “Users” doesn’t appear.
To validate, we have to click on the button “Create”.
To do this, the function create_group may be used.
In the menu, there are always the links.


  • Manage groups

Image:Manage groups.jpg
Here, the list of the existing groups is shown. For each group, the list of the users whi belong to it is also shown.
Moreover, for each group, we can remove it. In this case, we click on the button “Remove” and the group is deleted. We can also edit a group by clicking on the button “Edit” that will lead to the page “Edit group”, which is the same that the page “Create group”.
In the menu, there are always the links.


  • Manage collections

Image:Manage collections.jpg
Here, the list of the existing collections is shown.
For each collection, we can see the groups which have rights on it, these rights, the users members of each group.
The list of collections can be sorted by alphabetical order (default), or by date of creation. The choice is made with a drop-down list.
Moreover, for each group, we can “remove” it from the collection. In this case, we click on the button “Remove” and the group has no rights on the collection. We can also edit it by clicking on the button “Edit” which leads to the page “Edit collections”.
We can add a group to the collection, so give rights to the group chosen for this collection by clicking on the link “Add a group” which leads to the page “Add a group”.
Finally, we can remove the collection selected.
In the menu, there are always the links.


  • Edit collections

Image:Edit collections.jpg
Here, a group which has rights on a collection can be edited. Its rights can be modified with a choice, made with a drop-down list.
Users can also be removed (with the arrow pointing on the right) or added to the group (with the arrow pointing on the left).
To validate, we have to click on the button “Edit”.
In the menu, there are always the links.


  • Add a group

Image:Add a group.jpg
Here, a group can be added to the collection selected. To choose a group, there is a drop-down list . Each time a choice is made, the list of the users of the group is shown.
We can then choose the rights of the group on the collection with a drop-down list and finally click on the button “Add” to validate.
In the menu, there are always the links.

Personal tools