EEG/ERP portal - Extending object oriented code for the missing semantics using Java annotations

Petr Ježek (University of West Bohemia), Roman Mouček (University of West Bohemia)

Our research group at Department of Computer Science and Engineering, University of West Bohemia specializes in the research of attention (drivers, seriously injured people…).  In our experiments we widely use the methods of EEG and ERP.  Since EEG/ERP experiments produce a lot of data we have been facing a lot of difficulties with their long term storage and management. As the result the EEG/ERP portal has been developed. The core of the EEG/ERP portal is based on common Java technologies (Spring, Hibernate, Java EE). Because we are registering the EEG/ERP portal as a recognizable data source within the Neuroscience Information Framework (NIF) we need to provide the portal structure in the form of ontology expressed by the semantic web technologies. The NIF registration will be presented in the separate paper.

The semantic web is based on a different approach comparing with the common World Wide Web. It uses a triple oriented representation described by Resource Description Framework (RDF) extended by Ontology Web Language (OWL). On one hand, OWL extends RDF semantics; on the other hand, OWL uses RDF syntax.

Although the idea of the semantic web is promising, semantic web technologies and widely used object oriented programming (OOP) are based on different approaches. Semantics of OWL classes and instances is based on description logic and an open-world assumption while object oriented type system is defined as the closed world. In the open-world assumption any web based ontology can add subclasses or additional characteristics to concepts defined in other ontologies.

Since most applications are developed using object oriented modeling we need to ensure a suitable mapping. Concerning one side transformation (from object oriented code to semantic web languages) this mapping can be performed relatively satisfactorily. However, when we want to use more capabilities of OWL, we have to enrich the object-oriented code by the missing semantics. We tested several existing frameworks. These frameworks usually modify the syntax of common programming languages and therefore a subsequent modification of a compiler or an interpreter is needed.

Due to uncomfortable work with existing solutions we have proposed a custom annotation framework that allows us to annotate Java language and provide a transformational mechanism transforming Java annotations into the semantic web output. In other words, our extension adds the missing semantics into the existing object oriented code.

For mapping of restrictions we have defined the class or field annotation @Restriction that is mapped to <owl:Restriction /> construct. Constructs <owl:someValuesFrom /> and <owl:allValuesFrom> are expressed using @SomeValuesFrom and @AllValuesFrom annotations. In OWL it is also possible to define a set of operators: intersection, complement and union. A complement of the class in OWL defined by <owl:ComplementOf /> construct is then represented by the class annotation @ComplementOf that determines a complementary Java class. Analogically, in OWL it is possible to declare relations between properties using <owl:inverseOf /> and <owl:equivalentProperty /> constructs. Then the class annotations @InverseOf and @EquvialentProperty define an equivalent respective an inverse Java class.  All described transformations were encoded and integrated into JenaBean tool.


This work was supported by Ministry of Education, Youth and Sport of the Czech Republic under the grant ME 949 and UWB grant SGS-2010-038 Methods and Applications of Biomedical Informatics.


Preferred presentation format: Demo
Topic: Infrastructural and portal services

Document Actions