A Framework Using Jena and Eclipse for Semantic Web : Survey and Analysis

sizzledgooseΛογισμικό & κατασκευή λογ/κού

3 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

139 εμφανίσεις

Available ONLINE
www.visualsoftindia.com/journal.html





VSRD
-
IJCSIT,
Vol
. 1 (7
), 2011,
471
-
478


____________________________

1
Assistant Professor, Department of Computer Science
& Engineering
,
Ajay Kumar Garg Engineering College
,
Ghaziabad
,
Uttar Pradesh, INDIA.
*Correspondence :
kks_1@rediffmail.com

R
R
R
E
E
E
S
S
S
E
E
E
A
A
A
R
R
R
C
C
C
H
H
H



A
A
A
R
R
R
T
T
T
I
I
I
C
C
C
L
L
L
E
E
E



A Framework Using Jena and Eclipse for

Semantic Web

: Survey and Analysis

1
Krishna Kr. Singh
*

ABSTRACT

Semantic web is a future
web
technology where

both

man and machine will be able to interpret the web
documents.

People have been propo
sing various frameworks towards the realization of semantic web. In this
paper, we propose a framework using jena and eclipse which gives an idea of efficiently converting web
documents into semantic information and that will play a significant role in sem
antic web application
development and deployment. Further we propose an algorithm for achieving semantic information or document
from web documents and illustrations using eclipse. Jena is framework for java that is designed to work with
semantic web recom
mendations RDF and provides programmers of semantic web application an environment
for RDF, RDFS, OWL, and SPARQL and also includes a rule
-
based engine for inferences. Eclipse is an
integrated development environment and platform for building application.
Presently available
semantic web
tools are still not helpful enough to make semantic web popular. Since semantic web has to deal with data
available on the web, a programming framework using jena and eclipse is proposed here.

Keywords :

RDF, Jena, Semantic

Web.

1.

INTRODUCTION

The Internet was designed as
a place of information
, with the goal that it should be useful not only for human
-
human communication, but also that machine would be able to participate and help. One of the major obstacles
to this is the f
act that most information on the WWW is designed for human consumption, and even if it were
derived from a database with well defined meanings (in at least some terms), the meaning of the data would not
be evid
ent to a Web application system
[3]
.
The Semant
ic Web can be seen as a collection of RDF
[5]

graphs. The
RDF recommendations explain the meaning of any one graph, and how to merge a set of graphs into one, but do
not provide suitable mechanisms for talking about graphs or relations between graphs. The a
bility to do so is
required or beneficial for many applications
. Web and Semantic web have following comparison.

Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
472

of
478

Table1: Comparison
between

Normal Web
and

Semantic Web

Semantic Web

Web

Both human and Machine can interpret

Human Interpretable only

Its not

user friendly

User friendly

Popular amongst researchers

Most popular for web

Technologies are in development phase

Technologies are well established and popular among developers

It is globally linked data

It is linked documents

Future of the web

Prese
nt web


1.1.

Semantic Web

The
World Wide Web Consortium (W3C)
[3]

supports the structure for Semantic Web, which is

based on a stack
of inter
-
relational technologies. As we move from bottom
-
to
-
up along the

stack, technologies represent the
information in a more

expressive and meaningful way. Not all technologies of

this stack are yet standardized,
but the prototypes are

p
romising. The stack can be
structured

in
different layers.



Completely developed and
Standardized
first layer
: Uniform

Resource Identification
(URI) (or Universal

Resource Identifier) / Unicode, Extensible Markup

Language (XML) / Namespaces);



Recently developed and standardized second layer
: Model and

Syntax of Resource Description Framework

(RDF), RDF Schema (RDFS), and ontology and

Web Ontology

Language (OWL));



Still

under development phase and standardization are third
layers: Rules, Logic

framework, Proof, and
Trust
.

1.2.

Jena and Jena Architecture

Jena is a leading
tool
[2]

for the semantic web using

Java program
ming
.
In 2000
Jena1 was
released and

Jena2,
with a revision of

internal architecture and many new features, was released in August 2003. The
core feature

of
the Semantic Web r
ecommendations is the RDF Graph
[4]

as a universal data structure. An RDF graph is simply
a set of triples (S, P, O),
where P names a binary predicate over

(S, O). Jena2 similarly has the Graph as its core
interface around which the other components are built.

The jena architecture is made of following layer



The
Graph
layer



EnhGraph
layer



The Model Layer

At the core o
f th
e Jena architecture
[7]

