Octopus

From STLab

(Difference between revisions)
Jump to: navigation, search
(Code example:)
Line 31: Line 31:
== Code example: ==
== Code example: ==
 +
 +
Category and Property:
<pre>
<pre>

Revision as of 10:47, 18 June 2009

Contents

ImportOntology Version 1.0

Components of extension:

  • 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.


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>

ElenaSarti


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


Personal tools