Server.Catalogue Class Reference

The Catalogue class contains the actual model of the system. It contains all functionality needed by both the AccessHandler class and the server-side console. More...

Collaboration diagram for Server.Catalogue:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Catalogue (IPersistentData database)
 Constructs a new Catalogue with the specified instance of PersistentData layer.
void SaveData ()
 Save current data in memory into the persistent data.
Project GetProject (int id)
 Gets a specific project.
ProjectInfo GetProjectInfo (int id)
 Get a specific ProjectInfo struct.
Messages DeleteProject (int id)
 Delete a project.
Messages CreateProject (ProjectInfo pi, string creator, out int id)
 Create a new project instance.
Messages UpdateProject (ProjectInfo info)
 Updates an existing project.
ProjectInfo[] ListProjects ()
 Gets all projects.
ProjectInfo[] GetUsersProjects (string username)
 Gets a projects a user has a role in.
Messages CreateLiterature (LiteratureInfo info, out int id)
 Create a literature instance with the specified parameters.
LiteratureInfo[] ListLiterature ()
 Gets all literature.
Messages DeleteLiterature (int id)
 Delete a specific instance of literature.
LiteratureInfo GetLiteratureInfo (int id)
 Get the information of a specific instance of literature.
Messages UpdateLiterature (LiteratureInfo info)
 Updates a instance of the literature class.
Messages CreateComment (CommentInfo ci, out int id)
 Create a new comment and save it.
CommentInfo[] GetComments (int literatureID)
 Gets all comments for a specific instance of Literature.
CommentInfo[] GetComments (int literatureID, int projectID)
 Gets all comments for a specific reference.
ReviewInfo GetReviewInfo (int project, int literature)
 Get a information about a specific Review.
ReviewInfo[] ListReviews (int project)
 Lists all Reviews in a project.
Messages CreateReview (ReviewInfo ri)
 Creates a Review.
Messages UpdateReview (ReviewInfo ri)
 Change content of a Review.
Messages CreateReference (ReferenceInfo ri)
 Create a new reference between a literature and a project instance.
Messages UpdateReference (ReferenceInfo ri)
 Update an existing reference.
Messages DeleteReference (int project, int literature)
 Deletes a reference, review or suggestion.
ReferenceInfo GetReferenceInfo (int project, int literature)
 Gets a ReferenceInfo struct describing a Reference.
ReferenceInfo[] ListReferences (int project)
 Gets a list of all references in a project.
Messages CreateSuggestion (SuggestionInfo si)
 Create a new Suggestion.
Messages UpdateSuggestion (SuggestionInfo si)
 Updates a Suggestions content using a SuggestionInfo struct.
SuggestionInfo GetSuggestionInfo (int project, int literature)
 Gets information about a specific Suggestion.
SuggestionInfo[] ListSuggestions (int project)
 Lists all suggestion in a specific project.
List< SearchResultSearch (string query, ResultType searchTypes)
 Search through database using a text query.
ISearchable[] ListItems (ResultType type)
 Lists all Items of the requested type. Listable types are Project, Person and Literature. (See ResultType).
ISearchable[] ListItems (ResultType type, string creator)
 Lists all Items of the requested type. Listable types are Project, Person and Literature. (See ResultType).
List< SearchResultSearchByTag (string tag)
 Returns all items which contains a specific tag.
List< SearchResultShowRelated (int id)
TagInfo[] GetTags (string tag, int id, string username)
 A search function for tags.
Messages AddTag (string tag, int id, string username)
 Add a new tag to a specific item.
Messages RemoveTag (string tag, int id, string username)
 Remove a specific tag from an item.
Messages RegisterUser (string user, string password, string name, string department, string email)
 Create a new user in the system.
Person GetUser (string user)
 Get a specific user in the system.
PersonInfo GetPersonInfo (string username)
 Get a specific info of a specific user.
Messages UpdatePerson (PersonInfo pi)
 Updates an existing instance of Person.
RoleInfo[] GetRoles (int id)
 Get all roles in a specific project.
Messages AssignUser (string username, int project, RoleType role)
 Assign a user to a project.
Messages UnassignUser (string username, int project)
 Remove a user from a project.