is the RDF graph which is a set of triples of nodes. This
layer

follows the
minimal design for the RDF abstract syntax. It has been designed in such a way that wherever possible
functionality is done in other layers. This allows a ra
nge of implementations of this layer for example,
in
memory

or persistence triple stores. Jena2 architecture
implements

fast path query
[2]

that is used throughout
from RDQL at the top right through to an SQL database at the bottom, allowing user queries to

be optimized by
Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
473

of
478

the SQL query optimizer. The modal layer represents programmer’s view of the application. This provides a
range of methods to work with both the graph and its nodes. Graphs are the models and nodes are the resource
interface and its subcla
sses

1.3.

Eclipse and Plugins

Eclipse

platform
[1]

is extensible for building IDEs. It provides a
basic

services

and
for controlling a set of tools
working together to support programming tasks. Tool builders contribute to the Eclipse platform by wrapping
their
tools in pluggable components, called
Eclipse plug
-
ins
,

which conform to Eclipse's plug
-
in contract. The
basic mechanism of extensibility in Eclipse is that new plug
-
ins can add new processing elements to existing
plug
-
ins. And Eclipse provides a set of co
re plug
-
ins to bootstrap this process. Even though the Eclipse platform
is specialized for building IDEs, the core of its concepts and facilities supports a general model for composing
an application from constituent parts developed by multiple vendors.

T
he plug
-
in extension model
[14]

of Eclipse provides a powerful and general paradigm for architecting extensible
systems based on loosely
-
coupled components. The principle use of this architecture, of course, is the Eclipse
workbench. But the basic extension

model is an abstract architectural pattern quite apart from its specific
implementation

in the workbench. Eclipse plug
-
ins offer a flexible model of extensibility, and their abstract
architecture for composing systems out of loosely
-
coupled components pro
vides a significant addition to the
available repertoire of architectural

patterns for software systems.

Section 2 describes the proposed framework using eclipse and jena for semantic web application and lists

its
advantages. Section 3 further describes t
he framework components and
revisits

the architecture of the proposed
system and analyse the framework. Section 4 describes the implementation of the framework using jena and
eclipse.

2.

PROPOSED FRAMEWORK

Using
the eclipse plugin for bundling the resources l
ike jena api, java api and others a framework is proposed
here so that this framework can be easily integrated with eclipse platform which is an open source technology.
Components of the framework is discussed in the following sections


Fig. 2 :

A
Framework Using Jena

and Eclipse

for web application

Admin Module

Web content Handler

Export Module

Query handler

Soap service Handler


Backend Abstraction Module

Parsers
forXML,

RDF

Persistence /Repository

Jena API

Eclipse
Workspace

Eclipse
Platf
orm

Semantic
Web
s
tack

Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
474

of
478

2.1.

Semantic Web Stack

Semantic web stack is a w3c recommendation of semantic web layer starting from uri and Unicode at the
bottom followed by xml and namespaces. This is used form the R
DF Model and syntax for the semantic data.
Ontology, Rules/query layers sits on top of Rdf layer followed by logic and proof and at the top is trust layer.
Signature and encryption layers spans parallel to this semantic stack to provide trust and security.

2.2.

Persistence/Repository

For persistent storage of RDF data, this framework needs a scalable repository. A Data Base Management
System (DBMS) will be the natural choice. It has been used for decades for storing large quantities of data. In
this period, a la
rge number of DBMS’s have been developed, each having their own strengths and weaknesses,
targeted platforms, and API’s. Also, for each of these DBMS’s, the RDF data can be stored in numerous ways.
As we would like to keep this framework repository indepen
dent and it is impossible to know which way of
storing the data is best fitted for which DBMS, all DBMS
-
specific code is concentrated in a single architectural
layer: the
Backend

Abstraction Module(BAM
).
This BAM offers RDF
-
specific methods to its clients a
nd
translates these methods to calls to its specific DBMS. An important advantage of the introduction of such
separate layer is that it makes it possible to implement this framework on top of a wide variety of repositories
without changing any of framework
’s other components. Other modules of this framework are clients of the
BAM. Currently, there are three such modules:

2.3.

The Exp
o
rt Module

This module allows the extraction of the complete schema and/or data from a model in RDF format. The Export
Module is a
very simple module. This module is able to export the contents of a repository formatted in XML
-
serialized RDF. The idea behind this module is that it supplies a basis for using this framework in combination
with other RDF tools, as all RDF tools will at l
east be able to read this format. Some tools, like ontology editors,
only need the schema part of the data. On the other hand, tools that don’t support RDF Schema semantics will
probably only need the non
-
schema part of the data. For these reasons, the RDF

