60
A Personalized Ontology Model for Web Information Gathering

Personalized ontology model document

Embed Size (px)

DESCRIPTION

Data Mining project

Citation preview

A Personalized Ontology Model for

A Personalized Ontology Model forWeb Information Gathering

Abstract:

As a model for knowledge description and formalization, ontologies are widely used to represent user profiles in personalized web information gathering. However, when representing user profiles, many models have utilized only knowledge from either a global knowledge base or a user local information. In this paper, a personalized ontology model is proposed for knowledge representation and reasoning over user profiles. This model learns ontological user profiles from both a world knowledge base and user local instance repositories. The ontology model is evaluated by comparing it against benchmark models in web information gathering. The results show that this ontology model is successful.

Index Terms:

Ontology, personalization, semantic relations, world knowledge, local instance repository, user profiles, web information gathering.

Existing System:

Current web information gathering systems attempt to satisfy user requirements by capturing their information needs. For this purpose, user profiles are created for user background knowledge description

User profiles represent the concept models possessed by users when gathering web information. A concept model is implicitly possessed by users and is generated from their background knowledge.Proposed System:

We can hypothesize that user background knowledge can be better discovered and represented if we can integrate global and local analysis within a hybrid model. The knowledge formalized in a global knowledge base will constrain the background knowledge discovery from the user local information. Such a personalized ontology model should produce a superior representation of user profiles for web information gathering.

An ontology model to evaluate this hypothesis is proposed. This model simulates users concept models by using personalized ontologies, and attempts to improve web information gathering performance by using ontological user profiles. The world knowledge and a users local instance repository (LIR) are used in the proposed model.

World knowledge is commonsense knowledge acquired by people from experience and education; an LIR is a users personal collection of information items. From a world knowledge base, we construct personalized ontologies by adopting user feedback on interesting knowledge. A multidimensional ontology mining method, Specificity and Exhaustivity, is also introduced in the proposed model for analyzing concepts specified in ontologies.

Modules: Personalized Ontology Semantic relations World knowledge Local instance repository User Profiles Web information gathering

Personalized Ontology:

A personalized ontology model is proposed for knowledge representation and reasoning over user profiles. This model learns ontological user profiles from both a world knowledge base and user local instance repositories. The ontology model is evaluated by comparing it against benchmark models in web information gathering.A knowledge description and formalization model is utilized in personalized web information gathering. Such ontologies are called ontological user profiles or personalized ontologies.

Semantic Relation:

Ontology is then constructed for the given topic using these users fed back subjects. The structure of the ontology is based on the semantic relations linking these subjects in the World Knowledge Based. Ontology mining discovers interesting and on-topic knowledge from the concepts, semantic relations, and instances in ontology.

World Knowledge:

The semantic specificity is investigated based on the structure of inherited from the world knowledge base. The strength of such a focus is influenced by the subjects locality in the taxonomic structure. The world knowledge base provides the taxonomic structure for the personalized ontology.

Local instance repository:

The user background knowledge is discovered from the user local instance repository. Against the given topic, the specificity and exhaustively of subjects are investigated for user background knowledge discovery.

LIR is a users personal collection of information items. From a world knowledge base, we construct personalized ontologies by adopting user feedback on interesting knowledge. A multidimensional ontology mining method, Specificity and Exhaustively, is also introduced in the proposed model for analyzing concepts specified in ontologies. The users LIRs are then used to discover background knowledge and to populate the personalized ontologies.

User Profiles:

User profiles were used in web information gathering to interpret the semantic meanings of queries and capture user information needs. User profiles by a ranked local set of categories, and then utilized web pages to personalize search results for a user. These works attempted to acquire user profiles in order to discover user background knowledge.

Web information gathering:

The research contributes to knowledge engineering, and has the potential to improve the design of personalized web information gathering systems. The contributions are original and increasingly significant, considering the rapid explosion of web information and the growing accessibility of online documents.

The information gathering system, IGS, was designed for common use by all experimental models.

Hardware CONFIGURATION1. Hard disk: 40 GB1. RAM:512mb1. Processor:Pentium IV1. Monitor :17Color Monitor

Software CONFIGURATION0. Front End : Visual Studio 2008Language: C# 0. Operating System :Windows XP, Windows 070. Back End : SQL Server 2005

