0% found this document useful (0 votes)
52 views217 pages

Semafora OntoStudio3 - 2 User Manual 2017

This document is the user manual for OntoStudio. It provides an overview of the key features and functions of OntoStudio including installation, user interface, modeling ontologies, handling rules, handling queries, and importing ontologies. It contains sections on getting started with OntoStudio as well as more advanced topics like configuring extension points, creating BIRT reports, debugging rules, and optimizing queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views217 pages

Semafora OntoStudio3 - 2 User Manual 2017

This document is the user manual for OntoStudio. It provides an overview of the key features and functions of OntoStudio including installation, user interface, modeling ontologies, handling rules, handling queries, and importing ontologies. It contains sections on getting started with OntoStudio as well as more advanced topics like configuring extension points, creating BIRT reports, debugging rules, and optimizing queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 217

OntoStudio User Manual

semafora systems GmbH


Talstrasse 27E
64625 Bensheim
Germany
www.semafora-systems.com
OntoStudio User Manual

Table of Content

General
...........................................................................................................5
Installation
...........................................................................................................5
Deinstallation
...........................................................................................................6
Starting OntoStudio
...........................................................................................................8
User Interface Overview
...........................................................................................................12
Hot Keys
...........................................................................................................13
Setting Preferences
...........................................................................................................23
Adding Comments and Labels
...........................................................................................................24
Extending Functions by Extension Points
..............................................................................................25
Extension Points Overview
ExtendableTreeProvider
..............................................................................................25
ExtendableDropHandler
..............................................................................................25
EntityProperties
..............................................................................................25
..............................................................................................26
Configuring Extension Points
Schema of ExtandableTreeProvider
..............................................................................................26
Schema of ExtandableDropHandler
..............................................................................................27
Schema of EntityProperties
..............................................................................................28
Mapping..............................................................................................29
Extension Points

Schema of ontomapMappingTransformationEditor
..............................................................................................29
Schema of ontomapComplexMappingExtension
..............................................................................................30
...........................................................................................................32
BIRT (Business Intelligence and Reporting Tools)
Creating..............................................................................................32
a report with BIRT

..............................................................................................48
Deploying a report on Tomcat

..............................................................................................48
Input Parameters for BIRT
Creating a Report Displaying Author Deta
..............................................................................................50

Modeling
...........................................................................................................74
Ontology Navigator
...........................................................................................................75
Entity Properties
...........................................................................................................79
Classes
...........................................................................................................85
Instances
...........................................................................................................88
Relations
...........................................................................................................91
Validating Ontologies

2
OntoStudio User Manual

...........................................................................................................93
ObjectLogic Source Editor
...........................................................................................................94
Visualizing an Ontology
...........................................................................................................96
Graph View
...........................................................................................................98
Sharing a project
...........................................................................................................101
Querying Web Services

Handling Rules
...........................................................................................................108
Entity Properties View Overview
...........................................................................................................111
(De)activating Rules
...........................................................................................................112
Explaning Rules
...........................................................................................................114
Materializing Rules
...........................................................................................................115
Creating Rules graphically
...........................................................................................................124
Debugging Rules
..............................................................................................126
Rule Graph

..............................................................................................127
Rule Literals
Tuples..............................................................................................129
Debug..............................................................................................129
Monitor

Handling Queries
...........................................................................................................130
Creating and executing a Query
...........................................................................................................131
Editing a Query
...........................................................................................................132
Editing Options of a Query
...........................................................................................................133
Displaying Results of Queries
...........................................................................................................134
Copying Rules
...........................................................................................................135
Writing ObjectLogic Queries against modelled Ontologies
...........................................................................................................137
Running a Regression Test
...........................................................................................................143
Optimizing Queries
..............................................................................................145
Optimization Methods Overview

Importing Ontologies
...........................................................................................................151
Importing from Filesystem
...........................................................................................................156
Importing from WebDAV Repository
..............................................................................................162
Editing/deleting a WebDAV Connection

...........................................................................................................162
Importing from Database Schema
..............................................................................................163
Importing a Database Schema
Editing..............................................................................................167
a database connection
Adding..............................................................................................167
new schemas and tables

3
OntoStudio User Manual

..............................................................................................168
Installing a JDBC-Driver

..............................................................................................168
Importing Oracle RDF

...........................................................................................................170
Importing from FileSystem Metadata
...........................................................................................................174
Importing from Outlook
...........................................................................................................177
Importing from Remote OntoBroker
...........................................................................................................181
Importing from UML Diagram
..............................................................................................184
Visualizing an Ontology Using UML

Exporting Ontologies
...........................................................................................................188
Exporting to Filesystem
...........................................................................................................192
Exporting to WebDAV Repository
...........................................................................................................197
Exporting to UML Diagram

Integration
...........................................................................................................202
Mapping Ontologies
...........................................................................................................211
Integrating an Excel Data Sheet

4
OntoStudio User Manual General

1 General

1.1 Installation
Precondition:
You must have the rights to read and to write to your current home directory and the installation directory
because OntoStudio must access these directories e.g. for writing log files.
1. Double click on the installation ".exe file" for Windows and Linux.
2. Start OntoStudio32 (32 bit version) or OntoStudio64 (64 bit version).
The installation process starts.
3. The installation wizard guides you through the further installation.
At the end of the installation you are asked for the Key File.
4. Choose the Key File and then click on Open.
5. If you want to increase the main memory of the OntoStudio Java process, open the OntoStudio.ini file in
the installation folder of OntoStudio in a text editor and replace the -Xmx256m option with a higher
number (for example -Xmx512m to reserve up to 512 MB of RAM for OntoStudio).
For more information on the installation see the README.TXT file.

To find the complete list of OntoStudio plug-ins, select Help->About OntoStudio -> Installation Details -> Plug-
ins.
To integrate your own developed built-ins, take a look at the OntoBroker documentation or contact the support
team.
The default file format for all ontologies is ObjectLogic! For RDF & OWL this means:
Imported files that have a native format are transformed and stored as .obl in the workspace.
OWL-in-OBL are used to store (supported) OWL specific axioms.
The ObjectLogicEditor can be activated for all ontology languages.

1.2 Deinstallation
Precondition:
The Uninstall function deletes the Installation folder of OntoStudio. Make sure that you have copied the
KeyFile to another location before starting the Uninstall function; otherwise the KeyFile might be deleted!
1. From the Windows Start menu select: Start -> All Programs -> OntoStudio Version -> Uninstall.
Remove OntoStudio with the help of the uninstall wizard.
2. Click on Next.
The uninstall wizard guides you through the further uninstall process.
3. Click on Uninstall.
All of the OntoStudio components are removed.
4. Click on Accept.

5
OntoStudio User Manual General

5. Click on OK.
The deinstallation starts.
6. Click on Close.
The deinstallation is finished and the OntoStudio software is not on your computer anymore. The window
closes.

1.3 Starting OntoStudio


1. From the Windows Start Menu select: Start -> All Programs -> OntoStudio Version -> OntoStudio.

OntoStudio launches.
2. Select a Workspace and then click on OK.
On starting the program for the first time, the "Workspace Launcher" dialog pops up.
3. Specify where your workspace directory is located. To create a workspace in another directory click on
Browse... and select the desired directory.
All of the information about your ontologies, your preference settings, and so on is stored in the workspace
directory.
NOTE: The restoring of old workspaces is not supported. As a workaround the projects have to be
re-created and the ontologies have to be re-imported from the old workspace.

6
OntoStudio User Manual General

3. The program starts and the start screen appears. The Modeling View appears by default.

7
OntoStudio User Manual General

1.4 User Interface Overview

1 Navigation tree

2 Tool bar

3 Main area: It shows the information on the elements chosen in


the navigation

4 Tabs; If the information of the main area is displayed on multiple


pages you can access them via the set of tabs.

Tool Bar

8
OntoStudio User Manual General

1 Opens the project wizard

2 Save and Print function

3 Generates a graph starting from the given class

4 Search function

5 ID Display Style (Local, URI, QName)

6 Next Annotation [CTRL + .]

7 Previous Annotation [CTRL + ,]

8 Last Edit Location

9 Back [ALT + Left]

10 Forward [ALT + Right]

Modeling View

All of the properties of an element selected in the navigation tree can be edited in the modeling view.
The editable information is often divided into a set of property pages which can be accessed using tabs at the
bottom of the modeling view:

Menu Bar

Use the menu bar to access the main features of Onto Studio, which include e.g. the import and export
functions, creating new ontologies or opening different perspectives, to name but a few.
Most of the menu items are default items of the Eclipse framework which are also described in the
Eclipse documentation at eclipse.org.

File Menu

9
OntoStudio User Manual General

The file menu contains the standard operations of the program. Some operations are only highlighted in the
special use cases.

Search Menu

10
OntoStudio User Manual General

Using OntoStudio's search function, you can run a search on classes, properties, relations and instances in
your workspace or in a set of your projects. The result of your search is displayed in the results view.

Window Menu

The Window menu offers you different ways of quickly switching between the different views of OntoStudio.

Help Menu

11
OntoStudio User Manual General

The Help menu offers you an easy way to get the basic information about OntoStudio, it's version number and
the plug-in details.

1.5 Hot Keys


Hot Key Function

CTRL+N All new actions (except "New Project")

DEL Delete element

F2 Rename (invokes dialog to rename an element)

ALT+SHIFT+V Move (classes and instances)

CTRL+SHIFT+N New instance (when a class is selected)

CTRL+ALT+N New query when a class is selected

Alt + Shift + N Menu: Create a new project

F5 Refresh

Ctrl + X Cut the marked text

Ctrl + C Copy the marked text

12
OntoStudio User Manual General

Ctrl + V Insert the text which is stored in the buffer

Ctrl + H Open the search window

ALT + - Shows the system menu with the following activities:


Fast View, Restore, Move, Size, Minimize, Maximize, Close

+ - (Number Pad) Maximize and minimize the Rule Diagram window

Ctrl + F10 Show the current view menu

Ctrl + M Maximize the active view or the active editor

Ctrl + F7 Change to the next view

Ctrl + Shift + F7 Change to the previous view

Ctrl + F8 Change to the next perspective

Ctrl + Shift + F8 Change to the next perspective

Ctrl + Shift + L List of all implemented Eclipse short cuts

F1 Opens the OntoStudio Help

1.6 Setting Preferences


1. Select Window -> Preferences:

The following form appears:

13
OntoStudio User Manual General

2. Browse through the Preferences dialog pages by looking through all of the titles in the left pane or
searching a smaller set of titles using the filter field at the top of the left pane.
The results returned by the filter match both Preference page titles and keywords such as "Template" or
"Data" (just examples).
Most of the settings are quite self-explanatory, so only the most important settings are described below.

14
OntoStudio User Manual General

General

The General options are self-explanatory. For more information on the standard Eclipse preferences (General
Settings), see the Eclipse documentation at eclipse.org.

Graph Generation

You can specify different configuration parameters (margins and directories) for printing a graph with the
Graphviz tool.

15
OntoStudio User Manual General

Graphical Rule Editor

You can formulate rules in a graphical way.

Language Preferences

Here you can specify the languages for which you want to develop your ontology. The chosen languages are
shown on the user interface for Adding Comments and Labels.

16
OntoStudio User Manual General

Large Ontologies

If there are ontologies with so many classes or instances on the same level that scrolling would take a lot of
time, you can group them to simplify the view.
For example: 10 entities should b e grouped:
1. In the entry field Number of Entities to be grouped type in the number 10.
2. Click on Apply and then on OK.
3. Select an element (for example, a class) with more than 10 subclasses in the tree menu of the
OntologyNavigator.
The following warning message appears:

3. Click on OK.
The entities are displayed in the following format: [Subclass1,.......SubclassN]-(Number of
entities to be grouped). A new icon notifies you that the elements are grouped.

17
OntoStudio User Manual General

The procedure to group instances is the same like the one described above.
You can also choose a set of classes which should only be displayed. This can be seen as a kind of filter

Mapping Preferences

As you might get a large number of facts within your mapping scenario we recommend that you define the
maximum number of fetched instances and the values that are shown in the preview. This improves the
performance of the mapping components.

18
OntoStudio User Manual General

ObjectLogic Editor

It shows the content of an ontology as ObjectLogic in a text editor. Specify whether you want to use the syntax
highlighting (recommended) and whether you will have to set a check mark (confirm dialog) when opening an
ontology in the ObjectLogic editor.
Use the Colors and Templates options to set the appearance of the ObjectLogic textual editor.

19
OntoStudio User Manual General

Query Tool

By default, the queries you create and run in OntoStudio are executed against the embedded OntoBroker. If
you have an OntoBroker instance running somewhere, you can also use OntoStudio to send queries to the
running OntoBroker. To do this you only have to select the "External Server" option and then provide the