Export Module is able to
selectively export the schema, the data, or both.

2.4.

XML

Parser

We can design our own parser for the shake of making this framework more robust to semantic web
recommendations
. Sax or Dom type parsers can be used collectively because

both of them have their own merits
and demerits. So a mix of both can be used to make this module

2.5.

Web Content Handle

In the web content handler module web protocols like http needs to be handled. Java web api will used as well
as network api will serve th
e purpose.

Depending on the environment in which it is deployed, different ways to
communicate with the framework modules may be desirable. For example, communication over HTTP may be
preferable in a Web context, but in other contexts protocols such as RMI

(Remote Method Invocation)

or SOAP
(Simple Object Access Protocol
) may

be more suited. In order to allow maximal flexibility, the actual handling
Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
475

of
478

of these protocols has been placed outside the scope of the functional modules. Instead, protocol handlers ar
e
provided as intermediaries between the modules and their clients, each handling a specific protocol.

2.6.

Soap Service Handler

This module will help to access any web service related with semantic web. Web service integration is currently
the hot area of res
earch and its going to add new dimension to the semantic web
. In the present context this
feature will be incorporated in the extension of
the

given framework.

2.7.

Admin Module

This module allows incremental uploading of RDF data and schema information, as wel
l as the deleting of
information. In order to be able to insert RDF data and schema information into a repository, framework
provides an admin module. The current implementation is rather simple and offers three main functions:



Adding RDF data/schema infor
mation;



Clearing a repository.



Manipulating the existing repository

The admin module retrieves its information from an RDF(S) source (usually an online RDF(S) document

in
XML
-
serialized form) and parses it using a streaming RDF parser.

2.8.

Query Module

The Que
ry Module follows the following sequence of processing when handling a query. The sequence is query
parsing, building a query model, query optimization and finally building
an

optimised query model.

After
parsing the query and building a query tree model f
or it, this model is fed to the query optimizer which
transforms the query model into an equivalent model that will evaluate more efficiently.

2.9.

The Backend Abstraction Module

As we have seen in the previous section, the
Backend Abstraction Module

(BAM)

offe
rs a stable, high level
interface for talking to repositories. This BAM is defined by an API that offers functionality to add data to, or to
retrieve or delete data from the repository. BAM
-
implementations translate calls to the API methods into
operations

on the underlying repository instead of adopting or extending an existing RDF API. These API is
very much targeted at data that is kept in memory, whereas our API is considerably more “lightweight” as all
data is returned one
-
at
-
a
-
time in data streams. Ou
r API supports RDF Schema semantics, such as subsumption
reasoning.

Table 2 :
Advantages of Proposed Framework

S.No

Advantages

1

Supports semantic web development

Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
476

of
478

2.

Reduces the development time of application

3

Jena feature is fully available to the pr
ogrammer

3.

ALGORITHM FOR THE PROPOSED FRAMEWORK



Create an eclipse plugin following the eclipse

plugin development.



This plugin will bundle the jena api, java api, j2ee api
, oracle

jar files for jdbc, mysql jar file for jdbc
.
(
Other dbms will be incorporated

in future development), and java xml parsers.



Plugin will be configured with eclipse.



A new perspective will be created in which the

project using the proposed framework will
develop
.

The Semantic Web is all about data, useful semantic data. In order to d
o

something with that data, you need
processing. You could directly employ

your brain to such a processing task, but that misses the point of the
Semantic

Web’s machine readability. This readability requires a machine, actually an

application, properly
pro
grammed to interact with the formal constructs of

the Semantic

Web.

Semantic Web processing comprises
several key areas:

Referencing and managing accessible storage

Populating or linking Semantic Web data to the
referenced storage

Interrogating the Semanti
c Web data via navigation, search, and queries

Reasoning via logic
and rules across the Semantic Web data

Adapting the framework to allow substitutions and customization

for
optimum results in a specific application domain
.
In addition, the processing mana
ges the data and various use
scenarios. For

example:

Obtaining information regarding the application’s Semantic Web data

such as its size
and capabilities

Event
-
based programming dealing with key changes within the Semantic

Web data
.
Resource
management su
ch as networking, database, and file system

interactions to access and store local and remote
Semantic Web data

Handling concurrent threads and multiple user access

You would also want the framework
to offer consistent processing methods