Role GetRole (int project, string username)
 Get a specific persons role in a specific project.
StatisticsInfo GetStatistics ()
 Gets some amount information about the catalogue. Number of people, projects, unique tags, tag hits and literature.

Private Member Functions

void GetAllComments (List< Comment > root, List< CommentInfo > output, int parent, int project)
Reference GetReference (int project, int literature)
 Get a specific reference.
float TermFrequency (string input, string query)
 Counts all occurences of a specific word in a string. (case-insensitive).
float WordCount (string input)
 Counts amount of words in a string.
float TermFreq (string title, string text, string query)
 Calculates tf–idf (term frequency–inverse document frequency) http://en.wikipedia.org/wiki/TFIDF Is weighted in two categories, when words are found in the title of an item, and when its found in the text.
int CalcUniqueTags ()
 Gets amount of unique tag names in the tags table.

Private Attributes

IPersistentData database
DataContainer data
int UniqueTagCount = -1

Classes

class  SearchResultComparer
class  TagComparer

Detailed Description

The Catalogue class contains the actual model of the system. It contains all functionality needed by both the AccessHandler class and the server-side console.

Definition at line 15 of file Catalogue.cs.


Constructor & Destructor Documentation

Server.Catalogue.Catalogue ( IPersistentData  database  ) 

Constructs a new Catalogue with the specified instance of PersistentData layer.

Parameters:
database The instance of the PersistentData class which will be used as storage.

Definition at line 27 of file Catalogue.cs.

References Server.Catalogue.data, Server.Catalogue.database, and Server.Data.IPersistentData.LoadData().

Here is the call graph for this function:


Member Function Documentation

void Server.Catalogue.SaveData (  ) 

Save current data in memory into the persistent data.

Definition at line 36 of file Catalogue.cs.

References Server.Catalogue.data, Server.Catalogue.database, and Server.Data.IPersistentData.SaveData().

Referenced by Server.Startup.Main().

Here is the call graph for this function:

Here is the caller graph for this function:

Project Server.Catalogue.GetProject ( int  id  ) 

Gets a specific project.

Parameters:
id A unique project ID
Returns:
The project which matches the ID or else null.

Definition at line 50 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.ProjectTable.

ProjectInfo Server.Catalogue.GetProjectInfo ( int  id  ) 

Get a specific ProjectInfo struct.

Parameters:
id An unique project ID
Returns:
A ProjectInfo struct

Definition at line 63 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.ProjectTable.

Messages Server.Catalogue.DeleteProject ( int  id  ) 

Delete a project.

Parameters:
id The ID of the project to be deleted.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 76 of file Catalogue.cs.

References Server.Catalogue.data, Server.Catalogue.database, Server.Catalogue.DeleteReference(), Server.Data.DataContainer.ProjectTable, Server.Data.IPersistentData.SaveData(), and Server.Data.DataContainer.Tags.

Here is the call graph for this function:

Messages Server.Catalogue.CreateProject ( ProjectInfo  pi,
string  creator,
out int  id 
)

Create a new project instance.

Parameters:
pi Information used to create the project
creator The person who created the project.
id The unique ID of the project. Generated as an out value by the static class UniquelyIdentifiable.
Returns:
A message telling whether or not the operation was succesfull.

Todo:
FIXME: SAVE ALL ON ADD ONE?

Definition at line 115 of file Catalogue.cs.

References Server.Project.AddPerson(), Server.Catalogue.data, Server.Catalogue.database, Shared.ProjectInfo.department, Shared.ProjectInfo.endDate, Server.Catalogue.GetUser(), Server.UniquelyIdentifiable.ID, Server.Data.DataContainer.ProjectTable, Server.Data.IPersistentData.SaveData(), Shared.ProjectInfo.startDate, Shared.ProjectInfo.subject, Shared.ProjectInfo.submitted, Shared.ProjectInfo.synopsis, and Shared.ProjectInfo.title.

Here is the call graph for this function:

Messages Server.Catalogue.UpdateProject ( ProjectInfo  info  ) 

Updates an existing project.

Parameters:
info A ProjectInfo struct containing the new information.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 137 of file Catalogue.cs.