E-R DIAGRAM:

ADMINLoginUser StatusFile UploadUser NamePasswordUserDownloadAccessLoginUser NamePassword

Data Flow Diagram:

Is AdminIs RightLoginIs UploadUpload FileIs ViewStatusUser StatusCreate New UserLoginViewDownload FileIf DownloadAccessIs Right UserstopstartYesNoYesNoNoYesYesNoYesNoYesNo

DATABASE:

CREATE TABLE DOWNLOAD (ID INT NOT NULL, USERID VARCHAR(20) NULL, FILENAME VARCHAR(500) NULL, FILEPATH VARCHAR(MAX) NULL, DATE DATETIME NULL)

CREATE TABLE USERLOGIN (SNO INT IDENTITY(1,1) NOT NULL, USERID VARCHAR(10) NULL, USERNAME VARCHAR(100) NULL, PASSWORD VARCHAR(20) NULL, RIGHTS VARCHAR(30) NULL)

CREATE TABLE FILECREATION (FILEPATH VARCHAR(500) NULL, FILENAME VARCHAR(MAX) NULL)

LANGAUGE SPECIFICATION

features OF. netMicrosoft .NET is a set of Microsoft software technologies for rapidly building and integrating XML Web services, Microsoft Windows-based applications, and Web solutions. The .NET Framework is a language-neutral platform for writing programs that can easily and securely interoperate. Theres no language barrier with .NET: there are numerous languages available to the developer including Managed C++, C#, Visual Basic and Java Script. The .NET framework provides the foundation for components to interact seamlessly, whether locally or remotely on different platforms. It standardizes common data types and communications protocols so that components created in different languages can easily interoperate. .NET is also the collective name given to various software components built upon the .NET platform. These will be both products (Visual Studio.NET and Windows.NET Server, for instance) and services (like Passport, .NET My Services, and so on).THE .NET FRAMEWORKThe .NET Framework has two main parts:1. The Common Language Runtime (CLR).2. A hierarchical set of class libraries.

The CLR is described as the execution engine of .NET. It provides the environment within which programs run. The most important features are Conversion from a low-level assembler-style language, called Intermediate Language (IL), into code native to the platform being executed on. Memory management, notably including garbage collection. Checking and enforcing security restrictions on the running code. Loading and executing programs, with version control and other such features. The following features of the .NET framework are also worth description:

Managed Code The code that targets .NET, and which contains certain extraInformation - metadata - to describe itself. Whilst both managed and unmanaged code can run in the runtime, only managed code contains the information that allows the CLR to guarantee, for instance, safe execution and interoperability.

Managed Data With Managed Code comes Managed Data. CLR provides memory allocation and Deal location facilities, and garbage collection. Some .NET languages use Managed Data by default, such as C#, Visual Basic.NET and JScript.NET, whereas others, namely C++, do not. Targeting CLR can, depending on the language youre using, impose certain constraints on the features available. As with managed and unmanaged code, one can have both managed and unmanaged data in .NET applications - data that doesnt get garbage collected but instead is looked after by unmanaged code.Common Type System The CLR uses something called the Common Type System (CTS) to strictly enforce type-safety. This ensures that all classes are compatible with each other, by describing types in a common way. CTS define how types work within the runtime, which enables types in one language to interoperate with types in another language, including cross-language exception handling. As well as ensuring that types are only used in appropriate ways, the runtime also ensures that code doesnt attempt to access memory that hasnt been allocated to it.

Common Language Specification The CLR provides built-in support for language interoperability. To ensure that you can develop managed code that can be fully used by developers using any programming language, a set of language features and rules for using them called the Common Language Specification (CLS) has been defined. Components that follow these rules and expose only CLS features are considered CLS-compliant.THE CLASS LIBRARY.NET provides a single-rooted hierarchy of classes, containing over 7000 types. The root of the namespace is called System; this contains basic types like Byte, Double, Boolean, and String, as well as Object. All objects derive from System. Object. As well as objects, there are value types. Value types can be allocated on the stack, which can provide useful flexibility. There are also efficient means of converting value types to object types if and when necessary.