20
OntoStudio User Manual General

connection details.
NOTE: Queries against the external OntoBroker should be fully qualified. If you select the "External
Server" option, all OntoStudio queries are sent to the external server. If you want to run queries on your
local ontologies again, you have to switch back to the "Internal Server" mode.

Report Design

These preferences are equal to standard BIRT preferences. The documentation of the BIRT report plug-ins
can be found at the BIRT project page (http://www.eclipse.org/birt/).

21
OntoStudio User Manual General

Validator

Here you can specify sets of constraints (which are displayed in the Constraint sets frame). The different
constraints of the selected constraint set are displayed in the Constraints frame.
To create a new set of constraints, click on Add... next to the Constraint sets frame. Choose a name for the
new set and click on OK. You can see the new set in the Constraint sets frame.
To add a constraint to a set, select the name of the set and click on Add... next to the Constraints frame. Use
the newly opened window to write the description of the constraint in the Description frame and the constraint
itself in the Constraints frame. Then click on OK and you see the new constraint in the Constraints frame.
You can delete or edit a created constraint/set of constraints by selecting it and clicking on Delete or Edit...
respectively.

22
OntoStudio User Manual General

Visualizer

This view displays the ontology and all of the hierarchy elements (classes, relations, properties, instances) in
a graph. As your ontology might have a large number of Properties, it is better not to set the checkmarks.

1.7 Adding Comments and Labels


Comments are descriptions and labels are translations. You can add comments and labels to queries,
concepts, properties (attributes/relations) and rules.
1. Select the relevant query, concept, property or rule in the navigator.
2. In the Entity Properties view choose the tab Comments & Labels:

23
OntoStudio User Manual General

1. To add a translation to a term, click in the relevant field in the column Label and enter the translation.
2. To add a description, click in the relevant field in the column Comment and enter the description in the
yellow text entry field.
3. To add further languages, select Window -> Preferences -> Lanugages Preferences, select a new
language in the drop down box Create new locale... and click on Create.
4. To reorder the languages, select Window -> Preferences -> Lanugages Preferences, select a language
and click on Up or Down.

1.8 Extending Functions by Extension Points


This chapter describes the additional extension-points provided by OntoStudio which enable you to extend the
existing functions of the application. The large set of extension points provided by the eclipse framework itself
is not be described in this document. Their documentation can be found on the eclipse homepage (http://
www.eclipse.org).
Some of the additional extension-points are provided to modify the main component in OntoStudio, the
Ontology Navigator. The OntologyNavigtor is a completely modifiable and extensible view on (not necessarily)
ontology elements. The developer can:

24
OntoStudio User Manual General

Show additional elements (almost everywhere) in the tree


Define specific drag and drop operations and
Get support for the definition of additional context menu entries.
There are two extension points for extending the OntologyNavigator. These are:
org.neontoolkit.gui.extendableTreeProvider
org.neontoolkit.gui.extendableDropHandler
Another main component in OntoStudio is the Entity Properties View which shows property pages for the
elements of the user interface. Additional property pages can be integrated in this view using the
corresponding extension point. To contribute a new property page to the Entity Properties View, the org.
neontoolkit.gui.entityProperties extension point has to be extended.
New context menu entries can be defined using the org.eclipse.ui.popupMenus extension-point.

1.8.1 Extension Points Overview


1.8.1.1 ExtendableTreeProvider
The OntologyNavigator does not provide any of the tree elements itself, it just collects the elements from the
different extensions of the org.neontoolkit.gui.extendableTreeProvider extension-point and shows
them. Generally, the different extensions are ordered in a hierarchy, which means that providers can be
defined as sub-providers of other providers.
Sub-providers can provide additional children to elements provided by their parent providers. For example, if
provider B is defined as a sub-provider of provider A and the system is querying for the children of an element
E provided by A, provider B will also be called if it can provide additional children of E.
The extendableTreeProvider extension-point can also be used by other trees. By defining a view
contribution in the extension definition, the defined extensions will not be used by the OntologyNavigator. The
extensions for a given id can be retrieved from the GuiPlugin and a tree which uses a MainTreeDataProvider
as ContentProvider which is initialized with the extensions for a given id, will automatically display the items of
the defined providers.

1.8.1.2 ExtendableDropHandler
With the org.neontoolkit.gui.extandableTreeProviderextandableDropHandler extension-point you
can define additional drag&drop operations on the OntologyNavigator using the org.neontoolkit.gui.
extendableDropHandler extension-point. Two kinds of drag&drop operations are possible:
object-type-specific drag&drop
transfer-type-specific drag&drop
In the case of the object-type-specific drag&drop, you can define which class will handle drops from objects of
a specific type A on objects on a second specified type B. These object-type-specific drag&drop operations
only work within the application with components using the com.ontoprise.ontostudio.gui.navigator.
SelectionTransfer transfer type.
The transfer-type-specific drag&drop also works between different applications as well as between plugins
within the application. For this kind of drag&drop the class used for the transfer operation is used to determine
the class handling the drag&drop operation. Therefore, the developer can, for example, define a new transfer
class and then register his own handler for this type of transfer on the OntologyNavigator.

1.8.1.3 EntityProperties
The org.neontoolkit.gui.entityProperties extension point gives you the option of integrating new
property pages in the Entity Properties View. Therefore the org.neontoolkit.gui.entityProperties
extension point has to be extended. In this extension point you can define for which types of elements selected
in the user interface the property page should be shown.

25
OntoStudio User Manual General

1.8.2 Configuring Extension Points


1.8.2.1 Schema of ExtandableTreeProvider
<!ELEMENT extension (provider*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>

point - a fully qualified identifier of the target extension point


id - an optional identifier of the extension instance
name - an optional name of the extension instance

<!ELEMENT provider (viewContribution*)>


<!ATTLIST provider
id CDATA #REQUIRED
class CDATA #REQUIRED
sub-provider-of CDATA #IMPLIED>

id - a unique identifier used to reference this content provider.


class - the fully qualified name of the class that implements org.neontoolkit.gui.navigator.
ITreeDataProvider.
sub-provider-of - The unique identifier of the parent provider in the provider hierarchy. This attribute is
optional, providers located on the root level of the tree have no parent providers.

<!ELEMENT viewContribution >


<!ATTLIST viewContribution
id CDATA #IMPLIED

id - a unique identifier used to reference the component which should display the contents of this
extension.

The interface of ITreeDataProvider must be implemented and provides the following methods:

Method Descripton

void dispose() This method is invoked, when the object is disposed.


Clean up operations can be done here

int getChildCount(ITreeElement parentElement) The number of child elements depending on the


passed parent element parentElement should be
returned

ITreeElement[] getChildren(ITreeElement Should return the subset of amount children of


parentElement, int topIndex, int amount) parentElement, beginning at index topIndex.

ITreeElement[] getElements(ITreeElement This method should return the given amount of root
parentElement, int topIndex, int amount) elements of this provider beginning at index topIndex.
The passed parentElement is an element of the
parent provider or null if none

String getId() Returns the id of this provider.

Image getImage(ITreeElement element) Should return the image of the tree element (which

26
OntoStudio User Manual General

Method Descripton

was provided by this provider) to be displayed in the


UI.

TreeElementPath[] getPathElements(ITreeElement This method is required for searching in the tree. If


element) the passed element is provided by this provider or by
a subprovider of this provider, this method should
return a TreeElementPath containing only the
elements of the path from the element to the root of
the tree which are provided by this provider. If
elements appear multiple times in the tree, multiple
paths are possible, so an array has to be returned.

String getText(ITreeElement element) Should return the text of the tree element (which was
provided by this provider) to be displayed in the UI.

void setId(String id) Sets the identifier of this provider. This method is
invoked from the framework to set the id specified in
the plugin.xml.

void setViewer(ComplexTreeViewer viewer) Passes the reference to the TreeViewer that displays
the content of this provider. The reference is used to
perform refresh operations

boolean isDragSupported() The developer can define the general behavior of the
elements provided by this provider. If true is returned,
the elements can generally be dragged, if a handler
for this kind of drag is registered. If false is returned,
these elements cannot be dragged at all.

boolean isDropSupported() The developer can define the general drop policy on
elements provided by this provider. If true is returned,
it is possible to drop elements on the elements of
this provider (if a dropHandler is registered for this
kind of drop). If false is returned, these elements do
not support any drop operation at all.

1.8.2.2 Schema of ExtandableDropHandler


<!ELEMENT extension (dropHandler*, transferHandler*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>

point - a fully qualified identifier of the target extension point


id - an optional identifier of the extension instance
name - an optional name of the extension instance

<!ELEMENT dropHandler>
<!ATTLIST dropHandler
class CDATA #REQUIRED
dragClass CDATA #REQUIRED
dropClass CDATA #REQUIRED>

class - the fully qualified name of the class that implements org.eclipse.swt.dnd.
DropTargetListener.

27
OntoStudio User Manual General

dragClass - The class name of the dragged items


dropClass - The class name of the objects on that the drop can be performed
dropClass - The class name of the objects on that the drop can be performed

<!ELEMENT transferHandler>
<!ATTLIST transferHandler
class CDATA #REQUIRED
transferClass CDATA #REQUIRED

class - the fully qualified name of the class that implements org.eclipse.swt.dnd.
DropTargetListener.
transferClass - The class name of the transfer type this DropTarget listener is associated with.

For both types of drag&drop handling, the interface to implement is the org.eclipse.swt.dnd.
DropTargetListener interface. The description of this interface can be found in the SWT documentation.

1.8.2.3 Schema of EntityProperties


<!ELEMENT extension (entityPropertyContributor*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED

point - a fully qualified identifier of the target extension point


id - an optional identifier of the extension instance
name - an optional name of the extension instance

<!ELEMENT entityPropertyContributor(subContributorOf?)>
<!ATTLIST entityPropertyContributor
id CDATA #IMPLIED
class CDATA #REQUIRED
name CDATA #REQUIRED
activatorClass CDATA #IMPLIED>

id - a unique identifier used to reference this property contributor.


class - the fully qualified name of the class that implements org.neontoolkit.gui.properties.
IPropertyPage or org.neontoolkit.gui.properties.IMainPropertyPage for main pages
name - if there are multiple subcontributors they will be organized as tabs, and this will be the label
of the tab.
activatorClass - The class name of the type of elements the defined property.page should be shown
for.

<!ELEMENT subContributorOf>
<!ATTLIST subContributorOf
superContributorId CDATA #REQUIRED
priority CDATA #IMPLIED

superContributorId - a unique identifier used to reference the superContributor.


priority - a numeric value defining the order of multiple contributed tabs. They are sorted ascending, i.
e. 0.6 is displayed before 1.0
The interface that has to be implemented for this extension has to be the org.neontoolkit.gui.
properties.IEntityPropertyPage interface. The following methods have to be implemented:

28
OntoStudio User Manual General

Composite createContents(Composite parent); This method is invoked, when the property page is
created. The parent component is passed as argument and the child component should be created
in this method and returned afterwards
void deSelect(); This method is called if a different property page is about to show because another
element has been selected. Clean up operations can be done in this method.
Image getImage(); Should return the image to display in the header of the Entity Properties View if
the property page is shown.
boolean isDisposed(); Should return true if the property page is disposed or false otherwise.
void refresh(); Is called if a refresh of the user interface of the property page is needed.
void refreshData(); Is called if the data model has changed and a refresh of the displayed
information in the property page is needed
void setSelection(IWorkbench part, IStructuredSelection selection); Is called by the framework to
pass the current selection to the associated property page.

There is already an abstract implementation of this page for ontology elements. This class is named com.
ontoprise.ontostudio.gui.properties.BasicEntityPropertyPage. It already provides editing areas for identifiers
and namespaces as well as optional documentation and representation fields.

1.8.3 Mapping Extension Points


Within OntoStudio, the mapping tool plug-in offers extension-points to plug in special transformation editors
and provide the creation and processing of special mapping patterns. This document describes the
Extension-points, their underlying schemata and the interfaces to be implemented.
OntoStudio provides the following extension-points for extending the functionality of the mapping plug-in:
ontomapMappingTransformationEditor
To provide special GUI-editors for certain mapping transformations an extension of the com.ontoprise.
ontostudio.ontomap.ontomapMappingTransformationEditor extension-point can be used
implementing the com.ontoprise.ontostudio.ontomap.views.IMappingTransformationEditor
interface. By implementing this interface the extension specifies a category for specific transformations
for which it provides a GUI component that can be used to specify the transformation.

ontomapComplexMappingExtension
To plug-in special implementations for certain mapping-patterns an extension of the com.ontoprise.
ontostudio.ontomap.ontomapComplexMappingExtension extension-point can be used for
implementing the com.ontoprise.ontostudio.ontomap.mapping.provider.IMappingProvider
interface. The implementation of the IMappingProvider is responsible for collecting all of the
information needed for the mapping and the rule creation. It has to provide the gui for the initial creation
and the editing of mappings for this pattern type as well as storing the mapping meta-data. An
implementation of com.ontoprise.ontostudio.ontomap.control.mapping.IMappingInstance or
alternatively com.ontoprise.ontostudio.ontomap.control.mapping.AbstractMappingInstance
is responsible for the mapping rule generation.

1.8.3.1 Schema of ontomapMappingTransformationEditor


<!ELEMENT extension (transformationeditor)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA # IMPLIED>

point - a fully qualified identifier of the target extension point


id - an optional identifier of the extension instance
name - an optional name of the extension instance

29
OntoStudio User Manual General

<!ELEMENT transformationeditor EMPTY>


<!ATTLIST transformationeditor
editorClass CDATA #REQUIRED
editorName CDATA #IMPLIED
category CDATA #REQUIRED>

editorClass - The fully qualified name of the class that implements com.ontoprise.ontostudio.
ontomap.views.IMappingTransformationEditor.
editorName - The name of the transformation editor.
category - The category of the transformation editor

The interface of IMappingTransformationEditor must be implemented and provides the following methods:

Method Description

String getCategory() Returns the category of the implemented mapping


transformation editor.

Composite createComponent(Composite parent) Returns a composite with the GUI-components for


the mapping transformation editor.

void init(IMapping mapping) This method initializes the GUI components for the
mapping transformation editor for the given mapping.

void init(IMapping mapping, FormToolkit toolkit) This method initializes the GUI components for the
mapping transformation editor for the given mapping.

void dispose() This method is invoked, when the object is disposed.


Clean up operations can be done here.

List<String> getRegisteredBuiltins() This method has to return the implementation of


com.ontoprise.ontostudio.ontomap.control.mapping.
IMappingInstance which is responsible for the
mapping metadata and the rule generation.

boolean canSaveTransformation() Returns true if the transformation is valid and can be


saved.

String getTransformation() Returns the transformation to be stored as metadata


for the mapping

String getTransformationRepresentation() Returns the "pretty" representation of the


transformation.

void addUpdateFormListener(IPropertyFormListener Allows to inform the parent GUI component that a GUI
l) update is needed.

1.8.3.2 Schema of ontomapComplexMappingExtension


<!ELEMENT extension (mappingProvider)*>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED >

point - a fully qualified identifier of the target extension point


id - an optional identifier of the extension instance

30
OntoStudio User Manual General

name - an optional name of the extension instance

<!ELEMENT mappingProvider EMPTY>


<!ATTLIST mappingProvider
mappingProviderClass CDATA #REQUIRED
name CDATA #REQUIRED>

mappingProviderClass - the fully qualified name of the class that implements com.ontoprise.
ontostudio.ontomap.mapping.provider.IMappingProvider.
name - The name of the mappingProvider.

The interface of IMappingProvider must be implemented and provides the following methods:

Method Description

String getName() Returns the name of the implemented mapping


pattern.

String getDescription() Returns the description of the implemented mapping


pattern.

boolean supportsType(String type) Returns true if the MappingProvider supports the


given mapping type, e.g. "BEISPIEL".

boolean matches(INode[] sourceNodes, INode[] Returns true if the mapping pattern is applicable for
targetNodes) the given user selection within the mapping view.

boolean hasTemplate() Returns true if the MappingProvider implements a


template for the mapping creation.

Boolean hasNext() Returns true if the MappingProvider has a next


template page for mapping creation.

boolean canSaveMapping() Returns true if all data needed for the mapping
creation is available.

boolean hasPropertyPage() Returns true if the MappingProvider implements its


own property page for existing mappings.

boolean supportsMapping(IMapping mapping) Returns true if the MappingProvider supports the type
of the given mapping.

Composite createComponent(Composite parent) Returns a composite with the GUI-components for


the mapping pattern or the mapping properties.

void init(INode[] sourceNodes, INode[] targetNodes This method initializes the GUI components for the
mapping pattern based on the given mapping nodes.

void init(IMapping mapping) This method initializes the GUI components for the
mapping properties based on the given mapping.

IMapping[] getMappings() Has to return the mappings created by the


MappingProvider.

IMappingInstance getMappingInstance() This method has to return the implementation ofcom.


ontoprise.ontostudio.ontomap.control.mapping.
IMappingInstancewhich is responsible for the
mapping metadata and the rule generation.

boolean isPropertyPagePinnedWhenEditing() Returns true if the property page should be pinned


during editing, e.g. when providing drop-actions from

31
OntoStudio User Manual General

Method Description

the ontology navigator.

1.9 BIRT (Business Intelligence and Reporting Tools)


BIRT is an Eclipse based tool and integrated in OntoStudio.
With BIRT you can
Create reports within your application
The created reports can be saved as a HTML or a PDF document, for example.
In the process, you can integrate an html-page in a Web portal, which displays query results generated by
the ontology and OntoBroker.
Visualize query results not only in a tabular form but also in different kinds of charts and diagrams
Add images, texts, tables and more
As BIRT is an open source and not developed by semafora systems GmbH you can read all about its various
features on the Eclipse homepage.

1.9.1 Creating a report with BIRT


1. From the top level menu select: Window -> Open Perspective -> Other....
2. Select Report Design and click on OK.

A new view appears:

32
OntoStudio User Manual General

3. Select your ontology project from the Navigator.


4. Make a right mouse click on the project and choose New -> Report.
A new dialog box appears:

33
OntoStudio User Manual General

5. Select a project, give a name to the report and click on Next.


6. Choose a type of report and click on Finish.

34
OntoStudio User Manual General

The report is generated:

35
OntoStudio User Manual General

7. Create a new ObjectLogic Data Source.


a. Choose the tab Data Explorer. Then make a right mouse click on Data Source and select New Data
Source.

b. Select OntoBroker Data Source and give a name to the data source and click on Next.

36
OntoStudio User Manual General

c) Fill out the fields and click on Finish.

37
OntoStudio User Manual General

8. Create a new data set.


a. Make a right mouse click on Data Sets and select New Data Set.

38
OntoStudio User Manual General

b. Fill out the fields and click on Next.

39
OntoStudio User Manual General

c. Choose the query for which the report will be created and click on Finish.

40
OntoStudio User Manual General

d. Click on OK.

41
OntoStudio User Manual General

9. Drag&Drop the data set element from the Data Explorer to the new report view to create a simple table
view of your data.
See below for the result:

42
OntoStudio User Manual General

10. Click on the Preview tab.


The result of the query appears:

11. Switch back to the Layout tab.


12. Select Chart from the Palette to create a chart.

13. Drag&Drop from Chart to the report.

43
OntoStudio User Manual General

A new dialog box appears:

44
OntoStudio User Manual General

14. Select a chart type and click on Next.


15. Select the Use Data Set radio button and select the data set to be used.

45
OntoStudio User Manual General

16. Drag&drop the data column to the appropriate text field and click on Next.

46
OntoStudio User Manual General

17. Click on Finish


The chart is created:

47
OntoStudio User Manual General

18. Click on the Preview tab.


You can see all of the generated charts.

1.9.2 Deploying a report on Tomcat


1. Set up the BIRT viewer for your Tomcat installation as described in Setting up the BIRT Viewer (only the
viewer has to be installed, no JDBC drivers, or others)
2. Copy the following plug-ins (contained in the plugins folder of the OntoStudio installation) to the BIRT
viewer (into the directory <birt-viewer>/WEB-INF/platform/plugins):
com.ontoprise.ontobroker.socketclient_6.x.x.jar
com.ontoprise.ontobroker.util_6.x.x.jar
com.ontoprise.oda.ontobroker_3.x.x.jar
org.apache.log4j_1.2.13.v200903072027.jar
org.apache.abdera.i18n-0.4.0.jar
3. The reports that shall be deployed have to be copied directly to the birt-viewer directory (<Tomcat
directory>/webapps/birt-viewer).
4. Launch your report using the following URL (and replace <your report name> with the real name of
your report):
http://localhost:8080/birt-viewer/frameset?__report=<your report name>.rptdesign

1.9.3 Input Parameters for BIRT


The input parameter allows you to execute a query based on the user input. The following example explains
the utility of the input parameters. Our aim is to create a report with a list of projects (name and id), and on
double-clicking on one of them, the details (duration, strategy and team) of the selected project are displayed.

48
OntoStudio User Manual General

Our ontology contains a class "Project" like this:

Two queries have been created:


queryProjects displays the ID and name of each project
queryProjectsDetails displays the ID, name, duration, strategy and team of each project

49
OntoStudio User Manual General

1.9.3.1 Creating a Report Displaying Author Deta


1. From the top level menu select: Window -> Open Perspective -> Other....-> Report Design and click on OK.

2. Create a Report.
a. Make a right mouse click on a project and select New -> Report.

50
OntoStudio User Manual General

The following form appears:

51
OntoStudio User Manual General

b. Select a project, give a name to the report and click on Next.


c. Click on Finish.
The report is created:

52
OntoStudio User Manual General

3. Create a new ObjectLogic Data Source.


a. Make a right mouse click on Data Sources and select New Data Source.

53
OntoStudio User Manual General

A dialog appears.
b. Select OntoBroker Data Source and give a name to the Data Source and click on Next.

54
OntoStudio User Manual General

c. Fill out the fields and click on Finish.


The data source has been created.

4. Create a new data set.


a. Right mouse click on Data Sets and select New Data Set.
A dialog appears.

55
OntoStudio User Manual General

b. Fill out the fields and click on Next.

56
OntoStudio User Manual General

c. Select the project, the module and the query queryProjects and click on Finish.

57
OntoStudio User Manual General

A new dialog appears:

58
OntoStudio User Manual General

d. In the left hand menu, click on Computed Columns and then click on New....
A new dialog appears:

e. Enter a name and a data type, and click on the symbol fx.
A new dialog appears:

59
OntoStudio User Manual General

f. Write a formula containing the forename and last name. Click on OK.
The formula has been added to the Expression field.
The "replace" function has been used to delete the quotes which are displayed as a default and hence
give a better display.

60
OntoStudio User Manual General

g. Click on OK.
The new column has been created.
h. Click on OK.
The data set has been created.

5. Make a right mouse click on Report Parameters and select New Parameter:

61
OntoStudio User Manual General

A dialog appears.
6. Fill out the different fields in the following way and click on OK:

62
OntoStudio User Manual General

The report parameter is created.


7. Select the ProjectsList parameter and drag&drop it in the report.

63
OntoStudio User Manual General

64
OntoStudio User Manual General

A data-field is displayed in the report.


8. Create a new data set.
a. Make a right mouse click on Data Sets and select New Data Set.

b. Fill out the fields and click on Next.

65
OntoStudio User Manual General

c. Select the project, the module and the query queryProjectsDetails. Click on Finish.

66
OntoStudio User Manual General

A new dialog box appears:

67
OntoStudio User Manual General

d. In the left hand menu, click on Parameters.


e. Double-click on the first line (corresponding to the projects name).
A new dialog box appears:

f. In the Direction field select Input from the drop-down list. In the Linked to report parameter field,
select ProjectsList from the drop-down list.
An input parameter is defined in order to restrict the query.

68
OntoStudio User Manual General

g. Click on OK.
The second data set is created.

9. Drag&Drop this second data set from the Data Explorer tab to the report.
A table is displayed in the report:

69
OntoStudio User Manual General

10. Click on the Preview tab and on the Show Report Parameters button.
A dialog box appears:

70
OntoStudio User Manual General

11. Select an author from the list and click on OK.

71
OntoStudio User Manual General

The report shows details of this author:

72
OntoStudio User Manual General

73
OntoStudio User Manual Modeling

2 Modeling
You can create and maintain semantic models (often referred to as "ontologies") written in the ObjectLogic,
RDF and OWL languages. Due to a harmonization of ObjectLogic, OWL and RDF to help make OntoStudio
more user friendly, OntoStudio now provides one single perspective for all three ontology languages. The
modeling perspective is the only and the easiest way to modify your ontologies. Its simple and user friendly
interface is mostly self-explanatory. For more information about supported RDF and OWL features see the
README.TXT file.
An ontology defines a common vocabulary for researchers and experts who need to share information in a
domain. It includes machine-interpretable definitions of basic classes in the domain and relations between
them.
Why would someone want to develop an ontology?
To share common understanding of the structure of information among people.
To enable the reuse of the domain and expert knowledge.
To make the domain assumptions explicit.
To separate the domain and expert knowledge from the operational knowledge.
To analyze the domain and expert knowledge.
Furthermore, you must answer the following questions when developing an ontology:
Which domain will the ontology cover?
What is the purpose of the ontology?
To what types of questions should the information in the ontology provide answers?
Who will use and maintain the ontology?

An ObjectLogic Tutorial is available in the OntoStudio help system.

2.1 Ontology Navigator


The Ontology Navigator displays the different ontology projects and their corresponding ontologies:

74
OntoStudio User Manual Modeling

You can navigate within the hierarchically arranged elements. Each project can contain several ontologies. For
each ontology, classes can be found in the classes folder, properties in the properties folder, and so on.
Furthermore, you can create, change and delete ontology elements. The different options for editing the
elements are listed in the appropriate context menu. To open the context menu of an element, make a right
mouse click on the element. If an element contains further sub-elements, then a plus sign is displayed on the
left side of the element. Click on this plus sign to display the sub-elements. To close the view of the sub-
elements, click on the minus sign next to the upper element.

2.2 Entity Properties


When you select one of the nodes in the Ontology Navigator, the appropriate Entity Properties view displays
the details for this entity.
Click on your ObjectLogic project in the navigator for an overview of the project settings. The Entity Properties
view is the main work area for viewing and editing ontologies, classes, relations, instances, queries and
rules. This chapter describes the tabs of the Entity Properties view.

Ontology Details

Name: The Name of your ontology project.


File Name: The name of the ontology you are working with (can be changed here).
Language: The language of the comment. You can have one comment per language.
Comment: You can add information about your ontology project in this text field.

75
OntoStudio User Manual Modeling

Namespaces

A list of defined namespaces with their aliases is displayed. You can add, remove or edit the namespaces
and aliases. The default display in the Ontology Navigator and in the Entity Properties pages does not contain
the elements' namespace. You can display it by selecting Show URI, as presented below:

And you obtain:

Moreover, you can display the alias by selecting Show QName. The result is:

NOTE: The default namespace is represented by an empty alias.

76
OntoStudio User Manual Modeling

It is possible to create new entities using namespace aliases. For example, the classes of the same ontology
can have different namespaces:

Ontology Imports
OntoStudio provides a functionality for importing facts from other ontology projects. You can enhance these
facts on your own but you can't edit them much.The import function section describes how to import
ontologies. In the screenshot below, on the Ontology Imports tab of the Entity properties view, you can see
that "ontowebtravel" is the imported ontology, which has been imported into the "genealogy" ontology. You can
add several ontologies to the imports of an ontology. By flagging the Show elements of imported ontologies
checkbox, all facts of the imported ontology will be displayed grey-shaded in the Ontology Navigator, like the
classes "Customer", "Date" an "Location".
You can neither modify the imported entities, nor delete them. But you can of course add new elements like
classes, properties, instances, etc. Imported rules are also valid in the importing ontology.

77
OntoStudio User Manual Modeling

Ontology Imports: Select which Ontology will be imported.

Ontology Imports Graph


All the ontologies that are directly or indirectly visible (via the imports relationship) from this ontology are
displayed as a graph. Each ontology is represented by a node and each "import" is represented by a directed
link between them. The importing ontology points to the imported one.

78
OntoStudio User Manual Modeling

2.3 Classes
When you select a class in the navigator tree an Entity Property is displayed. This chapter describes the tabs
of the Entity Properties view.

Properties
You can edit all properties of an element selected in the navigator tree in the Entity Properties view:

79
OntoStudio User Manual Modeling

Local name: The name of the class.


Properties: In this area you can create properties (Attributes and Relations) for your class. Relations
describe the dependencies between classes. In the "Properties" column, enter the name of the attribute
or relation you want to create. The autocomplete list will suggest the already existing properties. Then
enter the range of the values in the Range column. The range autocomplete list contains datatypes and
classes, which are respectively represented by icons "DT" and "C".
If you want to create an attribute, the range must be a datatype (for example, string, integer, boolean,
number, time, datetime...).
If you want to create a relation, the range must be one of your ontology's class, which you want to
relate to the active class. If you type in something that is neither a data type nor an existing class, a
new class will be automatically created with the given name.
NOTE: Press Ctrl while clicking on a table cell in order to navigate to the entities shown in the tables on the
properties pages. The following navigation is supported:
ClassPropertyPage to attribute/relations/range classes.
AttributePropertyPage to domain classes.
RelationPropertyPage to domain/range classes.
InstancePropertyPage to attributes/relations/related instances.
After the range has been chosen, the cells are automatically marked with the correct icons. In the Min and Max
columns you can define the cardinalities (only for ObjectLogic This is not supported for OWL and RDF). You
can delete an attribute/a relation by clicking on the red cross at the end of the line. Grey shaded properties are
inherited and can only be changed in the superclass that defines this property. In the Ontology Navigator, all
properties will be displayed in the Properties folder. Here you can also rename them. Newly defined
properties will be inherited by subclasses.

80
OntoStudio User Manual Modeling

If a subclass is selected, the inherited properties will be displayed gray shaded.

NOTE: Additional information about the three mostly used attribute values:
String is the simplest value type which is used for properties such as name. The value is a simple string.
Double: (There exist different numerical value types, such as float or integer) describes properties with
numeric values.
Boolean: properties are simple true/false flags.

Properties can have parameters. The syntax for writing parameters is the following:
name(param1, param2,...) with "name" being the name of the relation or attribute
"param1", "param2"... the ranges of the different parameters
the parameters can have different ranges: either data types (string, integer, boolean...) or classes

81
OntoStudio User Manual Modeling

Comments & Labels


Labels: Allows you to define one preferred term per language.
Comments: In the text area you can write a description of the selected element in the language that is
selected in the column. If you want to write a description for another language, simply choose the
language and write your description. By default, the documentation can be done in English, German and
French, but you can change and reorder the languages using the OntoStudio preferences.

82
OntoStudio User Manual Modeling

Synonyms
In this tab you can define synonyms in different languages for the selected element. The languages that are
displayed here can be configured in the preferences of OntoStudio. If you import old files containing synonyms
without language assignment, they are displayed in an additional table called "Without language information".
You can of course also use this table to enter synonyms without language assignment, like in the older
OntoStudio versions.

83
OntoStudio User Manual Modeling

84
OntoStudio User Manual Modeling

Meta Information

2.4 Instances
When you select a class all its instances are displayed in the Instances view:

Instances can be created, renamed and deleted in this component.


To define a new instance, choose a class, make a right mouse click on it and select New Instance. A new

85
OntoStudio User Manual Modeling

instance will be displayed, with a randomly generated name, e.g.: instance1106663037379, which can be
changed by the user.
Instances can be easily moved by dragging them to another class or by selecting Refactor>Move from the
context menu.

Entity Properties of instances


If an instance is selected, the properties of the instance are shown in the Entity Properties.

Local name: The name of the class.


Properties: Shows the identifier of the instance and a table containing the attribute and relation values. In
the first column the identifier of the property is shown and in the second column the attribute values or
related instances are shown. You can see that attributes are preceded by an icon and relations by
an icon.
You can also see that the attributes and relations are represented by trees:
The root elements are the identifiers of the attributes/relations
The property values are displayed as subelements (one row per value).
To change any of the properties, click on its cell in the Value column and a dialog box appears:

86
OntoStudio User Manual Modeling

If you are editing a relation, click on CTRL+SPACE and a list of the available instances will be displayed. You
can add the proposed instances of the Value column either by double-clicking on them or selecting them with
the arrow keys on your keyboard and pressing Enter. If you start typing in the cell, the available instances will
be filtered.
If you want to edit an attribute, just select the Value cell and type in the attribute value. Click on OK to save the
modified or added values.

Cardinalities
If the property value was modeled with the cardinality 1, then the Value table will contain only one row, so only
one value can be stored. If the cardinality is anything greater than 1, you can enter as many values as like. The
exact amount will not be checked.

Datatypes
When you try to enter a value with the wrong data type (for example, you try to enter letters whereas the data
type of the attribute is "number"), a message with the problem will be displayed and nothing will be written in
the field.
If you have to enter a value for an attribute of the "dateTime" type, a message with help instructions will appear
next to the field:
You can see that there are three possibilities of writing a dateTime value:
<year>-<month>-<day>T<hour>:<minute>:<second>, e.g. 1820-04-25T12:30:00
<year>-<month>-<day>T<hour>:<minute>:<second>+<hour>:<minute>, e.g. 1820-04-25T12:30:00
+03:15
<year>-<month>-<day>T<hour>:<minute>:<second>-<hour>:<minute>, e.g. 1820-04-25T12:30:00-
03:15
In case of the two last ones, the "+<hour>:<minute>" and "-<hour>:<minute>" represent the time zone.

Modifications
In order to modify the entered value, you can either delete it with the red cross in the Value table and enter a
new one or click on this value and modify it directly in the field. When you click on OK, the old value will be
replaced by the new one.
If an instance contains values for a property that is not defined in the schema, the values will be displayed with

87
OntoStudio User Manual Modeling

an error icon. If you try to modify them a warning message will be displayed, informing that this attribute does
not exist anymore and the values cannot be modified.
This can happen if you remove a relation/attribute and don't set the checkmark that instance values should be
deleted as well.

2.5 Relations
When you select a relation in the navigator tree, the Entity Properties are displayed. This chapter described the
corresponding tabs of the Entity Properties View.

Domains & Ranges

Domains & Ranges: Domain and Range define the classes connected by this relation. You can enter new
class in the Domain column. Min and Max define the cardinalities of the relation. The last two columns (
symmetric and transitive) define whether the relation is symmetric or transitive. The red cross deletes the
relation between the two classes but not the relation itself. Only if the last row is deleted in the table, the
relation is removed completely.
Inverse Relations:The Inverse column lists the relations that are inverse to the active relation.
NOTE: Additional Information about inverse relations:
In mathematical words, the relations r1 and r2 are inverse if we can conclude from A r1 B that B r2 A and vice
versa. For example, if a person A is a parent of person B, than we can conclude that person B is a child of

88
OntoStudio User Manual Modeling

person A and vice versa. So the relations "is parent of" and "is child of" are inverse to each other.

OWL Properties

RDF Properties

89
OntoStudio User Manual Modeling

90
OntoStudio User Manual Modeling

Comments and Labels

Labels: Allows you to define one preferred term per language.


Comments: In the text area you can write a description about the selected element in the language that is
selected in the drop down box. If you want to write a description for another language, simply choose the
language in the drop down box and write your description. By default, the documentation can be done in
English, German and French, but you can change and reorder the languages using the OntoStudio
preferences.
NOTE: the property pages for OWL and RDF look a little different! You can edit domain and range
independently!

2.6 Validating Ontologies


With the Ontology Validator you can check the validity of your ontologies, namely, whether they fit to some
constraints. To create constraints go to Window -> Preferences... -> Validator (see the "Preferences Menu"
chapter).
In order to check the validity of your ontologies proceed as follows:
1. Select an ontology, right-click on it and select Validate....

91
OntoStudio User Manual Modeling

The following form appears:

92
OntoStudio User Manual Modeling

2. Select the constraint(s) you want to check and click on OK.


The chosen constraint(s) are checked and the result is displayed on the Results tab:

3. To navigate to the entity that is not valid, click on the name in the Identifier column while pressing CTRL.

2.7 ObjectLogic Source Editor


The ObjectLogic Source Editor shows the content of the ontology as ObjectLogic in a textual editor.
1. To open the ObjectLogic editor, select either Edit ObjectLogic source or Edit ObjectLogic source
(without instances) from the context menu of an ontology.
You get a higher performance when you choose the option without instances. In case of e.g. renaming,
the ontology might become inconsistent, because the instances will remain untouched.

93
OntoStudio User Manual Modeling

The editor provides syntax highlighting or syntax errors warnings. The Outline displays the entities contained
in the currently edited ontology.

2.8 Visualizing an Ontology


You can display the ontology and all of the elements of the hierarchy (classes, properties, instances) in a
graph.

94
OntoStudio User Manual Modeling

1. Select Visualize Ontology from the context menu of an ontology element or select Show in Visualizer
from the context menu for a class element.

The Ontology Visualizer appears (only available for ObjectLogic):

95
OntoStudio User Manual Modeling

The ontology and all elements of the hierarchy (classes, properties) are displayed in a graph. Classes,
instances and inheritance hierarchy are displayed in a directed graph. Properties are displayed in a directed
graph. A zoom function and a rotate function are available. The layout of the graph is optimized automatically.
Left-clicking on an element in the Ontology Visualizer will refresh the visualization rendering and the clicked
element will become its centre.
The colours of the arrows of graph elements have the following meaning:
Grey arrows: Represent the connection between superclasses and subclasses or between a superclass
and an ontology root.
Orange arrows: Represent the connection between classes and properties.
Red arrows: Represent the connection between classes and relations.

2. To append all of the connections of an element to the current visualization without shifting the focus to
this element, right-click on an element.
3. To enable or disable different ontology entities, flag the appropriate check boxes in the legend which is
on the left hand side of the view.
4. To zoom in or out, you have the following alternatives:
Change the zoom value in the selection box or
Press "Ctrl & +" to zoom in and "Ctrl & -" to zoom out.
Use the mouse wheel while holding Ctrl pressed

2.9 Graph View


The Graph View provides a printing function and allows the export of a simple ontology graph to a PDF file. It is
only available for ObjectLogic.

96
OntoStudio User Manual Modeling

In the Setting Window you can select different templates to visualize the graph diagram.

97
OntoStudio User Manual Modeling

You can export the generated graph as a pdf document, a png image or use the print function.

2.10 Sharing a project


You can share a project with other people using the collaboration server. To create a collaboration project,
read the following instructions.
1. On the top level menu of OntoStudio, select File -> New -> Project....
A dialog box appears.
2. Select Ontology -> Ontology Development Project and click on Next.
The following dialog box appears:

98
OntoStudio User Manual Modeling

3. Enter the project name and select Collaboration Server as the Storage Type. Then click on Next.
The following dialog box appears:

99
OntoStudio User Manual Modeling

4. Enter your user name and password.


Your user name and password have to be provided if the server requires authentication.
5. Click on Finish.
The collaboration project is created.

If you select your collaboration project, the project properties will be shown in the Entity Properties. In the
Users section you will see a list of all users which are currently logged in on the collaboration server. If you
select your collaboration project, the Edit... button on the property page will allow you to change the connection
settings. A dialog will appear in which in which you can change the connection data of the collaboration server.
If you select an ontology, you will see the users that are currently working on the ontology in the Users section
of the property page.

100
OntoStudio User Manual Modeling

2.11 Querying Web Services


You can make queries in OntoStudio accessible as a Web service. You can define properties as input and
output parameters and deploy the query as a Web service to the underlying OntoBroker instance. For a
detailed description of OntoBroker Web services see the chapter "OntoBroker and Web Services (SOAP/
WSDL)" of the OntoBroker manual. The interface used to work with those deployed services is the "Eclipse
Webservices Explorer".
Prerequisite:
Define the Input and Output Parameters for the Query: Input parameters are defined by flagging the Show
checkbox on the query property page. Output parameters are defined using the syntax seen below: (Just
use some variable name preceded and followed by a $)

101
OntoStudio User Manual Modeling

1. Select a query in the Ontology Navigator and make a right click on it.
2. Select Web Services and Create and Test WebService in External Browser.

102
OntoStudio User Manual Modeling

You are asked for permission to open the system browser.


3. Click on Yes.
The default browser opens automatically, displaying the resulting Web service.
The following happens in the background:
A Web archive file containing the Web service definition (WSDL) is created and published to a certain
URL.
An internal Web server is started, and the Webservice Explorer application is launched.
Either the default system browser or an internal browser embedded in OntoStudio is opened, pointing to
the running application with the generated service URL.

4. Click on query.

103
OntoStudio User Manual Modeling

The query can now be executed from within the browser.


5. Click on Go.

The result is displayed (see below).

104
OntoStudio User Manual Modeling

If input parameters where defined (as described above), a form is displayed.


6. Enter values for those parameters.
The resulting object tree depends on the output parameters previously defined. For every attribute that was
defined as an output parameter a row should be displayed, showing the result. Relations are visualized by
child elements.
You can switch between this tree-like visualization, or the "Source View", which shows the raw SOAP
response in XML syntax. This can be especially important if something goes wrong. Then an error message
will be displayed in the "Source View" only, so remember to switch here in case problems arise.

105
OntoStudio User Manual Modeling

When a query is deployed as a Web service a check is made to see if there are services deployed from other
projects. In that case those services are removed via deleteDynamicSvc command (you will be asked for

106
OntoStudio User Manual Modeling

confirmation). For more information on Web services, see the OntoBroker documentation.

NOTE: Additonal Information about WSDL:


WSDL is an XML format for describing network services as a set of endpoints operating on messages that
contain either document-oriented or procedure-oriented information. The operations and messages are
described in an abstract way and then bound to a concrete network protocol and a message format to define
an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible
to allow describing of the endpoints and their messages regardless of what message formats or network
protocols are used to communicate. However, the only bindings described in this document describe how to
use WSDL in conjunction with SOAP 1.1, HTTP GET/POST and MIME.
For more Information visit the W3C Website.

107
OntoStudio User Manual Handling Rules

3 Handling Rules

3.1 Entity Properties View Overview


On the Entity Properties tab you can edit all of the properties for an element selected from the navigation tree.
Selecting a rule in the navigator will open a property page as shown below. This chapter describes the tabs of
the Entity Properties View.

Rule Diagram

Rule Diagram (Graphical Rule Editor)


Here you can formulate rules in a graphical way. The chosen rule will be displayed together with a name, a
namespace and a rule diagram. If the rule contains language constructs that are not supported by the
Graphical Rule Editor, the diagram will be empty and disabled.

Make a right mouse click to display the following context menu:

108
OntoStudio User Manual Handling Rules

There are four possible ways of creating a class in the Graphical Rule Editor:
Using drag and drop. Use drag and drop to drag classes into the Rule Diagram. The class will appear in
the Entity Property window.
Using the Context menu. Make a right mouse click anywhere in the Rule Diagram to display a context
menu. Then select Add Class (see above).
Using the Tooltip menu. Move the cursor across the Rule diagram to activate the tooltip menu, then click
on the Class icon (Add Class).
Using the Palette menu. Click on Class in the Palette menu, then make a left click on the Rule Diagram.

Rule Diagram Status


If a rule diagram contains errors, they will be shown in the status line, but warnings will be shown within the
diagram, marked with a warning symbol.
Possible common errors:
No HEAD/BODY
Aggregation cycle
Aggregation value or result parameters are not connected
Compile errors (example in the first screenshot)
Possible common warnings:
New rule (not shown in the diagram)
An element (class, instance, attribute) does not exist
A connection of two possibly incompatible types (example in the second screenshot)

ObjectLogic Source
In this tab you can see the textual ObjectLogic representation of your rule:

109
OntoStudio User Manual Handling Rules

You can edit your rule in a textual editor. To open this editor, click on Textual Edit..., which is in the bottom right
hand corner of the ObjectLogic Source tab.

Comments & Labels


See chapter Adding Comments and Labels.

110
OntoStudio User Manual Handling Rules

3.2 (De)activating Rules


In certain cases it can be useful to deactivate your rules, for example, when running a test without any rules or
a set of rules or just one specific rule.
To deactivate/activate a rule, proceed as follows:
1. Make a right click on the rule/rule folder you want to deactivate and select Deactivate Rule.

The deactivated rule is marked accordingly.

111
OntoStudio User Manual Handling Rules

2. To (re)activate the rule right click on the rule/rule folder and select Activate Rule.

3.3 Explaning Rules


You can use the Explanation Editor to create and edit explanations for rules. As ObjectLogic Rules can get very
complex, you can explain your results using natural language. The explanation text is stored and can be
displayed if you ask OntoStudio to show the explanation for an evaluated query.

112
OntoStudio User Manual Handling Rules

1. Make a right mouse click on a rule and choose Edit Explanation.

The tab Explanation Editor appears:

2. If you want to display all of the variables and instances used in the rule, click on the icon template.
Variables in the explanation that do not occur in the rule are highlighted in the text:

2. In the Explanation Editor write an explanation (natural language text) for the rule.
The text is stored when this editor loses the focus (i.e. when another component is activated).

113
OntoStudio User Manual Handling Rules

On the right there is a list of all of the (Unused) Body Variables and Instances used in the rule. These are the
same variables used in the Graphical Rule Editor.
3. If you want to add a variable or an instance of the list to your explanation, double click on an entry. Make
sure you add a blank before and after every occurrence of a variable, otherwise they will not be recognized
as such.
The variable/instance is added at the the current cursor position in the text and disappears from the list.
The created explanation is used within the query evaluation in explanation mode.

3.4 Materializing Rules


When you create a rule, the facts that are inferred by the rule are not visible in OntoStudio. You will only see the
inferred facts when running a query. If you want the inferred facts to be explicitly stored in you ontology, you can
use the rule materialization. To materialize a rule, follow these instructions:
1. Right mouse click on the rule (or a rule folder) and select Refactor -> Materialize....

A dialog appears.
2. Select the rules you want to materialize.
If you flag the Remove rules after materialization checkbox, all of the selected rules will be removed after the
materialization.
3. Click on Finish.

114
OntoStudio User Manual Handling Rules

The selected rules are evaluated and the results are stored in the ontology.

3.5 Creating Rules graphically


There is a Project (existsProject) that has some assigned resource (hasAssignedResource) and is
carried out by a team (isCarriedOutByTeam). The team is coordinated by a manager (
isCoordinatedByManager). The attribute existsProject has a boolean value (Value) ascribed. In such a
case the rule concludes that the project exists (the attribute existsProject equals true).
1. Create a class in the Graphical Rule Editor.
There are four possible ways:
Drag & drop
From palette
Using the context menü
Hover effect (toolbar)

115
OntoStudio User Manual Handling Rules

2. Add a Relation.
There are three possible ways of adding a relation.
Using a right click mouse
By clicking on a name
By choosing the relation name from the auto complete list
Proceed as follows:
a. Add relation node to class (from palette).
b. Choose a relation name.
c. Connect relation to another class.

116
OntoStudio User Manual Handling Rules

d. Create Connections Between Classes.


There are two ways of creating a connection between them.
Using the Palette menu. Click on ClassConection in the Palette menu, then drag and drop from the
Class Relation to another Class to set connections between them.
Using the Tooltip menu. Move the cursor across the Relation to activate the tooltip menu. A left or
right arrow will be displayed. Drag one of the arrows to the class (by keeping the mouse button
pressed) and drop it there.

117
OntoStudio User Manual Handling Rules

All relations that contain a class can be listed with CTRL+SPACE.

3. Adding a property (here: attribute). Same here as for relations.


Choose a property (here: attribute from the attributes list) (CTRL + SPACE).

118
OntoStudio User Manual Handling Rules

4. Add value to the selected attribute.


a. Click on the value field of the attribute and enter a value (depends on the data type of the attribute).
b. Additionally, you can also choose a comparison operator (for example, age < 30).

119
OntoStudio User Manual Handling Rules

5. Tagging an element as a conclusion of the rule.


If this configuration will occur, a "true" value will be assigned. Make a right mouse click on the
existsProject attribute and select Move to.

120
OntoStudio User Manual Handling Rules

The Final Rule

121
OntoStudio User Manual Handling Rules

Aggregations Sample
For more information, see the OntoBroker Enterprise Manual (chapter "Aggregations").

122
OntoStudio User Manual Handling Rules

Built-ins Example
For more information see the OntoBroker Enterprise Manual (chapter Appendix -> Built-ins).

123
OntoStudio User Manual Handling Rules

3.6 Debugging Rules


OntoStudio includes a debugging environment that is oriented towards an intuitive process of debugging. If
you have a query that is not returning the expected results, you can use the debugger to analyze the problem. It
helps you to identify whether rules are not connected properly or to isolate the rule(s) that is (are) not returning
the correct results.
1. To debug a query, make a right mouse click on the selected query and then click on Debug query.

124
OntoStudio User Manual Handling Rules

OntoStudio switches to the Rule Debug view:

125
OntoStudio User Manual Handling Rules

3.6.1 Rule Graph


The Hierarchy tab shows the query and all of the rules that are involved during evaluation in a tree structure.
The Internal axioms are also displayed here:

126
OntoStudio User Manual Handling Rules

The Graph tab displays the same information in a graph:

3.6.2 Rule Literals


The Rule Literals tab shows the conditions and the conclusions of the rule for a selected rule in the Rule
Graph view. The HEAD section shows the facts that are inferred and the BODY section shows the conditions
that have to hold. To help you to identify whether the rule is working properly, you can run the whole body or
even parts of the rule body

127
OntoStudio User Manual Handling Rules

If you select a rule part in the Rule Literals view, the Reference Explorer will show the rules that can evaluate
such a part:

128
OntoStudio User Manual Handling Rules

3.6.3 Tuples
This view displays the results of the selected rule.

3.6.4 Debug Monitor


This component displays the number of invocations of the rules (it will be updated automatically during
runtime):

129
OntoStudio User Manual Handling Queries

4 Handling Queries

4.1 Creating and executing a Query


1. In the Ontology Navigator select the concept for which you want to create a query, make a right mouse
click on the concept and choose New Query.

OR:

In the Ontology Navigator make a right mouse click on Queries, choose New Query...

... and select the concept in the Entity Properties view.

130
OntoStudio User Manual Handling Queries

2. Restrict the query results if necessary:


a. Flag the checkbox for the attribute, choose an operator in the selectbox Restriction and enter a
restriction.
b. Choose the relation: Click of the relevant buttons in the area Range.
3. To run the query, click on Run Query.
The result is displayed:

4.2 Editing a Query


1. Select the query in the navigator which you want to edit.
2. In the Entity Properies view choose the tab ObjectLogic Source.

131
OntoStudio User Manual Handling Queries

A text view of your query appears.


2. Click on Edit, which is in the bottom right corner of the ObjectLogic Source tab.
The text editor appears.

3. Edit your query in the text editor.


4. Click on OK.

4.3 Editing Options of a Query


1. Select the relevant query in the navigator.
2. In the Entity Properties view choose the tab Options.
The tab contains the identifier, the result and sort variables, the evaluation and the additional settings for the
query:

132
OntoStudio User Manual Handling Queries

3. Edit the options.


The changes are saved automatically.
For more information on the query options, see the relevant OntoBroker documentation chapter.

4.4 Displaying Results of Queries


The results of the query are displayed in the Results window:

The name of the query, the project name and the module are shown in the upper part of the Results tab. The
number of results is also displayed here.

133
OntoStudio User Manual Handling Queries

In the right hand corner you can find this tool bar:
This has the following functions:

1 Removing the current result page

2 Removing all of the result pages

3 Enabling switching between different results pages

When you click on the arrow of symbol 3, the results pages are listed in the following way:

These results pages are ordered and numbered from the most recent (index "[1]") to the oldest (with the
highest index; here "[6]"). The results page currently displayed is marked with the symbol at the beginning
of the line.
It is possible to select a single row or multiple rows in the results.

Hot Key Function

CTRL + A Selects the whole table

CTRL+ left mouse button Selects a single row

CTRL+C Copies the selected content to the clipboard

4.5 Copying Rules


If you need other rules that differ only in details, you can copy one rule to a new id.
1. Make a right mouse click and choose CopyRule... from the context menu.
A popup window appears:

134
OntoStudio User Manual Handling Queries

2. Edit the name and select a namespace.


3. Click on OK.
If you have entered an already existing name, the dialog will reappear.
If namespaces are toggled to visible, they may also be changed. Otherwise only the local id may be changed.
The copied rule will be created within the rule folder of the original rule.

4.6 Writing ObjectLogic Queries against modelled


Ontologies
1. From the top level menu click on Window -> Show View -> Other....

The following dialog box appears:

135
OntoStudio User Manual Handling Queries

2. Select OntoStudio Basic -> Textual Queries and click on OK.


The following perspective appears:

136
OntoStudio User Manual Handling Queries

3. Choose a project and a module.


By default the namespaces of the selected ontology are used, but you can user a different default
namespace for your query.
4. Select the tab with your desired language (ObjectLogic oder SPARQL).
The Textual Queries component can be used to run ObjectLogic as well as SPARQL queries.
5. Type a query into the text field.
6. Click on Execute.
The result is displayed on the Results tab at the bottom of the window.
The Textual Queries component contains a history of the last 10 executed queries.
7. To show the last queries, click on the arrow at the top of the results tab.
If a query is selected from the list, the project name, the module id, the default namespace and the query text
will be filled in the fields.

4.7 Running a Regression Test


The Regression Test Runner ensures the stability of an ontology and the correctness of the modeled rules
contained in your ontologies.
You can define test cases using the regression test feature. The query and the expected query result are
stored in such a test case. After a test case has been created, this test can be executed at any time against
the current state of the model. You will be notified whether the test(s) completed successfully or the returned

137
OntoStudio User Manual Handling Queries

result differs from the stored result set.


To create a new test, proceed as follows:
1. Make a right mouse click on the query and then click on New Test....

A dialog box appears:

138
OntoStudio User Manual Handling Queries

2. Fill out the empty fields.


You can choose a name for the test and a folder it should be stored in.
3. Click on Next.
The results of the query are displayed.
4. Click on Finish.
A new ".qrt" file is added to the test directory for the project.

139
OntoStudio User Manual Handling Queries

It's possible to copy/move tests and folders via drag and drop (only in the same project).
5. Select/execute a test.
The Entity Properties Page for this test is displayed in the main area of OntoStudio. The page contains the
query and the expected result set:

140
OntoStudio User Manual Handling Queries

6. The regression tests can now be run at any time. If at least one test or test folder is selected, you can
choose Run tests from the context menu.
All selected tests are evaluated and compared against the stored information. If a folder is selected, all of the
tests in the folder will be run.
The information about the correctness of the executed tests is shown in the Regression Test View. Here you
can see how many tests have been run, how many of them completed successfully and how many have
failed.
Sometimes when the model has changed, the results may differ from the results stored in the test case.
In that case, you have the possibility to accept the returned results by clicking on Accept at the bottom of
the page. The current results will then be stored as the expected results for the test case.

141
OntoStudio User Manual Handling Queries

7. To show the property page for the test which already contains the query text, select the test that has been
run.
8. To run the test again, click on Rerun test .

142
OntoStudio User Manual Handling Queries

4.8 Optimizing Queries


1. Make a right mouse click on the relevant query and then click on Optimize Query.

The following dialog box appears:

143
OntoStudio User Manual Handling Queries

2. Select the optimization method (see chapter Optimization Methods Overview).


3. Click on Next.
The following dialog box appears:

144
OntoStudio User Manual Handling Queries

4. Select the query to see configuration details.


5. Click on Finish.
The configurations are saved for the selected queries.

4.8.1 Optimization Methods Overview


OntoStudio supports multiple optimizers. Most of them just rewrite a set of rules into an optimized set of rules.
If you run an optimization, choose an optimization method that suits your scenario to get the best results. For
example, if you are trying to optimize a query that does not access a database then the database optimizers
are not a good choice. This chapter describes the different optimization methods which can be chosen from
the Optimization dialog box and their results.

Quick Configuration Optimization


This optimization works without the generation of time statistics. All of the configurations are tested but only
the fastest configuration is displayed:

145
OntoStudio User Manual Handling Queries

Query: The name of the optimized query.


Evaluation method: The name of the evaluation method.
Bottomup evaluator: The name of the evaluator.
Total time: The time the query needs to execute with optimization.
Speedup factor: The speedup factor of the optimized query.

Configuration Optimization with Time Statistics


Configuration optimization with time generation of time statistics. All configurations are tested. The execution
time and the speed up factor for all configurations are displayed.

146
OntoStudio User Manual Handling Queries

External Database Access Optimization


Quick configuration optimization for external database access. Only configurations with the minimum number
of dbaccessuser will be tested. For more information see the OntoBroker Enterprise Manual.

147
OntoStudio User Manual Handling Queries

Genetic Optimizer
Genetic algorithms (GAs) are evolutionary algorithms that use the principle of natural selection to develop a
set of solutions towards the optimum solution. GAs are not only quite powerful, but they are also very easy to
use as most of the work can be encapsulated into a single component. It would be necessary to define a
fitness function that determines how "good" a particular solution is in comparison with others. For more
information, see the OntoBroker Enterprise Manual.

148
OntoStudio User Manual Handling Queries

Folder and Save as: Here you can select the file name and the directory where an optimized query will be
saved.
Restrictions: If the Timeout option is activated you can insert a timeout. When this time expires the
optimization results will be shown, otherwise the timeout is deactivated
Optimization method: Here you can select the optimization method, execution time or memory
Additional information about the Genetic Optimizer:
Consider the following query: ?- p(?X)@_defaultModule AND _unify(?X,"a").
These facts are within the edb: p(a).\n p(b).\n [...] p(z).\n
If you calculate this query from left to right, you will first have to get all 26 facts, throwing away 25 of them after
the joining AND.
Now consider this query: ?- _unify(?X,"a") AND p(?X)@_defaultModule.
If evaluated from left to right, you just have to get the fact p(a), as the value of the variable X is bound to a.
Swapping the rules might speed up the evaluations.
There might be some cases where these heuristics fail. The genetic optimizer is a tool which guesses the
permutations of rules and evaluates them afterwards. The shorter the time compared with the other queries,
the bigger the chances that parts of this rule will be taken as blueprints for the next generation of rules. As the
search space is very big, this is very time-consuming.

149
OntoStudio User Manual Handling Queries

This scenario is for structures of queries that just exchange their constants and where the ontology stays
stable. If you optimize it for a query for my ancestors, it should also match a query asking for your ancestors. In
a way, it is a kind of an alternative for materializing parts of the ontology.
Where it should not be used:
Queries that have very short running times or ontologies that are often changed (as after each change it
could be necessary to run optimization again), ontologies with no defined query structure, where most
queries are used just once.

Hill Climbing Optimizer


Hill climbing can be used to solve problems that have many solutions, some of which are better than others. It
starts with a random (potentially poor) solution, and iteratively makes small changes to the solution, each time
improving it a little. When the algorithm cannot see any improvement anymore, it terminates. Ideally, at that
point the current solution is close to optimal, but it is not guaranteed that hill climbing will ever come close to
the optimal solution. For more information see the OntoBroker Enterprise Manual.

For more information see the OntoBroker Enterprise Manual.

150
OntoStudio User Manual Importing Ontologies

5 Importing Ontologies
OntoStudio provides many wizards that import ontologies from the file system and WebDAV, as well as
several wizards for importing ontology schemas from a couple of data sources into your ontology project. For
example, Outlook files, databases, remote running instances of OntoBroker, UML files, and files system meta
data, to name just a few. The import wizards are available under File -> Import (in the top level menu).

5.1 Importing from Filesystem


You can import ontologies of different file-types such as *.obl *.oxml, *.flo, *.rdf, *.rdfs, *.owl, *.n3, *.rif and *.nt.
1. Select in the top level menu: File -> Import....

The Import Wizard is launched.


2. Click on Ontology (File) -> Ontology from Filesystem.

151
OntoStudio User Manual Importing Ontologies

3. Click on Next.
The following window appears:

152
OntoStudio User Manual Importing Ontologies

4. Click on Browse... to choose the location of the ontology you want to import.
A new window appears.
5. Select the file containing the ontology.

153
OntoStudio User Manual Importing Ontologies

6. Click on Open.
The From File... field of the Import Wizard are filled out.
7. Click on Finish.
After the import process has finished, your ontology is now available and ready to use.

154
OntoStudio User Manual Importing Ontologies

The imported ontology is displayed.

155
OntoStudio User Manual Importing Ontologies

5.2 Importing from WebDAV Repository


1. Select in the top level menu: File -> Import....

2. Select Ontology (File) -> Ontology from WebDAV Repository:

156
OntoStudio User Manual Importing Ontologies

3. Click on Next.
The following dialog box appears:

157
OntoStudio User Manual Importing Ontologies

4. Select the project into which the ontology must be imported.


5. Click on Settings....
The following form appears:

158
OntoStudio User Manual Importing Ontologies

6. Check the Create a new connection to a WebDAV site box and then click on Next.
The following form appears:

159
OntoStudio User Manual Importing Ontologies

7. Create a new connection to a WebDAV site and then click on Finish.


8. Fill out the three fields and then click on Finish.
The Select WebDAV site field of the Import Wizard are filled out.

160
OntoStudio User Manual Importing Ontologies

9. Select the file containing the ontology and then click on Finish.
The ontology is imported.

Check out a specific version


The WebDAV import Wizard supports checking out a specific version of a file. This is done by adding
subNodes to the tree component that shows the files in the WebDAV import wizard. If there are different
versions of a file available, the file will be expandable and all of the versions shown below. If you select the
main file, the latest version will be checked out, if a specific version is selected, this version will be checked
out.
Ontologies imported from WebDAV (or ontologies that already have been exported to WebDAV) can be
replaced by other versions of the same ontology. If modules are selected, the user interface contains a
"replace" action. This action is only enabled if the module was imported from WebDAV or already exported
once to WebDAV. The replace wizard shows all of the versions of the ontology, and the version from the last
checkout/check-in will be marked. If you select a version, the module in the workspace will be deleted and the
selected version imported.

161
OntoStudio User Manual Importing Ontologies

5.2.1 Editing/deleting a WebDAV Connection


1. Select the Settings tab.
2. Check the Edit settings of the existing WebDAV site box, select a WebDAV site and then click on Next.
You can modify the chosen WebDAV connection.

3. You can modify the two last fields.


4. Click on Finish.
The modifications are saved.

5.3 Importing from Database Schema


You can create an ontology from an existing database schema. The pattern of a database is interpreted as a
simple ontology. Tables are taken as classes, columns as properties and columns with "foreign keys" as
relations. In addition, a set of rules is provided to connect the real facts in the database to the ontology.
This means that only the structure of the database is imported, but the real data resides in the database.
During runtime of a query, only the required facts are retrieved from the database in order to answer the query.
NOTE: Multiple imports from the same database within the same project can lead to serious performance
problems and are not allowed!
NOTE: It is not allowed to choose other columns as instance key if the table has a primary key!

162
OntoStudio User Manual Importing Ontologies

5.3.1 Importing a Database Schema


1. From the top level menu select: File -> Import....
2. Select Ontology (Other Sources) -> Ontology from Database Schema... and then click on Next.

The following form appears:

163
OntoStudio User Manual Importing Ontologies

3. Fill out the fields and click on Next.


You have to provide the connection data and the type of the database.
NOTE: It is possible to select a TimesTen database based on Oracle. This works in the following way:
a. Host and port remain empty
b. User and password must be filled
Otherwise the procedure is the same as described below.
4. Select the table owners to be imported and click on Next.
Only the selected owners are imported.

164
OntoStudio User Manual Importing Ontologies

NOTE: The Refresh button allows the import of a changed schema by refreshing the database cache, where
all the database schema information (table, column, primary keys, and so on) are cached.
5. Wait.
The connection with the database is being established.
6. Select the tables and the table columns to be imported and click on Next.

165
OntoStudio User Manual Importing Ontologies

Only the selected tables and columns are imported.


7. Select the ID for the instances and click on Finish.
The selected column(s) are imported as ID(s) for the instances.
The new ontology is added to the Ontology Navigator:

166
OntoStudio User Manual Importing Ontologies

NOTE: You can choose which column will be taken as ID for the instances. If the table already has a Primary
Key, the column will be automatically preselected. In this case you do not have to change it. But if no column is
preselected and you do not select at least one, then all of them will be taken as IDs which may lead to
performance problems (see the warning below). If you click on No, all of the columns will be taken as IDs. If
you click on Yes, you will be able to select one or several IDs for your instances.

5.3.2 Editing a database connection


1. Select Update schema import.. from the context menu.
2. Edit host, port and/or database name.
Other data can not be changed. The new database must contain all of the tables and columns that were
imported in the ontology from the old database.

5.3.3 Adding new schemas and tables


1. Select Update schema import... from the context menu.
2. Import table(s) from a database.
3. Select an imported ontology.
4. Select the DB Schema Import.
5. Select an additional schema (the imported schema should be displayed in grey and it is not possible to
edit them).

167
OntoStudio User Manual Importing Ontologies

6. Select additional tables.


The imported objects are displayed in grey and it is not possible to edit them.

5.3.4 Installing a JDBC-Driver


For database schema imports, an appropriate JDBC Driver for the database may be required. While
OntoStudio supports Oracle, MS SQL Server and DB2 out of the box, you may not redistribute other drivers,
such as MySQL.
If you have purchased a valid license for the driver, you can configure OntoStudio in the following way:
1. Copy the database driver to [OntoStudio]/extensions (e.g. mysql-connector-java-5.1.5-bin.jar).
2. Add the following lines to the OntoConfig.prp (located in the installation directory):
ExternalDB.OtherDatabase.Driver = com.mysql.jdbc.Driver
ExternalDB.OtherDatabase.ConnectionURL = jdbc:mysql://$host$/$name$
NOTE: Installing the MySql Driver for OntoStudio (to use the MySql DB Schema Import) as described above,
will not work until OntoStudio has been restarted with the -clean argument. This can be done by creating and
executing an OntoStudio.bat file within the OS directory containing the command OntoStudio.exe -clean.

5.3.5 Importing Oracle RDF


You can access RDF Data saved to the Oracle database. The mapping rules, which are created by import,
define concept_/2, directsub_/3, directisa_/3, directatttype_/6, representation_/4,
documentation_/4 and att_/4. RDF Data are shown in OntoStudio as classes, properties, and so on.

Oracle RDF Database Example


1. Create a tablespace for RDF Data:
CREATE TABLESPACE rdftblspace
DATAFILE '/oradata/orcl/rdftblspace.dat' SIZE 1024M REUSE
AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED
SEGMENT SPACE MANAGEMENT AUTO;

2. Create an Oracle RDF Network (Oracle 10g) or a semantic data network (Oracle 11g):
Oracle 10g:
EXECUTE SDO_RDF.CREATE_RDF_NETWORK('rdftblspace');
Oracle 11g:
EXECUTE SEM_APIS.CREATE_SEM_NETWORK('rdftblspace');

3. Create a table for RDF Data (the column with data type SDO_RDF_TRIPLE_S will be used for RDF Data):
CREATE TABLE rdftblname(id NUMBER, triple SDO_RDF_TRIPLE_S);

4. Create an RDF Model:


Oracle 10g:
EXECUTE SDO_RDF.CREATE_RDF_MODEL('modelname', 'rdftblname', 'triple');
Oracle 11g:
EXECUTE SEM_APIS.CREATE_SEM_MODEL('modelname', 'rdftblname', 'triple');

5. Insert RDF Data into the table:

168
OntoStudio User Manual Importing Ontologies

Classes:
INSERT INTO rdftblname VALUES (1,
sdo_rdf_triple_s ('modelname','http://a.b.c/Concept1',
'http://www.w3.org/1999/02/22-rdf-syntax-
ns#type','http://www.w3.org/2000/01/rdf-schema#Class'));

INSERT INTO rdftblname VALUES (2,


sdo_rdf_triple_s ('modelname','http://a.b.c/Concept2',
'http://www.w3.org/1999/02/22-rdf-syntax-
ns#type','http://www.w3.org/2000/01/rdf-schema#Class'));

Directsub_/3:
INSERT INTO rdftblname VALUES (3,
sdo_rdf_triple_s ('modelname','http://a.b.c/Concept3',
'http://www.w3.org/2000/01/rdf-schema#subClassOf','http://a.b.c/Concept1'));

INSERT INTO rdftblname VALUES (4,


sdo_rdf_triple_s ('modelname','http://a.b.c/Concept4',
'http://www.w3.org/2000/01/rdf-schema#subClassOf','http://a.b.c/Concept2'));

Directatttype_/6:
INSERT INTO rdftblname VALUES (5,
sdo_rdf_triple_s ('modelname','http://a.b.c/relation1',
'http://www.w3.org/1999/02/22-rdf-syntax-
ns#type','http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'));

INSERT INTO rdftblname VALUES (6,


sdo_rdf_triple_s ('modelname','http://a.b.c/relation1',
'http://www.w3.org/2000/01/rdf-schema#domain','http://a.b.c/Concept1'));

INSERT INTO rdftblname VALUES (7,


sdo_rdf_triple_s ('modelname','http://a.b.c/relation1',
'http://www.w3.org/2000/01/rdf-schema#range','http://a.b.c/Concept2'));

Directisa_/3:
INSERT INTO rdftblname VALUES (8,
sdo_rdf_triple_s ('modelname','http://a.b.c/instance1',
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type','http://a.b.c/Concept1'));

Representation_/4:
INSERT INTO rdftblname VALUES (9,
sdo_rdf_triple_s ('modelname','http://a.b.c/Concept1',
'http://www.w3.org/2000/01/rdf-schema#label','"testlabel"'));

Documentation_/4:
INSERT INTO rdftblname VALUES (10,
sdo_rdf_triple_s ('modelname','http://a.b.c/Concept1',
'http://www.w3.org/2000/01/rdf-schema#comment','docu'));

Att_/4:
INSERT INTO rdftblname VALUES (11,
sdo_rdf_triple_s ('modelname','http://a.b.c/instance1',
'http://a.b.c/relation1','instvalue1'));

You can find the full Oracle RDF Documentation with examples on the Oracle Home Page:
Oracle 10g: http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b19307/sdo_rdf_concepts.
htm#CIHDIBDE

169
OntoStudio User Manual Importing Ontologies

Oracle 11g: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28397/sdo_rdf_concepts.


htm#CHDJBDHF

OntoConfig Settings
To use the Oracle RDF Import with OntoStudio, set the OntoConfig parameters to the following:
ConceptNamesGround = off
useQueriesOnly = on
To use the Oracle RDF access in OntoBroker:
ConceptNamesGround = off

5.4 Importing from FileSystem Metadata


You can import the metadata from the local file system. Files and folders are imported as instances of the
corresponding file and folder classes with the filesystem specific meta data as attribute values (for example,
filename, creation date, size).
1. Select in the top level menu: File -> Import....
2. From Ontology (Other Sources) select -> Ontology from FileSystem MetaData and then click on Next:

170
OntoStudio User Manual Importing Ontologies

3. Select the data you want to import and then click on Next.
Only the selected data are imported.
The following form appears:

171
OntoStudio User Manual Importing Ontologies

4. Select the folder you want to import and click on Next.

172
OntoStudio User Manual Importing Ontologies

5. Select the folder you want to import and click on Finish.


The ontology is imported and relocated to the Ontology Navigator:

173
OntoStudio User Manual Importing Ontologies

All of the selected objects were imported as instances of the classes to File or Folder.

5.5 Importing from Outlook


You can import personal user data (e-mails, contacts, tasks calendar) from Microsoft Outlook into OntoStudio.
1. From the top level menu select : File -> Import....
2. From Ontology (Other Sources) select -> Ontology from Outlook and then click on Next.

This creates an ontology containing the imported Outlook data.


The following form appears:

174
OntoStudio User Manual Importing Ontologies

3. Select the data you want to import, open MS Outlook and then click on Next.
Only the selected data are imported.
The following form appears:

175
OntoStudio User Manual Importing Ontologies

4. Select the folder you want to import and click on Finish.


Only the selected folder is imported.
The import is in progress:

The following popup window appears:

176
OntoStudio User Manual Importing Ontologies

5. Click on Yes to make sure that the import wizard can access your Outlook data sets.
The imported ontology is visible in the Ontology Navigator:

NOTE: Unlike the other import functions, the Outlook Import does not establish a connection to its source data
during runtime but imports all of the data from Outlook during the import process.

5.6 Importing from Remote OntoBroker


You can integrate remote running instances of OntoBroker into a single ontology project. Therefore, the
ontology schema (class hierarchy) of the remote running Ontobroker is imported and rules for accessing the
remote instances during runtime are created.
1. From the top level menu select : File -> Import....
2. From Ontology (Other Sources) select -> Ontology from Remote OntoBroker and then click on Next.

177
OntoStudio User Manual Importing Ontologies

The following form appears:

178
OntoStudio User Manual Importing Ontologies

You have to connect to a remote OntoBroker.


3. Fill out the fields and click on Next.
4. Make sure that the external OntoBroker instance is configured and serviceable.
5. Select the modules to be imported.
Only the selected modules are imported.

179
OntoStudio User Manual Importing Ontologies

The imported ontology is visible in the Ontology Navigator:

180
OntoStudio User Manual Importing Ontologies

5.7 Importing from UML Diagram


You can import a UML diagram as an ontology.
1. From the top level menu select : File -> Import....
2. Select Ontology (Other Sources) -> Ontology from UML Diagram and then click on Next:

The following form appears:

181
OntoStudio User Manual Importing Ontologies

3. Click on Browse... to select an UML file.


The following form appears:

182
OntoStudio User Manual Importing Ontologies

4. Select a UML file and click on Open.


The From File field of the wizard is filled out automatically:

183
OntoStudio User Manual Importing Ontologies

5. Click on Finish.
The ontology is imported to the Ontology Navigator.

For more information on UML, visit the OMG Group Website .

5.7.1 Visualizing an Ontology Using UML


It is possible to visualize an ontology or parts of it using the UML export function of OntoStudio and the
"Topcased" UML editor.
Precondition:
The ontology has to be exported from OntoStudio as an UML file.
1. Download the RCP version of Topcased and install it.
The UML diagram can be viewed using the "Topcased" editor.
2. To start the visualization create a new Topcased project:
a. Start the tool.
b. Choose File -> New -> Project.

184
OntoStudio User Manual Importing Ontologies

c. Select Topcased -> Topcased Project.

d. Confirm by choosing Next.


e. Define a project name and confirm by choosing Finish.
3. Import the UML file from OntoStudio into the Topcased project:
a. Select the project.
b. Make a right mouse click and confirm by choosing Import….
c. Select General -> File System.

d. Continue by choosing Next.


e. Choose the destination of the folder that includes the appropriate UML file by clicking on Browse….
f. Confirm with OK.
g. Flag the checkbox next to the UML file that you wish to import.
h. Confirm by choosing Finish.

The UML file has now been imported.


4. Create the graphical illustration of the file:
a. Select the imported UML file in the project.
b. Choose New -> UML Model with TOPCASED.
c. Select Create from an existing Model.
d. From the Select: menu item choose the corresponding hierarchy level of the ontology.
e. From the Root Diagram dropdown list, choose Class Diagram.
f. Activate the checkbox Initialize the diagram with existing model objects.

185
OntoStudio User Manual Importing Ontologies

g. Confirm by choosing Finish.

The ontology is loaded as a UMLDI diagram.


This way it is possible to gain a graphical overview of the classes and properties. In the central area of the tool
you can recognize a drawing area. If the extent of the ontology allows it, Topcased loads all of the classes with
their properties into the drawing area. As this may be too overloaded, we suggest removing them in the first
instance to build an individual view of the ontology.

NOTE: If the ontology is too big to show on the drawing area, none of the classes will be loaded (a warning
message appears) and you don't have to perform the following four steps:
a. Move the mouse cursor onto the drawing area and press the left mouse button.
b. Choose “Control + A” on the keyboard.
c. Make a right mouse click and choose “Delete From Diagram”.
d. Confirm the appearing dialog.
The classes of the ontology are now removed.

5. Via drag and drop it is now possible to arrange only the appropriate classes of the ontology.
This way you can create an individual view of the classes.
a. Choose a class from Outline and pull it to the drawing area.
You can also arrange the classes with the mouse.
Repeat these steps until you have the desired graphical overview of your ontology.

186
OntoStudio User Manual Importing Ontologies

6. You can export your visualization as an image.


a. Make a right mouse click in the drawing area.
b. Choose Export to file….
c. Select the file format and save the visualization as an image.

Miscellaneous
1. To adjust the format of the drawing area, make a right click on the drawing area without a choosing a
class and choose Graphical Properties -> Change Diagram Properties.
2. To change the layout of the classes and properties, select a class or a property from the drawing area.
3. To change the visibility of certain elements of a class or property, select Graphics in the tab Properties in
the lower part and use the buttons Hide > and < Show.

187
OntoStudio User Manual Exporting Ontologies

6 Exporting Ontologies
The export function provides wizards for saving your ontologies in different file formats such as ObjectLogic,
OXML, UML, OWL or RDF(S).
Rules, queries and mappings are not supported by owl and rdf(s) and will not be exported. Furthermore,
cardinalities and also symmetric, inverse and transitive relations are not supported by the rdf(s)-export and
will also not be exported.

6.1 Exporting to Filesystem


You can export ontologies with different file-types such as *.obl *.oxml, *.flo, *.rdf, *.rdfs, *.owl, *.n3, *.rif and *.
nt.
1. From the top level menu, select : File -> Export...:

A new dialog box containing the ontology export wizard appears.


2. Select Ontology (File) -> Ontology to Filesystem and then click on Next:

188
OntoStudio User Manual Exporting Ontologies

The following form appears:

189
OntoStudio User Manual Exporting Ontologies

3. Click on Browse..., to specify to where you want to export the ontology.


The following form appears:

190
OntoStudio User Manual Exporting Ontologies

4. Choose the target directory, a name and a format for the file and click on Save.
The empty field in the export wizard is filled out:

191
OntoStudio User Manual Exporting Ontologies

5. Click on Finish.
The ontology is exported.

6.2 Exporting to WebDAV Repository


1. From the top level menu, select : File -> Export....
2. Select Ontology (File) -> Ontology to WebDAV Repository and then click on Next:

192
OntoStudio User Manual Exporting Ontologies

The following form appears:

193
OntoStudio User Manual Exporting Ontologies

You have to specify where you want to export the ontology to.
3. Choose a project, select an ontology and click on Settings....
The following form appears:

194
OntoStudio User Manual Exporting Ontologies

You have to specify a WebDAV repository.


4. Flag the Create a new connection to a WebDAV site checkbox, and click on Next.
The following form appears:

195
OntoStudio User Manual Exporting Ontologies

5. Fill out the three fields and click on Finish.


The following form appears:

196
OntoStudio User Manual Exporting Ontologies

You must provide the connection data to the WebDAV site.


6. Select the folder to which you want to export the ontology and click on Finish.
The ontology is exported.

6.3 Exporting to UML Diagram


1. From the top level menu, select : File -> Export....
2. Select Ontology (Other Sources) -> Ontology to UML Diagram and then click on Next:

197
OntoStudio User Manual Exporting Ontologies

The following form appears:

198
OntoStudio User Manual Exporting Ontologies

3. Choose a project, an ontology and click on Browse... to specify the destination the ontology is exported to.
The following form appears:

199
OntoStudio User Manual Exporting Ontologies

4. Choose the target directory and a name for the exported ontology and click on Save.
The empty field in the export wizard is filled out:

200
OntoStudio User Manual Exporting Ontologies

5. Click on Finish.
The ontology is exported.

For more information on UML, visit the OMG Group Website .

201
OntoStudio User Manual Integration

7 Integration

7.1 Mapping Ontologies


OntoMap is a plug-in for the ontology-management platform OntoStudio. You can create and manage ontology
mappings using a graphical interface:

Mappings can be specified based on graphical representation, using a schema-view of the respective
ontologies. You just have to understand the semantics of the graphical representation (e.g. an arrow
connecting two classes), you do not have to worry about the logical representation of mappings. You are
supported with the help of drag-and-drop functionality and simple consistency checks on property-mappings
(automatic suggestion of necessary class-mappings).

Consider this before starting a mapping:


OntoMap allows the creation of different "Mapping" types (class to class, property to class, property to
property).
Before you can map properties to the target ontology, there must be an attribute-class or a class-class
"Mapping", which specifies the identifier for the mapped instances within the Target ontology.
Filters can be specified for "class-to-class"- and "attribute-to-class"-mappings with which you can limit
those mapped instances based on their property values.

202
OntoStudio User Manual Integration

Action Buttons for Mapping:

1 Shows/hides all of the properties of the ontologies

2 Opens a dialog for selecting target ontologies

3 Opens a dialog for selecting source ontologies

Precondition:

The Integration perspective is active ( -> Other... -> Integration).

1. Drag&Drop your source ontology to the top left-hand box of the Mapping window:

The class hierarchy of the ontology appears in this top left-hand box:

203
OntoStudio User Manual Integration

When selecting a class its properties are shown within the class detail tree.
2. Drag&Drop your target ontology to the top right-hand box of the Mapping window.

The class hierarchy of the ontology appears in this top right-hand box.
3. Drag&Drop a class from the source ontology (left-hand side) onto a class from the target ontology (right-
hand side):

A mapping between the two classes is created and represented by an arrow.


Another way to create mappings is to use a mapping pattern. Mapping patterns are suggested in the mapping
pane. Depending on the actual selection within the source and target ontology, different templates are

204
OntoStudio User Manual Integration

suggested. When choosing a template the system guides you through the mapping definition process. In this
process you can fill out all of the necessary parameters needed for creating the mapping.
4. You can create a filter within the mapping pane: Fill out the fields in the Filters pane and click on Add:

Only instances matching the given filter criteria are returned as results.
An icon visualizes that a filter has been created:

5. Drag&Drop the properties to be mapped from the source to the target property.
You see an arrow between the mapped properties:

205
OntoStudio User Manual Integration

6. Define a transformation.
For property mappings it is possible to define functional transformations during the mapping process.
Therefore a transformation editor for the actual selected property mappings can be chosen within the
mapping pane.
a. In the Transformations pane select a transformation type and click on Next.

b. Write the transformation and click on save transformation.

206
OntoStudio User Manual Integration

There are 2 different types of transformations:


Mathematical transformations
These can be useful for numerical properties. Imagine that you have an attribute like "priceIn€" and you
want to map it to "priceIn$". In that case you can convert the €-value into a $-value using a mathematical
function by multiplying the input with the current dollar exchange rate. You can use the source attribute as
a variable by pressing the appropriate button.
String transformations
String transformations can be applied to alphanumerical properties to modify the outcome of the target
attribute values. Imagine that you want to add a suffix to every attribute value derived by this mapping. (For
example, the ID of the source ontology so that you can distinguish where the resulting value comes from).
To do this, just continue typing the suffix after the attribute ID (which is pre-filled in the text-area).

Suggesting Mapping Patterns:


Depending on the selected classes and properties within the Mapping View matching Mapping Patterns
are suggested.
The information required for a pattern is requested by a template:

207
OntoStudio User Manual Integration

Relation-Shortcut-Pattern:
The 'Relation-Shortcut-Pattern' maps two source classes with related intermediate classes to two target
classes related directly.
For example, within the target ontology ‘analyst’ has a direct relation ‘worksinProject’ to the class
‘Project’ whereas the relation between ‘analyst' and ‘Project’ in the source ontology is expressed by an
intermediate class ‘takepartTeam’.

208
OntoStudio User Manual Integration

Source:

Target:

Attribute-To-Relation-Instance-Pattern:
The 'Attribute-To-Relation-Instance-Pattern' maps an attribute value to a relation by creating an instance
of the target relation range with a corresponding attribute value.

209
OntoStudio User Manual Integration

For example, the values for the source attribute ‘Project_releasedate’ are mapped as instances of
‘Project’ and values of the target attribute ‘type’ and the relation ‘hasReleaseDate’ for the target class
‘Project’.

7. To display the instances of the selected class within the Instances area, click on the Link Instances with
class tree button or on the Refresh Instances button.

210
OntoStudio User Manual Integration

NOTE: Important for the work with the collaboration server:


Mappings created within one client are not visible within other clients until a refresh has been done on the
Ontology Navigator. This is only true for the Collaboration Server.

7.2 Integrating an Excel Data Sheet


The Excel Import does not rely on an import wizard like other import functions, but is rather realized by a stand-
alone application, the so-called "excel view".
1. From the top level menu select : Window -> Show View -> Other....
The following dialog box appears:

2. Select Integration -> Excel Annotation and click on OK.


The Excel Annotation perspective appears:

211
OntoStudio User Manual Integration

3. Click on the Open Spreadsheet icon, which is in the right hand corner of the view:

A File Chooser dialog appears:

212
OntoStudio User Manual Integration

4. Select the Excel file to be imported and click on Open.


The chosen file is imported.
5. Select the concept with which you want to annotate:

213
OntoStudio User Manual Integration

6. Select a section (SHIFT + mouse click) of the Excel data and click on Annotate selection.

214
OntoStudio User Manual Integration

The chosen section is selected and the following form appears:

7. Flag the Selection includes column-headers and the Annotate all available rows checkboxes.
Selection includes column-headers prevents the headers being displayed in your result.

215
OntoStudio User Manual Integration

Annotate all available rows is useful for including all of the rows in your result instead of just the
selected ones.
9. Select the properties for each column and then click on Finish.
The annotated instances are marked.
10. Create a query on the corresponding class with the annotated properties selected and then click on Run
Query....

The result of the query is displayed in the Results view:

216
OntoStudio User Manual

Legal Notice

semafora systems GmbH


Talstrasse 27E
64625 Bensheim
Germany
Phone: +49 6251 8008 382
Fax: +49 6251 8008 372
[email protected]
www.semafora-systems.com
Amtsgericht Darmstadt, HRB 91440
Umsatzsteuer ID Nr: DE-283-806-792

Disclaimer

All of the data and settings in this program have been checked and tested extensively. Despite taking great
care and making extensive technical checks, we cannot guarantee absolute accuracy, or completely correct
contents. No responsibility will be taken for technical errors and incorrect information or for their
consequences, e.g. effects on other programs. We are grateful to be informed of any errors at any time.
The information in this document reflects the level of information available at the time of going to press. Any
necessary corrections will be covered by subsequent versions.
semafora systems GmbH does not accept any responsibility or liability for changes caused by circumstances for
which they are not responsible.
We will accept no liability for problems with the Application Time Tracking caused by incorrect usage or for
any complications caused by third-party software.

Copyright

© Copyright 2017 SemEO Services GmbH


All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express
permission of semafora systems GmbH. The information contained herein may be changed without prior notice.
These materials are subject to change without notice. These materials are provided by semafora systems GmbH
for informational purposes only, without representation or warranty of any kind, and semafora systems GmbH
shall not be liable for errors or omissions with respect to the materials. The only warranties for semafora systems
GmbH products and services are those that are set forth in the express warranty statements accompanying such
products and services, if any. Nothing herein should be construed as constituting an additional warranty.

Trademarks

OntoBroker®, Ontoprise®, SemanticMiner®, SemanticGuide® and SemanticXpress® are registered trademarks of


SemEO Services GmbH. Parts of the technology in the products OntoStudio, OntoBroker®, OntoEdit,
OntoAnnotate, OntoCollect, OntoMap, SemanticGuide® and SemanticMiner® are patented or patent-registered.

Bensheim, January 2017

217

You might also like