References Server.Catalogue.data, Shared.ProjectInfo.department, Shared.ProjectInfo.endDate, Shared.ProjectInfo.id, Server.Data.DataContainer.ProjectTable, Shared.ProjectInfo.startDate, Shared.ProjectInfo.subject, Shared.ProjectInfo.submitted, Shared.ProjectInfo.synopsis, and Shared.ProjectInfo.title.

ProjectInfo [] Server.Catalogue.ListProjects (  ) 

Gets all projects.

Returns:
An array with ProjectInfo structs containing all projects.

Definition at line 156 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.ProjectTable.

ProjectInfo [] Server.Catalogue.GetUsersProjects ( string  username  ) 

Gets a projects a user has a role in.

Parameters:
username The username of the user. A string.
Returns:
An array with ProjectInfos.

Definition at line 172 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.ProjectTable.

Messages Server.Catalogue.CreateLiterature ( LiteratureInfo  info,
out int  id 
)

Create a literature instance with the specified parameters.

Parameters:
info Data used to create the literature
id The unique ID of the literature. Generated as an out value by the static class UniquelyIdentifiable.
Returns:
A message telling whether or not the operation was succesfull.

Todo:
FIXME: SAVE ALL ON ADD ONE?

Definition at line 200 of file Catalogue.cs.

References Shared.LiteratureInfo.author, Shared.LiteratureInfo.creator, Server.Catalogue.data, Server.Catalogue.database, Shared.LiteratureInfo.date, Shared.LiteratureInfo.isbn, Server.Data.DataContainer.LiteratureTable, Server.Data.DataContainer.PersonTable, Server.Data.IPersistentData.SaveData(), Shared.LiteratureInfo.source, Shared.LiteratureInfo.summary, Shared.LiteratureInfo.title, and Shared.LiteratureInfo.type.

Here is the call graph for this function:

LiteratureInfo [] Server.Catalogue.ListLiterature (  ) 

Gets all literature.

Returns:
An array of LiteratureInfo structs with the information.

Definition at line 218 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.LiteratureTable.

Messages Server.Catalogue.DeleteLiterature ( int  id  ) 

Delete a specific instance of literature.

Parameters:
id The unique ID of the literature.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 234 of file Catalogue.cs.

References Server.Catalogue.data, Server.Catalogue.database, Server.Data.DataContainer.LiteratureTable, Server.Data.IPersistentData.SaveData(), and Server.Data.DataContainer.Tags.

Here is the call graph for this function:

LiteratureInfo Server.Catalogue.GetLiteratureInfo ( int  id  ) 

Get the information of a specific instance of literature.

Parameters:
id The unique ID of the literature.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 261 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.LiteratureTable.

Messages Server.Catalogue.UpdateLiterature ( LiteratureInfo  info  ) 

Updates a instance of the literature class.

Parameters:
info A LiteratureInfo struct containing information about the literature.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 274 of file Catalogue.cs.

References Shared.LiteratureInfo.author, Server.Catalogue.data, Shared.LiteratureInfo.id, Shared.LiteratureInfo.isbn, Server.Data.DataContainer.LiteratureTable, Shared.LiteratureInfo.source, Shared.LiteratureInfo.summary, Shared.LiteratureInfo.title, and Shared.LiteratureInfo.type.

Messages Server.Catalogue.CreateComment ( CommentInfo  ci,
out int  id 
)

Create a new comment and save it.

Parameters:
ci A CommentInfo struct with the comment information.
id The id the created comment got.
Returns:
A message telling whether the operation was succesfull or not.

Definition at line 299 of file Catalogue.cs.

References Server.Reference.Comments, Server.Data.DataContainer.CommentTable, Server.Catalogue.data, Shared.CommentInfo.date, Server.Catalogue.GetReference(), Shared.CommentInfo.id, Server.Data.DataContainer.LiteratureTable, Shared.CommentInfo.parent, Server.Data.DataContainer.PersonTable, Shared.CommentInfo.poster, Shared.CommentInfo.project, Shared.CommentInfo.text, Shared.CommentInfo.title, and Shared.CommentInfo.type.

Here is the call graph for this function:

