A Semantic Web XML Backend - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

A Semantic Web XML Backend

Description:

Create a new instance file to store data and information. removeObject ... Yes, set the value of the node. No, make a new node with the value. removeNode ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 42
Provided by: Geor315
Category:

less

Transcript and Presenter's Notes

Title: A Semantic Web XML Backend


1
A Semantic Web XML Backend
? ? ???? (Chang Chiao-Chih) ??????? ?? (Dr.
Daniel J. Buchrer)
2
Outline
  • Semantic Web
  • Background
  • Server Implementation
  • Performance
  • Conclusion and Future Work

3
1. Semantic Web
  • Make the Web as intelligent as possible
  • Data and Information are readable by both humans
    and machines
  • Include RDF, ontologies, agents, and database

4
XML, RDF, Metadata, Ontologies and Data
Modeling Technologies
Database Technology Query, Metadata Storage
The Semantic Web
Information Management Technology
Agent Technology
5
XML Backend
  • Cadabia database management system
  • Store data and information in XML documents
  • Access, query, update, and make user account

6
2. Background
  • Class Algebra Ontology
  • eXist an Open Source Native XML Database
  • Document Object Model (DOM)
  • Problems I met

7
Class Algebra Ontology
  • Default Ontology
  • OntologyDefn
  • ClassDefn
  • RelationDefn
  • AttributeDefn
  • User Objects
  • IS-A Hierarchy
  • Binary Relation

8
(No Transcript)
9
eXist
  • An Open Source Native XML Database
  • XMLDB API
  • Data Storage
  • B-tree
  • Index
  • ltcollection-id, name-idgt
  • Query Language
  • XPath 2.0 / XQuery 1.0

10
Data Store Organization
Document d1
Node-id
Address
Node 1
Node 2



DOM Nodes
Document d2
Node-id
Address
Data pages


Multi-root B-tree
11
Index Organization
ltPath-id, Doc-id,nodeOffsetgt
doc-id
node-id
node-id


doc-id
B-tree value array of node-ids separated by
doc-id
B-tree keys
12
DOM
  • Document Object Model
  • Represent the document as objects
  • Fundamental Interfaces
  • Document
  • Node
  • Element
  • Node List
  • Text

13
Document Node
lthasObjectDefnsgt ltStudentgt
ltnamegtStudent_Georgelt/namegt lt/Studentgt
ltStudentgt ltnamegtStudent_Tylarlt/namegt
lt/Studentgt lt/hasObjectDefnsgt
Document Root
NodeList
Element Node
lthasObjectDefnsgt
NodeList
Element Node
ltStudentgt
NodeList
Element Node
ltnamegt
NodeList
Element Node
ltStudentgt
Student_George
Text Node
NodeList
Element Node
ltnamegt
NodeList
Student_Tylar
Text Node
14
Problems I met
  • Class algebra ontology
  • myOnto.xml
  • http//XBean.cs.ccu.edu.tw/dan/ClassAlgebra/myOnt
    o.xml
  • Installation and implementation of eXist
  • Some jar files need to be added in environment
    variables
  • Mailing list (http//www.exist-db.org)
  • API in eXist
  • Retrieve XML document from backend server
  • more n1 text element nodes
  • clearNodeFromDOM()

15
3. Server Implementation
  • Server Architecture
  • User/Collection Management
  • Object Model
  • System Interface
  • XML Backend Services

16
Server Architecture
  • System Components
  • J2SDK 1.4.1
  • eXist 1.0beta1
  • Java RMI

17
Server Architecture
Local Users
Remote Users
API
Java RMI
eXist
XML Backend
18
User/Collection Management
  • Each User has his private directory (collection)
  • Import the default ontology when creating a new
    user account
  • Users can query, access, and update their data by
    their developing ontology

19
User/Collection Management
Class Algebra Ontology
collection
User N
User 1
User 2
.
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
resource
20
Object Model
  • Object Identifier
  • Prefix, ClassName, ObjectName
  • ltPrefix_ClassName_ObjectNamegt
  • ltmy1_Teacher_dangt
  • Data Structure
  • 3-D like OidList
  • my1TeacherAlexPetermy1StaffKaeJong
  • myOntoClassDefnStudentmy1StudentGeorgeYvonn
    e my2StudentDenencyWerZino

21
Data Structure
class OidList String onto LinkedList
oidElements public class OidElement String
prefix String className LinkedList objNames
22
Useful Methods on Data Structure
  • OidList
  • XML_ListSort()
  • XML_mergeOidList()
  • XML_removeOidList()
  • XML_CheckOidIsEmpty()
  • OidElement
  • XML_addAllObject()
  • XML_Sort
  • XML_removeObjects

23
System Interface
24
XML Backend Services
  • Query
  • Add / Remove
  • Update
  • Security
  • Others

25
Query Service
  • API getRelation() / getGrid()
  • Translate every element in OidList to XPath query
    and then merge the result.
  • The path is absolute, not relative.
  • /hasObjectDefns/Teacher/ccu_Teacher_dan
  • //ccu_Teacher_dan

26
Add / Remove Service
  • CheckExist()
  • ensure if existing
  • addDefn()
  • create a new definition class to user ontology
  • addObject
  • create a new object to user instance file
  • addPrefix()
  • Create a new instance file to store data and
    information
  • removeObject()
  • Remove an instance object

27
Update Service
  • update()
  • Update the attributes of the instance object.
  • removeEdges()
  • Remove some objects (oidlist) of the particular
    relation
  • If the result is empty after removing, call
    removeNode()
  • Else, call storeBack()
  • mergeOidList()
  • Merge the objects (oidlist) into the relation
    content of the other object
  • Call storeBack() only
  • storeBack()
  • Check if the relation existing
  • Yes, set the value of the node
  • No, make a new node with the value
  • removeNode()
  • If the node is without any object, remove this
    node

28
Adding process
1. Add()
Object Identifier
Attributes
Relations
2. mergeOidList()
XML Backend
3. Store Back
29
Removing process
3. removeObjects()
Object Identifier
Attributes
2. Store Back / removeNode
Relations
1. removeEdges()
XML Backend
30
4. Performance
  • Experiments
  • 2.0GHZ Intel Pentium 4
  • 512MB DDR memory
  • Windows XP
  • J2SDK 1.4.1
  • JUnit
  • Testing
  • Query
  • Add
  • Update
  • Remove

31
Query default ontology
32
Query source data sizes
33
Access Time (100 data)
34
Access Time (300 data)
35
Access Time (500 data)
36
Comparison (Query)
37
Comparison (Access)
38
Comparison (All)
39
5. Conclusions
  • XML document provides a way to represent
    structured data without any additional
    information.
  • Since XML documents are simply text files, they
    may also be produced and consumed by legacy
    systems.
  • The performance of query is pretty good, so it
    can be distributed.

40
Future Works
  • Transaction support
  • Distributed ontology importing
  • Class Algebra Query Language
  • Security management
  • Heterogeneous source integration

41
Thank You
Write a Comment
User Comments (0)
About PowerShow.com