Title: ORDI and wsmo4j Damyan Ognyanov Ontotext Lab, Sirma AI
1ORDI and wsmo4jDamyan OgnyanovOntotext Lab,
Sirma AI
2wsmo4j Introduction
- wsmo4j is an open-source project with two parts
- WSMO API application programming interfaces for
WSMO, which allow for basic manipulation of WSMO
descriptions, e.g. creation, exploration,
storage, retrieval, parsing, and serialization - wsmo4j a reference implementation of the WSMO
API, including a WSML parser and a
file-system-based datastore. - wsmo4j development is led by Ontotext
- Delivered as D6.4 within DIP
- Based on v.1.0, 20/09/2004, of WSMO
3wsmo4j Conceptual Grounds
- wsmo4j is fully based on WSMO
- ORDI is based on D2.2 of DIP (commented later)
- The presentation first covers wsmo4j as it is
- Then comments on the ORDI current status and
design
4Functionality wsmo4j packages
- Common the most general primitives, e.g.
identifiers, literals, variables, and
non-functional properties. - IO input and output related interfaces.
Sub-packages - Parser parsing from or serialization to a
particular syntax - Datastore basic store and load interfaces
- Locator resolving physical locators to logical
identifiers. - Ontology contains ontology-specific interfaces
(ontologies, concepts, etc.) Represents the
bridge to the OM tools developed within the OMWG.
- The package namespace is org.omwg.ontology., in
contrast to the other packages of the WSMO API,
whose names start with org.wsmo.. - Goal, Service, Mediator WS modelling related
interfaces.
5wsmo4j Architecture
WSMO StudioSWS Integrated Development
Environment
Ontology Management Suite
WSMO4JReference Implementation
WSML Parser
Editing and Browsing
File Datastore
In-memory Structures
Mapping
Versioning
WSMO APIInterface Definitions
ORDI Ontology Representation Data
Integration
Import/Export Parsers
Mediator
Data Integration
Goal
Service
Ontology
Reasoner Wrappers
Common IO
Repository Wrappers
6Overall Interoperability
WSMO4JReference Implementation
WSMO StudioSWS Integrated Development
Environment
WSMO APIInterface Definitions
Other Data-sources
Repository (Sesame/ YARS)
Reasoner (KAON2)
7wsmo4j basics
- Naming Conventions
- set() and get() for accessing and modifying
properties of a class, which are not collections - list(), find(), add() and remove() for
accessing a collection. - Common Interfaces located in the org.wsmo.common
- Entity top-level interface
- Identifiable represents entities that have an
identifier - Identifier four types URI references,
literals, anonymous identifiers, variable names - the interfaces related to non-functional
properties, NFPHolder.
8Wsmo4j Helper Interfaces
- Factories
- WSMOFactory interface presents the Factory
pattern responsible for creating instances of all
WSMO entities - create() methods accept an Identifier parameter
for the entity identifier (in most cases is a
URIRef). - The WSMOFactory is created by the Factory class
(which is sort of a meta-factory). Multiple
different implementations of the WSMOFactory
interface may be created, if desired. - Containers
- Exceptions
- Mediatable
9wsmo4j Ontology creation sample (I)
//1. initialise the factory with the wsmo4j
provider HashMap factoryParams new
HashMap() factoryParams.put(Factory.FACTORY
_PROVIDER_CLASS,
"com.ontotext.wsmo4j.common.WSMOFactoryImpl") //2
.get a reference to the WSMO Factory
WSMOFactory wsmoFactory Factory.getWSMOFactory(f
actoryParams) try //3. create an
ontology Ontology anOntology
wsmoFactory.createOntology(
wsmoFactory.createURIRef(")) // 3.1 setup a
namespace anOntology.addNamespace("my",
") // 3.2 attach some NFPs
anOntology.addNFPValue(NFP.DC_TITLE,
"International TTO ")
10wsmo4j Ontology creation sample (II)
// 3.3 adds some references to mediators and
imported ontologies anOntology.addImportedOnt
ology(wsmoFactory.createURIRef(
"http//www.wsmo.org/ontologies/dateTime"))
anOntology.addNamespace("dt", "http//www.wsmo.../
dateTime") anOntology.addUsedMediator(wsmoF
actory.createURIRef(
"http//www.wsmo.org/owlPersonMediator.wsml")) //
4. add concepts and instances to the ontology
//4.1 define xsdstring to use it as attribute
range Concept XSD_STRING
Factory.getWSMOFactory().createConcept(null,
Factory.getWSMOFactory().
createURIRef("http//www.w3.org/2001/XMLSchemastr
ing")) //4.2 create the Location concept
URIRef uriL anOntology.createURIRef("loc",
"location") Concept cLocation
wsmoFactory.createConcept(anOntology, uriL)
11wsmo4j Ontology creation sample (III)
// create the Station concept, with Location as
super-concept Concept cStation
wsmoFactory.createConcept(anOntology,
anOntology.createURIRef("my", "station"))
cStation.addSuperConcept(cLocation)
cStation.addNFPValue(NFP.DC_DESCRIPTION, "Train
station") //4.3 add the Code and LocatedIn
attributes to Station Attribute attrCode
cStation.createAttribute(anOntology.createURIRef("
code")) attrCode.setRange(XSD_STRING,
false) attrCode.addNFPValue(NFP.DC_DESCRIPTI
ON, "Code of the station") Attribute
attrLocatedIn cStation.createAttribute(anOntolog
y.createURIRef("locatedIn"))
attrLocatedIn.setRange(cLocation, true)
12Performance and Scalability of wsmo4j
- Havent been seriously evaluated
- wsmo4j is designed as an client-side/in-process
library - the scalability is considered a server side issue
to be handled by ORDI
13Current Status and References for wsmo4j
- http//wsmo4J.sourceforge.org
- Two sub-projects WSMO API and WSMO4J
- JavaDoc, samples
- Maven portal (incl. XRef)
- DIP D6.4 WSMO API mostly the Programmers
Guide - The latest release is v0.3, 1st of Feb, 2005
- Based on v.1.0, 20/09/2004, of WSMO
- wsmo4j is the reference implementation which
includes - The API and implementation of the representation
classes (what we call in ORDI WSMO-In-Memory) - File-based Datastore
- WSML Parser (with serialization)
14ORDI Introduction
- Ontology Representation and Data Integration
(ORDI) - conceptual framework, presented in D2.2 of DIP.
- Objectives
- Ontology language neutrality
- Integration of databases and other structured
data-sources - Ontology and data modularization
- Support for heterogeneous reasoners and
data-sources - WSML Core taken as a formal model
- Defined as a minimal but sufficient formal
framework - Provides a bridge between multiple representation
paradigms (OO, Frames, RDF)
15ORDI Implementation Grounds
- The ORDI implementation, is based on WSMO API.
- This dependency was introduced in order to make
sure that, by design, the web-service related
tools (WSMO Studio) and the OMS are
interoperable. - ORDI is not only an OM infrastructure, it
supports the management of all the WSMO elements
(including WS-related ones) - This means that, for instance, a WS registry,
based on ORDI can easily make queries which
consider conditions on both WS (e.g.
capabilities) and ontology elements.
16ORDI Current Status
- Design and Prototyping
- Implementation of repository wrapper (for Sesame)
- Mapping of WSML to OWL/RDF
- Target to have a first version by June 2005. It
does not cover - DB integration
- Modularization (datasets)
- The rest of the presentation discusses the design
of ORDI
17Related Syntaxes
- A WSML document in either
- WSML XML syntax or
- WSML human readable syntax,
- OWL in RDF the standard RDF XML syntax. RDF
syntaxes different than XML (e.g. NTriples and
N3) will also be supported (through the existing
RDF parsers). - RDFS subset which is a proper sub-language of OWL
DLP is considered. - WSMO-RDF a WSMO/L document serialized according
to - WSMO RDF Schema an ORDI-specific RDFS/OWL
ontology (meta-schema) derived from the WSML
mapping to OWL (D16.1v0.2). It will be similar to
the RDFS schema for OWL and dependent on it.
18Representations
- We distinguish two internal representations of
the ontology data - WSMO-In-memory WSMO-API compliant model (e.g.
WSMO4J). This representation is not specific for
ORDI - WSMO-Triples representation of WSMO elements as
RDF triples according to the WSMO RDF Schema.
This is an internal representation allowing us to
store WSMO (and other data aligned to its model)
into a RDF triple repository for efficient query
and management. The WSMO- RDF syntax is a
serialization of this representation
19Design Issues (I)
- Architecture Java Middleware which allows remote
access to Datastores - The client-side ORDI is an extension of WSMO4J
- The communication between the client and the
server over RMI - The communication style explicit requests from
the client. Nothing like lazy loading, silent
updates and storage.
Java Application
ORDI Server
RMI
ORDI Client
(in-process)
Non-Java Application
WS Access Point
ORDI Client
SOAP
20Design Issues (II)
- Transactions. Transactions are considered, but
not covered currently. This design presumes that
it will be possible to group (in the standard DB
fashion) multiple modification requests to the
server within a single transaction. The
commit/rollback behavior requires a careful
definition. - Logical Expressions (LE).
- WSML-LE are handled by wsmo4j as literals.
- Specific interfaces will be provided for plug-in
of WSML-LE parsers, serializers, validators,
interpreters, etc. - These interfaces still have to be clarified and
defined within wsmo4j. - The WSML-LE plug-ins will be dependent on wsmo4j
(to get access to the WSMO element definitions).
21Tasks (I)
- WSMO-In-Memory serialization to WSML
- WSML parsing to WSMO-In-Memory
- Both are already available within WSMO4J for the
HR syntax. - OWL as RDF conversion to WSMO-Triples. To be
handled by the OWL2WSMOConverter. This
implementation uses an auxiliary triple
repository to collect, group and transform the
sets of triples that form the definition of each
WSMO element. - WSMO-Triples to WSMO-RDF serialization.
Serialization of WSMO documents or separate
elements into WSMO-RDF format. Export of WSMO
into RDF or OWL independent from the WSMO RDF
Schema is not considered.
22Tasks (II)
- WSMO-In-Memory to WSMO-Triples. A straightforward
generation of WSMO-Triples. - WSMO-Triples to WSMO-In-Memory. Instantiation of
WSMO-In-Memory representation of WSMO elements
based on their WSMO-Triple representations. - Managing WSMO-Triples. A set of several subtasks
- Store WSMO-Triples. Store into the repository a
WSMO-Triples definition of a WSMO element. - Extract WSMO-Triples for an element, given a
logical ID. - Compare WSMO-Triple definitions. The simple
variant of this task will only be able to check
whether two WSMO-Triple representations of one
and the same WSMO element are equivalent. Meant
to allow ORDI to know whether there is a real
difference introduced to the definition of the
element.
23ORDI Representations and Modules
WSML-HR
WSMO4J
WSMO-In-Memory
Main Repository
WSMO Tripliser
OWL-RDF
Triple Manager
WSMO-Triples
OWL2 WSMO
WSMO-RDF
24Wsmo4j and ORDI
- http//wsmo4j.sourceforge.net
- http//www.omwg.org