metamod:user_database_revised

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
metamod:user_database_revised [2010-09-14 12:05:48]
egils
metamod:user_database_revised [2022-05-31 09:29:32] (current)
Line 2: Line 2:
 Contains changes to the User database design and API that are needed for subscription information and possibly other needs. Contains changes to the User database design and API that are needed for subscription information and possibly other needs.
  
-**2010-09-13: Changes due to the introduction of a U_loginname field are rendered in bold**.+2010-09-13: Changes due to the introduction of a U_loginname field.
  
-**2010-09-14: Names of various methods are changed. These changes are also rendered in bold**.+2010-09-14: Names of various methods are changed
 + 
 +**2010-09-24: Changes in the database structure. A row in the File table is now directly owned by a user. These changes are rendered in bold.** 
 + 
 +**2010-09-28: Added the file_delete method.** 
 + 
 +2010-11-11: Removed WMS_URL and WMS_XML entries from the InfoDS table
  
 ===== Overview ===== ===== Overview =====
Line 15: Line 21:
 **UserTable** **UserTable**
  
-|__U_id__ |A_id |U_name |U_email |**U_loginname** |U_password |U_institution |U_telephone |U_session |+|__U_id__ |A_id |U_name |U_email |U_loginname |U_password |U_institution |U_telephone |U_session |
  
 **DataSet** **DataSet**
Line 23: Line 29:
 **InfoDS** **InfoDS**
  
-|**__I_id__** |DS_id |I_type |I_content |+|__I_id__ |DS_id |I_type |I_content |
  
 **InfoUDS** **InfoUDS**
  
-|**__I_id__** |U_id |DS_id |I_type |I_content |+|__I_id__ |U_id |DS_id |I_type |I_content |
  
 **File** **File**
  
-|__DS_id__ |__F_name__ |F_timestamp |F_size |F_status |F_errurl |+|__U_id__ |__F_name__ |F_timestamp |F_size |F_status |F_errurl |
  
  
Line 46: Line 52:
 ^U_name |User name as given in registration form | ^U_name |User name as given in registration form |
 ^U_email |User E-mail address as given in registration form | ^U_email |User E-mail address as given in registration form |
-^U_loginname |**Login name for user authentication** |+^U_loginname |Login name for user authentication |
 ^U_password |User password | ^U_password |User password |
 ^U_institution |User institution acronym as given in registration form | ^U_institution |User institution acronym as given in registration form |
Line 73: Line 79:
 A type tag (I_type) field tells what kind of information is contained in the row. The value is a short acronym for a limited set of information types. The piece of information is found in the I_content text field. A type tag (I_type) field tells what kind of information is contained in the row. The value is a short acronym for a limited set of information types. The piece of information is found in the I_content text field.
  
-^**I_id** |Unique id (autoincremented number). Primary key |+^I_id |Unique id (autoincremented number). Primary key |
 ^DS_id |Identifiles a dataset this info-row is connected to. | ^DS_id |Identifiles a dataset this info-row is connected to. |
 ^I_type |Type tag. Short acronym that identifies the information type. | ^I_type |Type tag. Short acronym that identifies the information type. |
Line 84: Line 90:
 ^LOCATION |Location. Single entity. Absolute path to the directory under which all files belonging to the dataset are found. The files may be found directly in the location directory, or in any subdirectory of the location directory at any level. | ^LOCATION |Location. Single entity. Absolute path to the directory under which all files belonging to the dataset are found. The files may be found directly in the location directory, or in any subdirectory of the location directory at any level. |
 ^CATALOG |Partial URL to a THREDDS dataset. Single entity. Combined with the file name, this URL can be used to access the content of a file through a TDS server. It can also provide the URL that points to the THREDDS catalog containing the METAMOD dataset. | ^CATALOG |Partial URL to a THREDDS dataset. Single entity. Combined with the file name, this URL can be used to access the content of a file through a TDS server. It can also provide the URL that points to the THREDDS catalog containing the METAMOD dataset. |
-^WMS_URL |URL to the WMS service that can display data from the dataset. Single entity. | 
-^WMS_XML |XML document that describes available alternatives for displaying the dataset in WMS. For example, the parameters that can be displayed. Each parameter may have a palette (for example "BOXFILL/redblue") found in a style element in the GetCapabilites document. If no palette is found, a default palette is used for the parameter. | 
 |Additional information types may be added later, for example to implement projection information: || |Additional information types may be added later, for example to implement projection information: ||
 ^PROJECTION_XML |XML document used to represent reprojection information. The document contains, among other things, each projection the user has asked for ("Lat/Long", "Stereo" etc.). Each projection contains attributes: method, projString, xAxis, yAxis and toDegree.  | ^PROJECTION_XML |XML document used to represent reprojection information. The document contains, among other things, each projection the user has asked for ("Lat/Long", "Stereo" etc.). Each projection contains attributes: method, projString, xAxis, yAxis and toDegree.  |
Line 110: Line 114:
 ==== File ==== ==== File ====
  
-^DS_id |Dataset this file belongs to. Part of primary key. |+^U_id |**User that this file belongs to**. Part of primary key. |
 ^F_name |Local path to file. The full path is given by "LOCATION/F_name" where LOCATION is the dataset LOCATION found in the Info table. Part of primary key. | ^F_name |Local path to file. The full path is given by "LOCATION/F_name" where LOCATION is the dataset LOCATION found in the Info table. Part of primary key. |
 ^F_timestamp |Timestamp of last change | ^F_timestamp |Timestamp of last change |