and concepts to si
mplify writing and debugging your code. Consistency

requires common semantics and syntax across processing

methods, attributes,

and parameters. Effective
Semantic Web frameworks do all this and more by

offering a consistent and complete programming
environ
ment for the Semantic

Web.


4.

IMPLEMENTAIONS

Steps for the user of this framework
:



User will create a new project in the eclipse.



User will select the newly created perspective supporting the framework



User will create web pages that will read some url and e
xtract the information from the target website.



User will create class and interfaces for database connectivity to different management information system



Using the program logic information extracted from the website will be populated in an xml file or da
tabase
table.

Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
477

of
478



Using xml java parser and jdbc connectivity data will be fetched from database or xml repository and
converted into rdf and triple format using jena api.



Using jena api this rdf can be processed into ontology and so on and inference can be do
ne.

4.1.

Jena Implementation

In jena implementation the jena framework is downloaded from
http://sourceforge.net

and is extracted into the
active directory. In the installation jena directory there will be a lib folder. This folder contains
the entire

necessar
y jar file to work with jena and java programming environment. So environment
variable

named class
path

5.

CONCLUSION


In this paper we have presented
flexible

framework based architecture for storing and querying both RDF data
and RDF Schema information. Thi
s framework will go beyond the currently available storage and query devices
for RDF, since it will be aware of the RDF Schema semantics. An important feature of this framework is its
abstraction from any particular repository used for the actual storage.
Due to this feature it is possible to port
this framework to a large variety of different repositories, including relational databases, RDF triple stores, and
even remote storage services on the Web. This framework abstracts from any particular communicati
on
protocol, so that it can easily be connected to different clients by writing different protocol handlers. We are in a
process of

constructed a concrete implementation of this generic architecture, using Mysql as a repository and
using HTTP as communicat
ion protocol handlers. Our effort will be to make this framework

more suitable to
the semantic web
technologies which are

totally based on the Web.

6.

REFERENCE

[1]

Beck, Kent, and Erich Gamma,
Contributing to Eclipse

(pre
-
publication draft) 2003.

[2]

B. McBride
Jena

IEEE Internet Computing, July/August,
2002.

[3]

Carroll, J., Dickinson, I., Dollin, C., Reynolds, D., Seaborne, A., Wilkinson, K.
Jena


Implementing the
SemanticWeb Recommendations
. In: Proceedings of the Thirteenth International World Wide Web
Conference (W
WW2004), 2004.

[4]

D.Brickley, R.V.Guha, RDF Vocabulary Description Language 1.0: RDF Schema, W3C6.

[5]

G. Klyne, J.J. Carroll,
RDF Concepts and Abstract Syntax
, 2004, W3C6.

[6]

I.Horrocks, J. Hendler (eds)
The Semantic Web


ISWC 2002,
First Interna
tional Semantic We
b
Conference,
Sardinia, Italy, June 9
-
12, 2002. Proceedings, Springer.

[7]

Jena


A Semantic Web Framework for Java. http://jena.sourceforge.net/

[8]

J.J. Carroll
CoParsing of RDF & XML
, HP Labs Technical Report, HPL
-
2001
-
292, 2001

[9]

J.J. Carroll,
Unparsing RDF/XML
.

http://www.hpl.hp.com/techreports/2001/HPL
-
2001
-
292.html

[10]

K. Wilkinson, C. Sayers, H. Kuno, D. Reynolds,
Efficient RDF Storage and Retrieval in Jena2
, HP
Laboratories Technical Report HPL
-
2003
-
266.


[11]

Named Graphs.
W3C Semantic Web Interest Group Website. ht
tp://www.w3.org/2004/03/trix/

[12]


O. Lassila, R.R. Swick,
RDF Model & Syntax
1999, W3C6.

Krishna Kumar Singh
/ VSRD
Internatio
nal Journal of CS & IT Vol. 1 (7
), 2011

Page
478

of
478

[13]

Prud'hommeaux, E., and Seaborne, A.
SPARQL Query Language for RDF
. W3C Working Draft.
http://www.w3.org/TR/2005/WD
-
rdf
-
sparql
-
query
-
20050217/

[14]

Shavor, S., Jim D'Anjou, et
. al.
The Java Developer's Guide to Eclipse
, Addison
-
Wesley, 2003.

[15]

Volker Haarslev, Ralf Möller
Description of the RACER System and its Applications
, Intl Workshop on
Description Logics (DL
-
2001), Stanford, USA, 1.
-
3. August 2001
.