Octopus

From STLab

Revision as of 10:09, 1 September 2009 by ElenaSarti (Talk | contribs)
Jump to: navigation, search

Contents

ImportOntology (with the help of OWiki)

The main workflow follows this order:

  • the user can load an OWL ontology through a special page of SMW.
  • the web service sends the file to the java application by a request.
  • the java application loads the ontology with Jena library in order to identify classes, properties, istances etc...
  • the workflow passes to the php extension that creates wiki pages.
  • The php extenction is able to get the ontology information by calls to the web service to generate wiki pages. In particolar the php extension generates Categories, Properties, Templates, Forms anche Istances.


Owl management

There aren't the distinction between Tbox and Abox.

  • Class type:
    • defined class
    • equivalent class
    • enumerated/nominal class: combobox of ten elements and button to visualize the others, or autocompletation.

Rules: all class becomes a wiki category. The nominated classes and the equivalent classes are managed in the same way.


  • Restriction type:
    • for object property: owl:someValuesFrom, owl:allValuesFrom, owl:hasValue, owl:minCardinality, owl:cardinality, owl:maxCardinality, owl:onClass
    • facet for data type property: xsd:minEsclusive, xsd:minInclusive, xsd:maxEsclusive, xsd:maxInclusive, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern, xsd:totalDigits, xsd:fractionDigits

rules: some, only --> autocompletation with query.


  • Particolar case:
    • an individual belongs to 2 classes that have not hierarchical relationships: merge of the classes or the user chooses one class...

Technical requirements:

Java application:

The task of java applicaton is to read and to interpret the ontology content. In particolar it identifies the classes with its properties and the istances with its value properties. Jena library is able to interpret the ontology with the help of Pellet reasoner in order to generate complete information. The java application does not generate wiki code, but only xml document in order to mantain the logical separation of the differente task. The java application generates one XML document for the classes, one for the properties and one for the istances when it loads the OWL ontology. After, if it's required, it generates two other XML document for the properties class with its type, and the properties istances with its value.

Web service:

The web service allows the comunication between tha php extenction and java application. It allows to have a call to pass the ontology information. It's implemented with GlassFish (https://glassfish.dev.java.net/).

Php Application

Php Application has the task to generate the wiki page, so it needs to have a call to web service to get the ontology information. The php application has a different web service call, in particolar a call for all categories, a call for all properties, and a call for all istances. During the category creation it receives a new call for any category to get its property. In the same way, it has a call for any istances to get its value propeties.

There's an important concept: for any category it will be created a template that has the same properties of this. Afterwards, in the same way, it will be created a form in order to generate the instances...


Components of extension (it will be implemented in the final version):


  • One or more special pages to manipulate the wiki structure:
  • Pages contain a view of the category list of properties derived from the ontology. The user can decide which properties to associate to the class and can create new ones. Confirmed the structure of the class, you can define the templates. A template is created in the image of the class by default. There is a way for creating multiple templates with only a part of class properties. After creating templates, it is possible to create a form with the combination of one or more templates that can be associated to categories.
  • Special page to populate the wiki:

List of istances found in the ontology through category. It is possible to choose which applications to include in the wiki and which to ignore.


The result:

  • The ontology classes become categories of the wiki. Within a page of categories there is a possible reference to a form, in this way the user is able to edit the page with the form.
  • Each template has a page and each field must keep his correspondence with a property to allow the RDF export.
  • There will be a page for each property.
  • There is a page for every form that contains a reference to one or more templates from which it takes its structure.
  • Each instance will have a page that contains a reference to one or more templates, through one template is possible to know the category.


Wiki code example:

Category and Property:


Category: Person

[[Has default form::PersonForm]]


Property:NameProperty

This is a property of type [[Has type::String]].

Property:HasDog

This is a property of type [[Has type::Page]].


Property:AgePerson

This is a property of type [[Has type::Number]].

Property:BirthDate

This is a property of type [[Has type::Date]].


Template:PersonTemplate

<noinclude>
This is the 'PersonTemplate' template.
It should be called in the following format:
<pre>
{{PersonTemplate
|Name=
|Dogs=
|Birthday=
|WebSite=
|Age=
}}

Edit the page to see the template text.
</noinclude><includeonly>
{| class="wikitable"
! Name
| [[NamePerson::{{{Name|}}}]]
|-
! Dogs
| {{#arraymap:{{{Dogs|}}}|,|x|[[HasDog::x]]}}
|-
! Birthday
| [[BirthDate::{{{Birthday|}}}]]
|-
! WebSite
| [[WebSite::{{{WebSite|}}}]]
|-
! Age
| [[AgePerson::{{{Age|}}}]]
|}

[[Category:Person]]
</includeonly>



Form:PersonForm

<noinclude>
This is the 'PersonForm' form.
To add a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.

{{#forminput:PersonForm}}

</noinclude><includeonly>
{{{for template|PersonTemplate}}}
{| class="formtable"
! Name:
| {{{field|Name}}}
|-
! Dogs:
| {{{field|Dogs}}}
|-
! Birthday:
| {{{field|Birthday}}}
|-
! WebSite:
| {{{field|WebSite}}}
|-
! Age:
| {{{field|Age}}}
|}
{{{end template}}}

'''Free text:'''

{{{standard input|free text}}}


{{{standard input|summary}}}

{{{standard input|minor edit}}} {{{standard input|watch}}}

{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}
</includeonly>


Istance example: ElenaSarti


{{PersonTemplate
|Name=Elena
|Dogs=Gaudì, Dog2
|Birthday=1984/12/30
|WebSite=http://stlab.istc.cnr.it/stlab/User:ElenaSarti
|Age=24
}}


Personal tools