The set of classes is pretty comprehensive, providing collections, file, screen, and network I/O, threading, and so on, as well as XML and database connectivity.The class library is subdivided into a number of sets (or namespaces), each providing distinct areas of functionality, with dependencies between the namespaces kept to a minimum. LANGUAGES SUPPORTED BY .NETThe multi-language capability of the .NET Framework and Visual Studio .NET enables developers to use their existing programming skills to build all types of applications and XML Web services. The .NET framework supports new versions of Microsofts old favorites Visual Basic and C++ (as VB.NET and Managed C++), but there are also a number of new additions to the family.Visual Basic .NET has been updated to include many new and improved language features that make it a powerful object-oriented programming language. These features include inheritance, interfaces, and overloading, among others. Visual Basic also now supports structured exception handling, custom attributes and also supports multi-threading. Visual Basic .NET is also CLS compliant, which means that any CLS-compliant language can use the classes, objects, and components you create in Visual Basic .NET.Managed Extensions for C++ and attributed programming are just some of the enhancements made to the C++ language. Managed Extensions simplify the task of migrating existing C++ applications to the new .NET Framework.C# is Microsofts new language. Its a C-style language that is essentially C++ for Rapid Application Development. Unlike other languages, its specification is just the grammar of the language. It has no standard library of its own, and instead has been designed with the intention of using the .NET libraries as its own. Microsoft Visual J# .NET provides the easiest transition for Java-language developers into the world of XML Web Services and dramatically improves the interoperability of Java-language programs with existing software written in a variety of other programming languages. Active State has created Visual Perl and Visual Python, which enable .NET-aware applications to be built in either Perl or Python. Both products can be integrated into the Visual Studio .NET environment. Visual Perl includes support for Active States Perl Dev Kit.Other languages for which .NET compilers are available include FORTRAN COBOL Eiffel Fig1 .Net Framework

ASP.NET XML WEB SERVICES Windows Forms

Base Class Libraries

Common Language Runtime

Operating System

C#.NET is also compliant with CLS (Common Language Specification) and supports structured exception handling. CLS is set of rules and constructs that are supported by the CLR (Common Language Runtime). CLR is the runtime environment provided by the .NET Framework; it manages the execution of the code and also makes the development process easier by providing services. C#.NET is a CLS-compliant language. Any objects, classes, or components that created in C#.NET can be used in any other CLS-compliant language. In addition, we can use objects, classes, and components created in other CLS-compliant languages in C#.NET .The use of CLS ensures complete interoperability among applications, regardless of the languages used to create the application.CONSTRUCTORS AND DESTRUCTORS: Constructors are used to initialize objects, whereas destructors are used to destroy them. In other words, destructors are used to release the resources allocated to the object. In C#.NET the sub finalize procedure is available. The sub finalize procedure is used to complete the tasks that must be performed when an object is destroyed. The sub finalize procedure is called automatically when an object is destroyed. In addition, the sub finalize procedure can be called only from the class it belongs to or from derived classes.GARBAGE COLLECTION Garbage Collection is another new feature in C#.NET. The .NET Framework monitors allocated resources, such as objects and variables. In addition, the .NET Framework automatically releases memory for reuse by destroying objects that are no longer in use. In C#.NET, the garbage collector checks for the objects that are not currently in use by applications. When the garbage collector comes across an object that is marked for garbage collection, it releases the memory occupied by the object.

OVERLOADINGOverloading is another feature in C#. Overloading enables us to define multiple procedures with the same name, where each procedure has a different set of arguments. Besides using overloading for procedures, we can use it for constructors and properties in a class.

MULTITHREADING:C#.NET also supports multithreading. An application that supports multithreading can handle multiple tasks simultaneously, we can use multithreading to decrease the time taken by an application to respond to user interaction. STRUCTURED EXCEPTION HANDLING C#.NET supports structured handling, which enables us to detect and remove errors at runtime. In C#.NET, we need to use TryCatchFinally statements to create exception handlers. Using TryCatchFinally statements, we can create robust and effective exception handlers to improve the performance of our application.THE .NET FRAMEWORK The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet. Objectives of. NET FRAMEWORK1. To provide a consistent object-oriented programming environment whether object codes is stored and executed locally on Internet-distributed, or executed remotely.2. To provide a code-execution environment to minimizes software deployment and guarantees safe execution of code.3. Eliminates the performance problems. There are different types of application, such as Windows-based applications and Web-based applications

