Views
5 years ago

DataKnowledgeEngJour.. - School of Computing

DataKnowledgeEngJour.. - School of Computing

Each function group

Each function group of wrappers is implemented as a public Java class; they extend the JESS Userpackage class. The various wrapper functions are created as private classes and added into the JESS inference engine. Sample code: public class ExprFunctions implements Userpackage { public void Add(Rete engine) { engine.AddUserfunction(new exprRemoveStop()); engine.AddUserfunction(new exprStem()); : : } } The above code shows how the class ExprFunctions implements the group of wrapper functions for the Expression Module. Other groups are implemented similarly. Each wrapper function is implemented as a private class extending from the JESS Userfunction class. The latter contains a private attribute _name to store the name the programmer use for invoking the function in the JESS script. The public method Call is then used to define the operations to be performed when the function is called in the JESS script. Sample code: class exprRemoveStop implements Userfunction { Expression ex = new Expression(); int _name = RU.putAtom( "exprRemoveStop" ); public int name() { return _name; } } public Value Call(ValueVector vv, Context context) throws ReteException { String expr = ""; } if ((vv.size() == 2) && (vv.get(1).type() == RU.STRING)) { expr = vv.get(1).StringValue(); expr = ex.removeStop(expr); } return new Value(expr, RU.STRING); 21

This code shows how the class ExprRemoveStop is used to wrap the Java function expr.RemoveStop of the Expression Module into the JESS function exprRemoveStop. All other Java functions are wrapped in the same way. e. Network Interface Module This module sets up the connection between the client and the proxy. Search requests issued by the client are submitted to the proxy through this module. The search result as returned by the proxy is collected by this module before it is displayed to the user. All networking functions are implemented via the Socket class in Java. 3.4 Proxy Modules Design and Implementation a. Proxy Controller Module As the name implies, this module controls all the activities and transactions that are carried out in the proxy. It accepts connections from E-Referencer client applets, and establishes connection with the selected Z39.50 server on behalf of the clients. The Z39.50 Interface module is invoked for the connection. If a client applet requests for subject headings that are associated with the keywords it submits, the Keyword-Subject Association Module will be invoked by the controller to retrieve the relevant subject headings. If logging is required at a later stage, it can be implemented in this module since this module handles all transactions. The Proxy Control Module is implemented using Java Threads. When the proxy starts up, a controller thread is created to listen to client requests. Each time a new client’s connection request is received, the controller thread would instantiate two new threads to handle all future requests from that client. One thread will handle all activities between the client and the proxy while the other thread will handle all activities between the proxy and the Z39.50 server the client is connecting to. With two separate threads, there is continuous communication since the blockage of one communication channel will not affect the other. When the connection to the client dies, the two threads will also be killed and reclaimed. 22

ug brochure.pdf - School of Computing - Robert Gordon University
Multiple Object Tracking System - School of Computer and ...
School of Computing prospectus 2012 - Walter Sisulu University
Untitled - School of Computing - Queen's University
Presentation Slides Download - School of Computing and ...
CI245 - School of Computing, Engineering and Mathematics
School of Computer Science Undergraduate Study
Improving High School Computer Science Education
HUMAN–COMPUTER INTERACTION - Prentice Hall
dt228 final year projects 2006-2007 - School of Computing
DATA WAREHOUSE - Department of Computer Science
summer school on computational materials science
healthy prospects - School of Informatics and Computing - Indiana ...
Computer Science - University of St Andrews
Computer Science - University of St Andrews
A leading university - Cardiff School of Computer Science ...
Volume 38 Number 01 - School of Computer Science
Postgraduate brochure - Cardiff School of Computer Science ...
49)A-494L - School of Computer Science - University of the ...
How to Draw a Graph - School of Computer Science and Software ...
Extreme Programming - Seidenberg School of Computer Science ...
Essentials of Business Process Outsourcing - School of Computer ...
Back 2 School Who to target with our B2S products? - VIP Computers
applications - Signal Computer Consultants
DIGITAL LIBRARY - IEEE Computer Society
Computer & Communications Security Abstracts