Line 140: Line 144:
 ^Method ^Purpose ^Parameters ^ ^Method ^Purpose ^Parameters ^
 |user_find |Search for an existing user in the database and make him/her the current user. |IN: User E-mail address, application id (A_id). | |user_find |Search for an existing user in the database and make him/her the current user. |IN: User E-mail address, application id (A_id). |
-|**user_lfind** |**Search for an existing user in the database and make him/her the current user.** |**IN: User login name, application id (A_id).** +|user_lfind |Search for an existing user in the database and make him/her the current user. |IN: User login name, application id (A_id). | 
-|user_create |Create a new user and make it the current user. |IN: User E-mail address, application id (A_id). **Initially, the value of the mandatory U_loginname field will be set to the E-mail address, but this can be changed using the user_set method.** +|user_create |Create a new user and make it the current user. |IN: User E-mail address, application id (A_id). Initially, the value of the mandatory U_loginname field will be set to the E-mail address, but this can be changed using the user_set method. | 
-|<del>user_set</del> **user_put** |Set user properties for the current user |IN: Property name (one of 'U_name', **'U_loginname'**, 'U_password', 'U_institution', 'U_telephone', 'U_session'), property value | +|user_put |Set user properties for the current user |IN: Property name (one of 'U_name', 'U_loginname', 'U_password', 'U_institution', 'U_telephone', 'U_session'), property value | 
-|user_get |Get user properties for the current user. |IN: Property name (one of 'U_id', 'U_email', 'A_id', 'U_name', 'U_password', **'U_loginname'**, 'U_institution', 'U_telephone', 'U_session'). OUT: property value |+|user_get |Get user properties for the current user. |IN: Property name (one of 'U_id', 'U_email', 'A_id', 'U_name', 'U_password', 'U_loginname', 'U_institution', 'U_telephone', 'U_session'). OUT: property value |
 |user_first |Make the first user in the database the current user. |OUT: TRUE if found, FALSE if no users exist. | |user_first |Make the first user in the database the current user. |OUT: TRUE if found, FALSE if no users exist. |
 |user_next |Make the next user in the database the current one. |OUT: TRUE if found, FALSE if already last user. | |user_next |Make the next user in the database the current one. |OUT: TRUE if found, FALSE if already last user. |
Line 158: Line 162:
 |dset_next |Make the next dataset (owned by the current user) the current dataset. |OUT: true if found, false if already last dataset. | |dset_next |Make the next dataset (owned by the current user) the current dataset. |OUT: true if found, false if already last dataset. |
 |dset_isync |Make the dataset corresponding to the current infoUDS-row (see below) the current dataset. |OUT: TRUE if found, FALSE on error. | |dset_isync |Make the dataset corresponding to the current infoUDS-row (see below) the current dataset. |OUT: TRUE if found, FALSE on error. |
-|**dset_get** <del>infoDS_get</del> |Get information from the current dataset. |IN: Information type (I_type) **or one of 'ds_name', 'ds_id', 'u_id'**. OUT: Value of I_content field (single entity or XML). | +|dset_get |Get information from the current dataset. |IN: Information type (I_type) or one of 'ds_name', 'ds_id', 'u_id'. OUT: Value of I_content field (single entity or XML). | 
-|**dset_put** <del>infoDS_put</del> |Add or replace content fields in the current dataset. |IN: Information type (I_type), value of I_content field (single entity or XML). |+|dset_put |Add or replace content fields in the current dataset. |IN: Information type (I_type), value of I_content field (single entity or XML). |
  
 ==== Functions for manipulating the InfoUDS table==== ==== Functions for manipulating the InfoUDS table====
Line 175: Line 179:
  
 ^Method ^Purpose ^Parameters ^ ^Method ^Purpose ^Parameters ^
-|file_find |Search for an existing file (owned by the curent dataset) and make it the current file. |IN: File name (F_name). OUT: true if found, false otherwise. | +|file_find |Search for an existing file (**owned by the curent user**) and make it the current file. |IN: File name (F_name). OUT: true if found, false otherwise. | 
-|file_create |Create a new file (for the current dataset) and make it the current file. |IN: File name (F_name) | +|file_create |Create a new file (**for the current user**) and make it the current file. |IN: File name (F_name) | 
-|<del>file_set</del> **file_put** |Set file properties for the current file |IN: Property name (one of 'F_size', 'F_status', 'F_errurl'), property value |+|file_put |Set file properties for the current file |IN: Property name (one of 'F_size', 'F_status', 'F_errurl'), property value |
 |file_get |Get file properties for the current file. |IN: Property name (one of F_name', 'F_size', 'F_status', 'F_errurl', 'F_timestamp'). OUT: property value | |file_get |Get file properties for the current file. |IN: Property name (one of F_name', 'F_size', 'F_status', 'F_errurl', 'F_timestamp'). OUT: property value |
-|file_first |Make the first file (in the current dataset) the current file. |OUT: true if found, false if no files exist. |+|file_first |Make the first file (**owned by the current user**) the current file. |OUT: true if found, false if no files exist. |
 |file_next |Make the next file in the database the current one. |OUT: true if found, false if already last file. | |file_next |Make the next file in the database the current one. |OUT: true if found, false if already last file. |
 +|**file_delete** |**Delete the current file entry from the database.** |**OUT: true if the entry was deleted, false on error.** |
  
 ==== Example usecase ==== ==== Example usecase ====
  • metamod/user_database_revised.1284465948.txt.gz
  • Last modified: 2022-05-31 09:23:19
  • (external edit)