SYSTEM TESTING AND MAINTENANCE

Testing is vital to the success of the system. System testing makes a logical assumption that if all parts of the system are correct, the goal will be successfully achieved. In the testing process we test the actual system in an organization and gather errors from the new system operates in full efficiency as stated. System testing is the stage of implementation, which is aimed to ensuring that the system works accurately and efficiently. In the testing process we test the actual system in an organization and gather errors from the new system and take initiatives to correct the same. All the front-end and back-end connectivity are tested to be sure that the new system operates in full efficiency as stated. System testing is the stage of implementation, which is aimed at ensuring that the system works accurately and efficiently. The main objective of testing is to uncover errors from the system. For the uncovering process we have to give proper input data to the system. So we should have more conscious to give input data. It is important to give correct inputs to efficient testing. Testing is done for each module. After testing all the modules, the modules are integrated and testing of the final system is done with the test data, specially designed to show that the system will operate successfully in all its aspects conditions. Thus the system testing is a confirmation that all is correct and an opportunity to show the user that the system works. Inadequate testing or non-testing leads to errors that may appear few months later. This will create two problemsTime delay between the cause and appearance of the problem. The effect of the system errors on files and records within the system. The purpose of the system testing is to consider all the likely variations to which it will be suggested and push the system to its limits. The testing process focuses on logical intervals of the software ensuring that all the statements have been tested and on the function intervals (i.e.,) conducting tests to uncover errors and ensure that defined inputs will produce actual results that agree with the required results. Testing has to be done using the two common steps Unit testing and Integration testing. In the project system testing is made as follows:The procedure level testing is made first. By giving improper inputs, the errors occurred are noted and eliminated. This is the final step in system life cycle. Here we implement the tested error-free system into real-life environment and make necessary changes, which runs in an online fashion. Here system maintenance is done every months or year based on company policies, and is checked for errors like runtime errors, long run errors and other maintenances like table verification and reports.UNIT TESTING Unit testing verification efforts on the smallest unit of software design, module. This is known as Module Testing. The modules are tested separately. This testing is carried out during programming stage itself. In these testing steps, each module is found to be working satisfactorily as regard to the expected output from the module.INTEGRATION TESTING Integration testing is a systematic technique for constructing tests to uncover error associated within the interface. In the project, all the modules are combined and then the entire programmer is tested as a whole. In the integration-testing step, all the error uncovered is corrected for the next testing steps.

SYSTEM IMPLEMENTATION

Implementation is the stage of the project when the theoretical design is turned out into a working system. Thus it can be considered to be the most critical stage in achieving a successful new system and in giving the user, confidence that the new system will work and be effective. The implementation stage involves careful planning, investigation of the existing system and its constraints on implementation, designing of methods to achieve changeover and evaluation of changeover methods. Implementation is the process of converting a new system design into operation. It is the phase that focuses on user training, site preparation and file conversion for installing a candidate system. The important factor that should be considered here is that the conversion should not disrupt the functioning of the organization.

SCOPE FOR FUTURE ENHANCEMENTS The project has covered almost all the requirements. Further requirements and improvements can easily be done since the coding is mainly structured or modular in nature. Improvements can be appended by changing the existing modules or adding new modules.

Screen Shots:

Upload:

User Profile:

Database Connectivity:

using System;using System.Data;using System.Configuration;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;

/// /// Summary description for Data_access/// public class Data_access{ public SqlConnection con;public Data_access(){//// TODO: Add constructor logic here//} public void Connection() { con = new SqlConnection("server=SUNZHINE01;initial catalog=Ontology; user id=sa;password=sa123"); con.Open(); }}

Sample Coding:

susing System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;using System.IO;