CommentInfo [] Server.Catalogue.GetComments ( int  literatureID  ) 

Gets all comments for a specific instance of Literature.

Parameters:
literatureID The unique literature ID.
Returns:
An array with CommentInfo structs.

Definition at line 344 of file Catalogue.cs.

References Server.Catalogue.data, Server.Catalogue.GetAllComments(), and Server.Data.DataContainer.LiteratureTable.

Here is the call graph for this function:

CommentInfo [] Server.Catalogue.GetComments ( int  literatureID,
int  projectID 
)

Gets all comments for a specific reference.

Parameters:
literatureID The unique literature ID.
projectID The unique project ID.
Returns:
An array with CommentInfo structs.

Definition at line 365 of file Catalogue.cs.

References Server.Catalogue.GetAllComments(), and Server.Catalogue.GetReference().

Here is the call graph for this function:

ReviewInfo Server.Catalogue.GetReviewInfo ( int  project,
int  literature 
)

Get a information about a specific Review.

Parameters:
project ID of the project that contains the Review
literature ID of the literature the review refers to
Returns:
A ReviewInfo struct, which is empty if the reference was not found.

Definition at line 395 of file Catalogue.cs.

References Server.Catalogue.GetReference().

Here is the call graph for this function:

ReviewInfo [] Server.Catalogue.ListReviews ( int  project  ) 

Lists all Reviews in a project.

Parameters:
project ID of project containing reviews
Returns:
An array containing all Reviews in a project, or null if project did not exist.

Definition at line 413 of file Catalogue.cs.

References Server.Catalogue.data, Server.Data.DataContainer.LiteratureTable, and Server.Data.DataContainer.ProjectTable.

Messages Server.Catalogue.CreateReview ( ReviewInfo  ri  ) 

Creates a Review.

Parameters:
ri A ReviewInfo struct containing all information needed to create the review.
Returns:
Messages.OK on success, or Messages.Fail on failiure.

Definition at line 436 of file Catalogue.cs.

References Server.Reference.Comments, Server.Catalogue.data, Shared.ReviewInfo.date, Server.Catalogue.DeleteReference(), Server.Catalogue.GetReference(), Shared.ReviewInfo.literature, Server.Data.DataContainer.LiteratureTable, Shared.ReviewInfo.person, Server.Data.DataContainer.PersonTable, Shared.ReviewInfo.project, Server.Data.DataContainer.ProjectTable, Shared.ReviewInfo.rating, Shared.ReviewInfo.status, Shared.ReviewInfo.text, Shared.ReviewInfo.title, and Shared.ReviewInfo.used.

Here is the call graph for this function:

Messages Server.Catalogue.UpdateReview ( ReviewInfo  ri  ) 

Change content of a Review.

Parameters:
ri Updated information. The project and literature parts of the struct is used to identify the reference.
Returns:
Messages.OK on success, or Messages.Fail on failiure.

Definition at line 466 of file Catalogue.cs.

References Shared.ReviewInfo.date, Server.Reference.Date, Server.Catalogue.GetReference(), Shared.ReviewInfo.literature, Shared.ReviewInfo.project, Shared.ReviewInfo.rating, Server.Review.Rating, Shared.ReviewInfo.status, Server.Reference.Status, Shared.ReviewInfo.text, Server.Review.Text, Shared.ReviewInfo.title, Server.Review.Title, Shared.ReviewInfo.used, and Server.Reference.Used.

Here is the call graph for this function:

Messages Server.Catalogue.CreateReference ( ReferenceInfo  ri  ) 

Create a new reference between a literature and a project instance.

Parameters:
ri A ReferenceInfo struct with the supplied information.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 492 of file Catalogue.cs.

References Server.Catalogue.data, Shared.ReferenceInfo.date, Server.Catalogue.GetReference(), Shared.ReferenceInfo.literature, Server.Data.DataContainer.LiteratureTable, Shared.ReferenceInfo.project, Server.Data.DataContainer.ProjectTable, Shared.ReferenceInfo.status, and Shared.ReferenceInfo.used.

Here is the call graph for this function:

Messages Server.Catalogue.UpdateReference ( ReferenceInfo  ri  ) 

Update an existing reference.

