Octopus

From STLab

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.


First test (6 October) : thing to check and do

  • I nomi dei campi dei form dovrebbero essere allineati a sinistra (ho visto che lo sono durante l'edit, ma anche nella pagina visualizzata dovrebbe essere così)

Domanda: quanta flessibilità abbiamo qui? Per esempio se volessimo permettere la scelta di alcuni elementi legati allo stile tipo il colore del font? esiste un modo di supportare (direttamente dal wiki) la modifica dei fogli di stile?


  • ho fatto una prova con il form per la category UseCase. Ho creato UseCase1. Nel form c'è il campo "has use case parent", l'help associato a questo campo dice "this field should be assigned with at least 1"

ci sono due problemini: (i) la frase dovrebbe essere "this field should be assigned with at least 1 value", (ii) non c'è questa restrizione nell'ontologia e mi sembra che tutti gli help siano uguali Risolto

  • Proprietà che hanno "Thing" nel dominio e/o nel range: per ora le inserisci in tutti i form, vero? nella versione con l'input interattivo, l'utente può aggiungerle o toglierle. Questo è giusto un check!
  • Problema con le combobox: utili per classi che hanno un numero finito di istanze, ma se volessi due valori per la stessa proprietà? Si può mettere anche qui il bottone "+" ? Ad esempio, per il campo "has interacting actor" voglio inserire "IKS-service" e "IKS-stack"
  • Il "has high level description" è una datatype property. Se inserisco un valore però, diventa un link rosso. Risolto
  • Se metto in un campo il nome di un'istanza che non esiste, viene creata un'istanza orfana di tipo. Dovremmo intercettare queste cose durante il salvataggio e supportare l'utente nel definire il tipo, in modo che la pagina venga poi creata col form corretto. Riusciamo a mettere il tipo automaticamente. Cioè, invece di avere un link rosso, il risultato del salvataggio è anche la nuova pagina con la categoria settata in base alla proprietà di cui l'istanza è valore, insomma in base al range della proprietà.
  • ho creato un'altra pagina UseCaseParent, e l'ho editata. Nel campo "has child use case" ho cominciato a digitare il nome dello use case che avevo creato prima ma l'autocompletion non ha funcionato. Sei sicura che è attivo?
  • alle query da mettere nella main page e fare in modo che l'utente possa cambiarle
  • a fornire link/bottoni facilmente raggiungibili per i servizi che octopus offre. Dovremmo trovare un modo di gestire tutte le funzionalità: ad esempio, creaform deve essere accessibile da tutte le categorie orfane, etc.


Work phases:

1- Input: Three input type: OWL, only RDF, OWL2.


2- Running: Autocompletation with all istances in all form fields, where there are restrictions the autocompletation will be a query on the individuals.


3- Export: To associate external known URI to resource. If there aren't the external URI it will be created through system as OKKAM. The more important external system are: OKKAM, FOAF PROFILE, LINKING DATA... This association is necessary in the last export phase, but also in the first input phase. If it's possibile use external URI to identify the resources, instead the internal wiki URI, the problem of maintaining all information in the wiki ontology, for the export phase, would be solved. The true important thing is to mantain the URI resorce contained in the ontology during the life of the wiki.

The wiki category will not became OWL class, but there will be the property "asCategory".



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