public partial class Admin : System.Web.UI.Page{ Data_access obj = new Data_access(); static string filepath; static string thisdir; string filepath1; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Label2.Text = Request.QueryString["name"]; filepath = Label2.Text; thisdir = Server.MapPath("."); if (Directory.Exists(thisdir +"\\"+ filepath) == false) { Directory.CreateDirectory(thisdir +"\\"+ filepath);

} } } protected void Button1_Click(object sender, EventArgs e) { string filename=""; string newfilename = FileUpload1.FileName; newfilename = newfilename.Replace(" ", "_"); obj.Connection(); string Query="select filename from filecreation where filepath='"+filepath+"'"; SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { filename = Convert.ToString(dr[0]); } dr.Close(); filename = filename + " " + newfilename; string Query1 = "update filecreation set filename='" + filename + "' where filepath='" + filepath + "'"; SqlCommand cmd1 = new SqlCommand(Query1, obj.con); cmd1.ExecuteNonQuery(); FileUpload1.SaveAs(thisdir+"\\"+filepath+"\\"+newfilename); Response.Write("alert('saved..')"); } protected void LinkButton5_Click(object sender, EventArgs e) { Session["userid"] = null; Session["username"] = null; Session["rights"] = null; Response.Redirect("Login.aspx"); }}

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;

public partial class CreateNewAdmin : System.Web.UI.Page{ Data_access obj = new Data_access(); protected void Page_Load(object sender, EventArgs e) { obj.Connection(); string Query = "getuserid"; SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { TextBox1.Text = Convert.ToString(dr[0]); } obj.con.Close(); } protected void Button1_Click(object sender, EventArgs e) { obj.Connection(); string Query = "insert into userlogin(userid,username,password,rights) values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','Admin')"; SqlCommand cmd = new SqlCommand(Query, obj.con); cmd.ExecuteNonQuery(); Response.Write("alert('inserted..');window.location='Adminmain.aspx';"); obj.con.Close(); } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("Adminmain.aspx"); }}

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page{ Data_access obj = new Data_access(); protected void Page_Load(object sender, EventArgs e) {

} protected void LinkButton5_Click(object sender, EventArgs e) { obj.Connection(); string Query = "select username,rights from userlogin where userid='" + TextBox1.Text + "' and password='"+TextBox2.Text+"'"; SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { Session["usrid"] = TextBox1.Text; Session["username"] = Convert.ToString(dr[0]); Session["rights"] = Convert.ToString(dr[1]); if (Convert.ToString(dr[1]) == "Admin") { Response.Write("alert('Succeed...');window.location='Adminmain.aspx'"); } else { Response.Write("alert('Succeed...');window.location='Main.aspx'"); } } else { Response.Write("alert('failed')"); }

} protected void LinkButton6_Click(object sender, EventArgs e) { Response.Redirect("Registration.aspx"); }}

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient; public partial class Main : System.Web.UI.Page{ Data_access obj = new Data_access(); string rights; protected void Page_Load(object sender, EventArgs e) {

Label2.Text = Session["username"].ToString(); rights = Session["rights"].ToString(); TreeView1.Nodes.Clear(); TreeNode root = new TreeNode(); root.Text = "Root"; this.TreeView1.Nodes.Add(root);

TreeNode node1 = new TreeNode(); node1.Text = "Industrial Espionage"; this.TreeView1.Nodes[0].ChildNodes.Add(node1);

TreeNode node11 = new TreeNode(); node11.Text = "Business Intelligence"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes.Add(node11);

TreeNode node111 = new TreeNode(); node111.Text = "Business Ethics"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node111);

TreeNode node1111=new TreeNode(); node1111.Text="professional Ehtics"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node1111);

TreeNode node11111 = new TreeNode(); node11111.Text = "Ethics"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node11111);

TreeNode node112 = new TreeNode(); node112.Text = "Competition Unfair"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112);

TreeNode node1121 = new TreeNode(); node1121.Text = "Commercial crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes.Add(node1121);

TreeNode node11211 = new TreeNode(); node11211.Text = "Crime"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes.Add(node11211);

TreeNode node112111 = new TreeNode(); node112111.Text = "Rural Crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112111);

TreeNode node112112 = new TreeNode(); node112112.Text = "Reading Disability and crime"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112112);

TreeNode node112113 = new TreeNode(); node112113.Text = "Sex Crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112113);

TreeNode node112114 = new TreeNode(); node112114.Text = "Hate Crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112114);

TreeNode node112115 = new TreeNode(); node112115.Text = "Employee Crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112115);