Parameters:
ri A ReferenceInfo struct with the new information.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 511 of file Catalogue.cs.

References Shared.ReferenceInfo.date, Server.Reference.Date, Server.Catalogue.GetReference(), Shared.ReferenceInfo.literature, Shared.ReferenceInfo.project, Shared.ReferenceInfo.status, Server.Reference.Status, Shared.ReferenceInfo.used, and Server.Reference.Used.

Here is the call graph for this function:

Reference Server.Catalogue.GetReference ( int  project,
int  literature 
) [private]

Get a specific reference.

Parameters:
project The ID of the project in the reference.
literature The ID of the literature of the reference.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 528 of file Catalogue.cs.

References Server.Catalogue.data, and Server.Data.DataContainer.ProjectTable.

Referenced by Server.Catalogue.CreateComment(), Server.Catalogue.CreateReference(), Server.Catalogue.CreateReview(), Server.Catalogue.CreateSuggestion(), Server.Catalogue.DeleteReference(), Server.Catalogue.GetComments(), Server.Catalogue.GetReferenceInfo(), Server.Catalogue.GetReviewInfo(), Server.Catalogue.GetSuggestionInfo(), Server.Catalogue.UpdateReference(), Server.Catalogue.UpdateReview(), and Server.Catalogue.UpdateSuggestion().

Here is the caller graph for this function:

Messages Server.Catalogue.DeleteReference ( int  project,
int  literature 
)

Deletes a reference, review or suggestion.

Parameters:
project ID of the project that contains the refenrence
literature ID of the literature the reference refers to.
Returns:
Messages.OK if successful. Messages.Fail if not.

Definition at line 546 of file Catalogue.cs.

References Server.Catalogue.data, Server.Catalogue.GetReference(), Server.Data.DataContainer.LiteratureTable, and Server.Data.DataContainer.ProjectTable.

Referenced by Server.Catalogue.CreateReview(), Server.Catalogue.CreateSuggestion(), and Server.Catalogue.DeleteProject().

Here is the call graph for this function:

Here is the caller graph for this function:

ReferenceInfo Server.Catalogue.GetReferenceInfo ( int  project,
int  literature 
)

Gets a ReferenceInfo struct describing a Reference.

Parameters:
project ID of the project that contains the Reference
literature ID of the literature the reference refers to
Returns:
A ReferenceInfo struct, which is empty if the reference was not found.

Definition at line 562 of file Catalogue.cs.

References Server.Catalogue.GetReference().

Here is the call graph for this function:

ReferenceInfo [] Server.Catalogue.ListReferences ( int  project  ) 

Gets a list of all references in a project.

Parameters:
project ID of the project
Returns:
An array containing the References, or null if the project did not exists.

Definition at line 580 of file Catalogue.cs.

References Server.Catalogue.data, Server.Data.DataContainer.LiteratureTable, and Server.Data.DataContainer.ProjectTable.

Messages Server.Catalogue.CreateSuggestion ( SuggestionInfo  si  ) 

Create a new Suggestion.

Parameters:
si A SuggestionInfo containing information about the Suggestion.
Returns:
Messages.OK on success, or Messages.Fail on failiure.

Definition at line 608 of file Catalogue.cs.

References Server.Reference.Comments, Server.Catalogue.data, Shared.SuggestionInfo.date, Server.Catalogue.DeleteReference(), Server.Catalogue.GetReference(), Shared.SuggestionInfo.literature, Server.Data.DataContainer.LiteratureTable, Shared.SuggestionInfo.person, Server.Data.DataContainer.PersonTable, Shared.SuggestionInfo.project, Server.Data.DataContainer.ProjectTable, Shared.SuggestionInfo.reason, Shared.SuggestionInfo.status, and Shared.SuggestionInfo.used.

Here is the call graph for this function:

Messages Server.Catalogue.UpdateSuggestion ( SuggestionInfo  si  ) 

Updates a Suggestions content using a SuggestionInfo struct.

Parameters:
si Contains update information about a specific Suggestion identified using the project and literature parts of the SuggestionInfo
Returns:
Messages.OK on success, or Messages.Fail on failiure.

Definition at line 637 of file Catalogue.cs.

