The domain realization phase involved the construction of the domain components using Java programming language implementation technologies. The content components that were implemented include 1) Destination Recommender System 2) Accommodation Recommender System 3) Database Query Component and 4) Database Layout Template. A fifth component, the Language Translation Engine was sourced as a standard Plug-in component from the Java
128 open source platform. The details of the components and tools used for implementation and the implementation procedure are presented next.
4.4.3.1 Implementation Components and Tools
The software tools used for the implementation of content components include the following: i) NetBeans 5.5: The NetBeans integrated development environment (IDE) is a free, open-
source IDE for developing Java applications, including enterprise applications. NetBeans 5.5 supports the Java Enterprise Edition 5 (Java EE 5) platform.
ii) Java EE Components: A Java EE component is a self-contained functional software unit that is assembled into a Java EE application with its related classes and files that communicate with other components. The Java EE specification defines the following Java EE components:
• Application clients and applets are components that run on the client.
• Web components include Java Servlet, JavaServer Faces, and JavaServer Pages (JSP) technology components. They run on the server.
• Enterprise JavaBeans (EJB) components are business components that run on the server.
iii) Java Servlet Technology: This enables the definition of HTTP-specific servlet classes. A servlet class extends the capabilities of servers that host applications that are accessed by way of a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers.
iv) JavaServer Pages Technology: This allows the addition of snippets of servlet code directly into a text-based document. A JSP page is a text-based document that contains two types of text: static data (which can be expressed in any text-based format such as HTML, WML, and XML) and JSP elements, which determines how the page constructs dynamic content.
v) Enterprise JavaBeans Technology: An Enterprise Java Beans (EJB) component, or
129 business logic. An enterprise bean is a building block that can be used alone or with other enterprise beans to execute business logic on the Java EE server. It is a server-side component written in the Java programming that encapsulates the business logic code that fulfills the purpose of the application. The enterprise beans implements the business logic in methods that when invoked enables clients to access the services provided by the components. There are two kinds of enterprise beans: session beans and message-driven beans. A session bean represents a transient conversation with a client. When the client finishes executing, the session bean and its data are gone. A messagedriven bean combines features of a session bean and a message listener, allowing a business component to receive messages asynchronously. Commonly, these are Java Message Service (JMS) messages. In Java EE 5, entity beans have been replaced by Java persistence API entities. An entity represents persistent data stored in one row of a database table. If the client terminates, or if the server shuts down, the persistence manager ensures that the entity data is saved.
vi) Java Database Connectivity API: This allows SQL commands to be invoked from Java programming language methods. The JDBC API is used in an enterprise bean when there is a need for a session bean to access the database. The JDBC API can also be used from a servlet or a JSP page to access the database directly without going through an enterprise bean. The JDBC API has two parts: an application-level interface used by the application components to access a database, and a service provider interface to attach a JDBC driver to the Java EE platform.
vii) Sun Java System Application Server Platform Edition 9: This is a fully compliant implementation of the Java EE 5 platform. It provides the necessary middleware infrastructure support for all the Java APIs. The Application Server includes a number of Java EE tools that are not part of the Java EE 5 platform but are provided as a additional support to the developer.
viii) Macromedia DreamWeaver: This is a rapid application development tool for web design and website development. It is the most popular visual HTML editor. It enables the creation of web page templates, cascading style sheets and offers support for multiple client-side programming languages such JSP, ASP.Net, VBscript, JavaScript etc.
130 ix) MySQL Database: This is a database management system tool for managing the data
storage and retrieval. MySQL also has excellent query facilities and very suitable for the configuration of network data servers on the web.
x) Protégé Ontology Editor: Protégé is a flexible, configurable platform for the
development of arbitrary model-driven applications and components. It has an extensible and customizable toolset for constructing ontologies and for developing applications that use these ontologies. Some of the outstanding features of Protégé include: 1) Automatic generation of graphical-user interfaces, based on user-defined models, for acquiring domain instances; 2) Extensible knowledge model and architecture; 3) Possible embedding of standalone applications in Protégé knowledge engineering environment and vice versa; and 4) enabling the scalability of ontologies to very large knowledge bases. Protégé also has an open architecture that allows programmers to integrate plug-ins, which can appear as separate tabs, specific user interface components (widgets), or perform any other task on the current model. The Protégé-OWL editor provides many editing and browsing facilities for OWL models, and therefore serves as an attractive starting point for rapid application development. xi) Protege-OWL API: This is an open-source Java library for the Web Ontology
Language (OWL) and RDF(S). The API provides classes and methods to load and save OWL files; to query and manipulate OWL data models; and to perform reasoning based on Description Logic engines. Furthermore, the API is optimized for the implementation of graphical user interfaces. The API is designed to be used in two contexts: 1) For the development of components that are executed inside the Protégé-OWL editor's user interface; and 2) For the development of stand-alone applications (e.g., Swing applications, Servlets, or Eclipse plug-ins)
xii) Pellet Reasoner: This is a Description Logic Reasoner that allows automated
reasoning to be performed over an ontology. A Description Logic Reasoner performs various inferencing services, such as computing the inferred superclasses of a class, determining whether or not a class is consistent (a class is inconsistent if it cannot possibly have any instance), deciding whether or not one class is subsumed by another, etc.
131 xii) Language Translation Engine: This is an open source translation engine implemented by Google that equips content management systems on the web with language translation capabilities.
4.4.3.2 Implementation Details
The implementations of components were based on Java Platform Enterprise Edition (JEE) using the NetBeans 5.5.1 Java IDE. The recommender system components were implemented as stateless session beans (Enterprise Java Beans - EJB) that have their functionalities triggered using Java Servlet technology. Each of the recommender system EJBs were made to reference the relevant Protégé Ontology Java AP1 in order to enable the required ontology querying and description logics reasoning capabilities. The Pellet 1.5 Descriptive Logics (DL) reasoner (http://pellet.owldl.com) was used as the reasoning engine for the ontology-based transactions. The tourism asset database was implemented in MySQL, which exploits the JDBC technology to connect to the EJBs. The database query component was implemented as a generic parameterizable EJB that accepts user request to construct responses. The web layout template was implemented a cascading style sheet file using Macromedia Flash and Macromedia Dream Weaver tools. All components were deployed on the Sun Application Web Server 9.0 which serves as the middleware infrastructure for all server-based services. In figure 4.22 a view of the run-time deployment architecture of the domain components is presented. It is a 3-tier architecture showing the configuration of the content components as deployed on the Java EE server in the middle layer. The data layer (backend systems) consisting of ontologies and databases makes up the third layer while request for services are made through the client layer.
132