TreeNode node112116 = new TreeNode(); node112116.Text = "Transnational Crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112116);

TreeNode node112117 = new TreeNode(); node112117.Text = "Parapsycology and Crimes"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112117);

TreeNode node112118 = new TreeNode(); node112118.Text = "People with Disabilities and crime"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112118);

TreeNode node112119 = new TreeNode(); node112119.Text = "Organised crime"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node112119);

TreeNode node1122 = new TreeNode(); node1122.Text = "Commercial Law"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes.Add(node1122);

TreeNode node1123 = new TreeNode(); node1123.Text = "Industrial Property"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes.Add(node1123);

TreeNode node1124 = new TreeNode(); node1124.Text = "Torts"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes[1].ChildNodes.Add(node1124);

TreeNode node113 = new TreeNode(); node113.Text = "Industrial Management"; this.TreeView1.Nodes[0].ChildNodes[0].ChildNodes[0].ChildNodes.Add(node113);

TreeView2.Nodes.Clear(); TreeNode sroot = new TreeNode(); sroot.Text = "Root"; this.TreeView2.Nodes.Add(sroot);

TreeNode snode1 = new TreeNode(); snode1.Text = "Ethics"; this.TreeView2.Nodes[0].ChildNodes.Add(snode1);

TreeNode snode2 = new TreeNode(); snode2.Text = "Crime"; this.TreeView2.Nodes[0].ChildNodes.Add(snode2);

TreeNode snode21 = new TreeNode(); snode21.Text = "Rural Crimes"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode21);

TreeNode snode22 = new TreeNode(); snode22.Text = "Reading Disability and crime"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode22);

TreeNode snode23 = new TreeNode(); snode23.Text = "Sex crimes"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode23);

TreeNode snode24 = new TreeNode(); snode24.Text = "Hate crimes"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode24);

TreeNode snode25 = new TreeNode(); snode25.Text = "Employee crimes"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode25);

TreeNode snode26 = new TreeNode(); snode26.Text = "Transnational crimes"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode26);

TreeNode snode27 = new TreeNode(); snode27.Text = "Parapsycology and crimes"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode27);

TreeNode snode28 = new TreeNode(); snode28.Text = "People with Disabilities and crime"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode28);

TreeNode snode29 = new TreeNode(); snode29.Text = "Organised crime"; this.TreeView2.Nodes[0].ChildNodes[1].ChildNodes.Add(snode29); }