References Shared.SuggestionInfo.date, Server.Reference.Date, Server.Catalogue.GetReference(), Shared.SuggestionInfo.literature, Shared.SuggestionInfo.project, Shared.SuggestionInfo.reason, Server.Suggestion.Reason, Shared.SuggestionInfo.status, Server.Reference.Status, Shared.SuggestionInfo.used, and Server.Reference.Used.

Here is the call graph for this function:

SuggestionInfo Server.Catalogue.GetSuggestionInfo ( int  project,
int  literature 
)

Gets information about a specific Suggestion.

Parameters:
project ID of the project containing the Suggestion
literature ID of the literature the Suggestion refers to.
Returns:
A complete SuggestionInfo struct, or an empty one if the Suggestion was not found.

Definition at line 657 of file Catalogue.cs.

References Server.Catalogue.GetReference().

Here is the call graph for this function:

SuggestionInfo [] Server.Catalogue.ListSuggestions ( int  project  ) 

Lists all suggestion in a specific project.

Parameters:
project ID of the project whose Suggestions are to be listed.
Returns:
An array containing all Suggestions of a project, or null if project was not found.

Definition at line 675 of file Catalogue.cs.

References Server.Catalogue.data, Server.Data.DataContainer.LiteratureTable, and Server.Data.DataContainer.ProjectTable.

float Server.Catalogue.TermFrequency ( string  input,
string  query 
) [private]

Counts all occurences of a specific word in a string. (case-insensitive).

Parameters:
input String to be searched
query Word to search for.
Returns:
A float representing amount of times word was found.

Definition at line 704 of file Catalogue.cs.

Referenced by Server.Catalogue.TermFreq().

Here is the caller graph for this function:

float Server.Catalogue.WordCount ( string  input  )  [private]

Counts amount of words in a string.

Parameters:
input String whose words are to be counted.
Returns:
Amount of words in a string.

Definition at line 714 of file Catalogue.cs.

Referenced by Server.Catalogue.TermFreq().

Here is the caller graph for this function:

float Server.Catalogue.TermFreq ( string  title,
string  text,
string  query 
) [private]

Calculates tf–idf (term frequency–inverse document frequency) http://en.wikipedia.org/wiki/TFIDF Is weighted in two categories, when words are found in the title of an item, and when its found in the text.

Parameters:
title Title of an item
text Text of an item
query Word to search for
Returns:
A weighted value.

Definition at line 729 of file Catalogue.cs.

References Server.Catalogue.TermFrequency(), and Server.Catalogue.WordCount().

Referenced by Server.Catalogue.Search().

Here is the call graph for this function:

Here is the caller graph for this function:

List<SearchResult> Server.Catalogue.Search ( string  query,
ResultType  searchTypes 
)

Search through database using a text query.

Parameters:
query String to search for.
searchTypes A flag representing the kinds of return data wanted. Eg: "ResultType.Project | ResultType.Literature" returns all projects and literature which match the query.
Returns:
A list containing all search results.

Definition at line 751 of file Catalogue.cs.

References Server.Catalogue.data, Server.Data.DataContainer.LiteratureTable, and Server.Catalogue.TermFreq().

Here is the call graph for this function:

ISearchable [] Server.Catalogue.ListItems ( ResultType  type  ) 

Lists all Items of the requested type. Listable types are Project, Person and Literature. (See ResultType).

Parameters:
type Which types to list.
Returns:
A list of all items of the specificed type.

Definition at line 852 of file Catalogue.cs.

Referenced by Server.ServerConsole.ListAllUsers().

Here is the caller graph for this function:

ISearchable [] Server.Catalogue.ListItems ( ResultType  type,
string  creator 
)

Lists all Items of the requested type. Listable types are Project, Person and Literature. (See ResultType).

Parameters:
type Which types to list.
creator Which person's items to show.
Returns:
A list of all items of the specificed type.

Definition at line 882 of file Catalogue.cs.

List<SearchResult> Server.Catalogue.SearchByTag ( string  tag  ) 

Returns all items which contains a specific tag.

Parameters:
tag A string with the name of a tag.
Returns:
A list with found elements.

Definition at line 911 of file Catalogue.cs.

TagInfo [] Server.Catalogue.GetTags ( string  tag,
int  id,
string  username 
)

A search function for tags.

Parameters:
tag A specific tag.
id A specific id.
username A specific username.
Returns:
An array of TagInfo structs.

Definition at line 1011 of file Catalogue.cs.

Messages Server.Catalogue.AddTag ( string  tag,
int  id,
string  username 
)

Add a new tag to a specific item.

Parameters:
tag The name of the tag. Must not be null.
id The unique id of the item. An int.
username The username of the person who adds the tag. Must not be null.
Returns:
A message telling whether the operation was succesfull.

Definition at line 1040 of file Catalogue.cs.

Messages Server.Catalogue.RemoveTag ( string  tag,
int  id,
string  username 
)

Remove a specific tag from an item.

Parameters:
tag The name of the tag to be removed.
id The id of the item the tag is attached to.
username The username of the person who tries to remove the tag.
Returns:
A message telling whether the operation was succesfull.

Definition at line 1065 of file Catalogue.cs.

int Server.Catalogue.CalcUniqueTags (  )  [private]

Gets amount of unique tag names in the tags table.

Returns:
Amount of unique tag names in the tags table

Definition at line 1088 of file Catalogue.cs.

Messages Server.Catalogue.RegisterUser ( string  user,
string  password,
string  name,
string  department,
string  email 
)

Create a new user in the system.

Parameters:
user The desired username.
password The users password.
name The real name of the user.
department The users department.
email The users email address.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 1118 of file Catalogue.cs.

References Server.Person.UserName.

Person Server.Catalogue.GetUser ( string  user  ) 

Get a specific user in the system.

Parameters:
user The users unique username.
Returns:
The instance of the Person class which matches the username.

Definition at line 1136 of file Catalogue.cs.

Referenced by Server.ServerConsole.AddModerator(), Server.Catalogue.CreateProject(), and Server.ServerConsole.RemoveModerator().

Here is the caller graph for this function:

PersonInfo Server.Catalogue.GetPersonInfo ( string  username  ) 

Get a specific info of a specific user.

Parameters:
username The username of the user.
Returns:
A PersonInfo struct with the user information.

Definition at line 1148 of file Catalogue.cs.

Messages Server.Catalogue.UpdatePerson ( PersonInfo  pi  ) 

Updates an existing instance of Person.

Parameters:
pi A PersonInfo struct containing the new information.
Returns:
A message telling whether the operation was succesfull.

Definition at line 1162 of file Catalogue.cs.

References Shared.PersonInfo.department, Shared.PersonInfo.email, Shared.PersonInfo.name, Shared.PersonInfo.password, and Shared.PersonInfo.username.

RoleInfo [] Server.Catalogue.GetRoles ( int  id  ) 

Get all roles in a specific project.

Parameters:
id A unique Project ID.
Returns:
An array of RoleInfo structs

Definition at line 1186 of file Catalogue.cs.

Messages Server.Catalogue.AssignUser ( string  username,
int  project,
RoleType  role 
)

Assign a user to a project.

Parameters:
username A string with a username
project The project to be assigned to.
role The users new role in the project.
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 1204 of file Catalogue.cs.

Messages Server.Catalogue.UnassignUser ( string  username,
int  project 
)

Remove a user from a project.

Parameters:
username The username of the user.
project The project ID
Returns:
A message telling whether or not the operation was succesfull.

Definition at line 1218 of file Catalogue.cs.

Role Server.Catalogue.GetRole ( int  project,
string  username 
)

Get a specific persons role in a specific project.

Parameters:
project The id of the project.
username The username of the person.
Returns:
The matching instance of Role.

Definition at line 1234 of file Catalogue.cs.

StatisticsInfo Server.Catalogue.GetStatistics (  ) 

Gets some amount information about the catalogue. Number of people, projects, unique tags, tag hits and literature.

Returns:
Filled StatisticsInfo struct

Definition at line 1249 of file Catalogue.cs.


The documentation for this class was generated from the following file:
Generated on Thu Dec 21 06:24:53 2006 for SCRAML by  doxygen 1.5.1-p1