protected void TreeView2_SelectedNodeChanged(object sender, EventArgs e) { string name = TreeView2.SelectedNode.ValuePath; string path = ""; name = name.Substring(name.LastIndexOf("/") + 1); if (rights != "Admin") { string Query = "select filepath from filecreation where filepath like '%" + name + "'"; obj.Connection(); SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { path = Convert.ToString(dr[0]); Response.Redirect("files.aspx?name=" + path); //dr.Close(); } else { Response.Write("alert('set path')"); } } else { string Query = "select filepath from filecreation where filepath like '%" + name + "'"; obj.Connection(); SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { path = Convert.ToString(dr[0]); Response.Redirect("admin.aspx?name=" + path); dr.Close(); } else { Response.Write("alert('Set path')"); } } } protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { string name = TreeView1.SelectedNode.ValuePath; if (rights != "Admin") { string Query = "select * from filecreation where filepath= '" + name + "'"; obj.Connection(); SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { Response.Redirect("files.aspx?name=" + name); dr.Close(); } else { dr.Close(); SqlCommand cmd1 = new SqlCommand("insert into filecreation(filepath) values('" + name + "')", obj.con); cmd1.ExecuteNonQuery(); Response.Redirect("files.aspx?name=" + name); } } else { string Query = "select * from filecreation where filepath='" + name + "'"; obj.Connection(); SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { Response.Redirect("admin.aspx?name=" + name); dr.Close(); } else { dr.Close(); SqlCommand cmd1 = new SqlCommand("insert into filecreation(filepath) values('" + name + "')", obj.con); cmd1.ExecuteNonQuery(); Response.Redirect("admin.aspx?name=" + name); } } } protected void LinkButton5_Click(object sender, EventArgs e) { Session["usrid"] = null; Response.Redirect("Login.aspx"); }}

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;

public partial class Registration : System.Web.UI.Page{ Data_access obj = new Data_access(); protected void Page_Load(object sender, EventArgs e) { obj.Connection(); string Query="getuserid"; SqlCommand cmd = new SqlCommand(Query, obj.con); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { TextBox1.Text = Convert.ToString(dr[0]); } obj.con.Close();

} protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("Login.aspx"); } protected void Button1_Click(object sender, EventArgs e) { obj.Connection(); string Query = "insert into userlogin(userid,username,password,rights) values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','User')"; SqlCommand cmd = new SqlCommand(Query, obj.con); cmd.ExecuteNonQuery(); Response.Write("alert('inserted..');window.location='Login.aspx';"); obj.con.Close();

}}

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;

public partial class UserProfile : System.Web.UI.Page{ Data_access obj = new Data_access(); LinkButton link1 = new LinkButton(); protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) Bind();

}

public void Bind() { obj.Connection(); SqlDataAdapter da = new SqlDataAdapter("Select userid,username from userlogin where rights='User'", obj.con); DataSet ds = new DataSet(); da.Fill(ds, "Userlogin"); GridView1.DataSource = ds; GridView1.DataBind(); int i=0; foreach (GridViewRow row1 in GridView1.Rows) { link1 = (LinkButton)GridView1.Rows[row1.RowIndex].Cells[0].FindControl("link1"); link1.Text = ds.Tables[0].Rows[i].ItemArray[0].ToString(); GridView1.Rows[row1.RowIndex].Cells[1].Text = ds.Tables[0].Rows[i].ItemArray[1].ToString(); i++; } }

protected void Link1_Click(object sender, EventArgs e) { GridViewRow clickedrow = ((LinkButton)sender).NamingContainer as GridViewRow; LinkButton lin=(LinkButton)clickedrow.FindControl("Link1"); string Userid=lin.Text;

obj.Connection(); SqlDataAdapter da = new SqlDataAdapter("select filename as Filename,filepath as Path,Convert(varchar,date,103) as Date from download where userid='" + Userid + "'", obj.con); DataSet ds = new DataSet(); da.Fill(ds, "download"); GridView2.DataSource = ds; GridView2.DataBind(); Bind(); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Response.Write("insert"); } protected void LinkButton5_Click(object sender, EventArgs e) { Session["Usrid"] = null; Session["username"] = null; Session["rights"] = null; Response.Redirect("Login.aspx"); }}

ssssssssREFERENCES:

[1] R. Baeza-Yates and B. Ribeiro-Neto, Modern Information Retrieval. Addison Wesley, 1999.

[2] G.E.P. Box, J.S. Hunter, and W.G. Hunter, Statistics For Experimenters. John Wiley & Sons, 2005.

[3] C. Buckley and E.M. Voorhees, Evaluating Evaluation Measure Stability, Proc. ACM SIGIR 00, pp. 33-40, 2000.

[4] Z. Cai, D.S. McNamara, M. Louwerse, X. Hu, M. Rowe, and A.C. Graesser, NLS: A Non-Latent Similarity Algorithm, Proc. 26th Ann. Meeting of the Cognitive Science Soc. (CogSci 04), pp. 180-185, 2004.

[5] L.M. Chan, Library of Congress Subject Headings: Principle and Application. Libraries Unlimited, 2005.

[6] P.A. Chirita, C.S. Firan, and W. Nejdl, Personalized Query Expansion for the Web, Proc. ACM SIGIR (07), pp. 7-14, 2007.

[7] R.M. Colomb, Information Spaces: The Architecture of Cyberspace. Springer, 2002.

[8] A. Doan, J. Madhavan, P. Domingos, and A. Halevy, Learning to Map between Ontologies on the Semantic Web, Proc. 11th Intl Conf. World Wide Web (WWW 02), pp. 662-673, 2002.

[9] D. Dou, G. Frishkoff, J. Rong, R. Frank, A. Malony, and D. Tucker, Development of Neuroelectromagnetic Ontologies(NEMO): A Framework for Mining Brainwave Ontologies, Proc. ACM SIGKDD (07), pp. 270-279, 2007.