Difference between revisions of "Fresnel Forms SMW extension"
(find/replace→User manual) |
(adapt for FF →User manual) |
||
Line 35: | Line 35: | ||
= User manual = | = User manual = | ||
− | Welcome to the Fresnel Forms user manual | + | Welcome to the Fresnel Forms user manual. This page offers instructions for Fresnel Forms in the form of an example interface creation session. It has a sequence of screen dumps with explanations. Users should be able to replicate this session after an installation. |
== Generating an interface == | == Generating an interface == | ||
− | To generate an interface, | + | To generate an interface, clear the SPARQL endpoint for your Fresnel Forms installation. Then load the Semantic Web triples from which you wish Fresnel Forms to generate an interface. Click "Generate" from the Fresnel Forms special page. The special page then displays code for the necessary wiki pages. It also displays a table of these wiki pages for the generated interface components. The triples you load to the endpoint can be of the ontologies for which the default interface is to be generated. They can also include user-tailored Fresnel style triples that cascade on top of the default triples Fresnel Forms generates. |
=== Enter URIs === | === Enter URIs === | ||
Line 45: | Line 45: | ||
[[File:OWFspecStart.png|thumb|500px|right|Entering the FOAF ontology URI in the Fresnel Forms special page]] | [[File:OWFspecStart.png|thumb|500px|right|Entering the FOAF ontology URI in the Fresnel Forms special page]] | ||
− | After installing Fresnel Forms, start a session by going to the '''Special:OWLwikiForms''' page on your wiki. | + | After installing Fresnel Forms, start a session by going to the '''Special:OWLwikiForms''' page on your wiki. Click on "Generate". Fresnel Forms will then generate an interface for the ontologies at your endpoint. |
<br clear=all> | <br clear=all> | ||
Line 52: | Line 52: | ||
[[File:OWFspecRan.png|thumb|500px|right|Report displayed after Fresnel Forms generates the default interface for the FOAF ontology]] | [[File:OWFspecRan.png|thumb|500px|right|Report displayed after Fresnel Forms generates the default interface for the FOAF ontology]] | ||
− | After a click on the "Generate" button, the Fresnel Forms special page shows a table of | + | After a click on the "Generate" button, the Fresnel Forms special page directly shows the generated code and the wiki pages to which it belongs. It also provides a table of the category, informbox, form and property pages that Fresnel Forms created for the interface. The user can then copy the code to the corresponding pages on the target wiki and then get started with annotating uses the forms created. |
The portion of the generated default Fresnel code for the FOAF ontology that applies to the class foaf:person is as follows: | The portion of the generated default Fresnel code for the FOAF ontology that applies to the class foaf:person is as follows: | ||
Line 76: | Line 76: | ||
[[File:OWFform.png|thumb|500px|right|Example of filling in a default FOAF Person form, with autocompletion for the property field "knows"]] | [[File:OWFform.png|thumb|500px|right|Example of filling in a default FOAF Person form, with autocompletion for the property field "knows"]] | ||
− | Fresnel Forms creates form pages that | + | Fresnel Forms creates form pages that use the Semantic Forms extension of Semantic Mediawiki. Each form conforms to a given class and lets the user enter values of properties with that class as their domain. A form field has autocompletion to pages of a given wiki category when the field corresponds with an object property whose range includes the ontology's class that corresponds with that category. In this figure, the "knows" field has autocompletion to wiki pages in the category Person. |
The informbox wiki page code that this example generates is: | The informbox wiki page code that this example generates is: | ||
Line 133: | Line 133: | ||
</pre> | </pre> | ||
<br clear=all> | <br clear=all> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:02, 28 December 2017
This is a work in progress.
Install instructions
- Download and install the prerequisites:
- git from https://github.com/LloydRutledge/FresnelForms/ the directory FresnelForms into the extensions directory
- Arrange a SPARQL endpoint server
- OWF is developed and tested with Jena/Fuseki
- The Fuseki quickstart instructions below can get you going with Fuseki (and OWF) fast
- The endpoint must match these requirements
- Supports SPARQL 1.1 that your OWF installation can CLEAR and LOAD to it
- Performs RDFS and OWL reasoning. Note that 4store does not support the required reasoning.
- Note: This SPARQL endpoint does not have to be the same as the one used by your Semantic MediaWiki, nor does your Semantic MediaWiki need to be using any SPARQL endpoint.
- Add to your wiki's LocalSettings.php file the following lines:
require_once("$IP/extensions/FresnelForms/FresnelForms.php" );
$wgRawHtml = true;
$owfgSparqlQueryEndpoint = 'http://localhost:3030/OWF/sparql';
$owfgSparqlUpdateEndpoint = 'http://localhost:3030/OWF/update';
- Replace the query and update endpoint URIs with those of the endpoint you installed for use by OWF
- Go to the page "Special:FresnelForms" on your wiki and try it out
Fuseki quickstart instructions
- Full instructions are at http://jena.apache.org/documentation/serving_data/index.html
- Go to the SNAPSHOT directory at https://repository.apache.org/content/repositories/snapshots/org/apache/jena/jena-fuseki/
- Download one of the distribution compressed directory files
- Decompress it to a directory suited for downloaded Java programs
- Copy the file config-OWL.ttl from the OWF directory to the Fuseki directory
- cd to the Fuseki directory
- Enter the commands:
export FUSEKI_HOME=.;
./fuseki-server --config=config-OWF.ttl &
- Fuseki is now running and ready for OWL Wiki Forms
- The variable assignment code above for LocalSettings.php should work as is with the default Fuseki server these quickstart instructions lead to
User manual
Welcome to the Fresnel Forms user manual. This page offers instructions for Fresnel Forms in the form of an example interface creation session. It has a sequence of screen dumps with explanations. Users should be able to replicate this session after an installation.
Generating an interface
To generate an interface, clear the SPARQL endpoint for your Fresnel Forms installation. Then load the Semantic Web triples from which you wish Fresnel Forms to generate an interface. Click "Generate" from the Fresnel Forms special page. The special page then displays code for the necessary wiki pages. It also displays a table of these wiki pages for the generated interface components. The triples you load to the endpoint can be of the ontologies for which the default interface is to be generated. They can also include user-tailored Fresnel style triples that cascade on top of the default triples Fresnel Forms generates.
Enter URIs
After installing Fresnel Forms, start a session by going to the Special:OWLwikiForms page on your wiki. Click on "Generate". Fresnel Forms will then generate an interface for the ontologies at your endpoint.
Get links to generated interface
After a click on the "Generate" button, the Fresnel Forms special page directly shows the generated code and the wiki pages to which it belongs. It also provides a table of the category, informbox, form and property pages that Fresnel Forms created for the interface. The user can then copy the code to the corresponding pages on the target wiki and then get started with annotating uses the forms created.
The portion of the generated default Fresnel code for the FOAF ontology that applies to the class foaf:person is as follows:
:defaultLenshttpxmlnscomfoaf01Person rdf:type fresnel:Lens ; fresnel:classLensDomain foaf:Person ; fresnel:showProperties foaf:currentProject , foaf:familyName ,foaf:family_name , foaf:firstName , foaf:geekcode , foaf:img , foaf:knows , foaf:lastName , foaf:myersBriggs , foaf:pastProject , foaf:plan , foaf:publications , foaf:schoolHomepage , foaf:surname , foaf:workInfoHomepage , foaf:workplaceHomepage .
Default interface
The following subsections show components from the default interface that Fresnel Forms generates for our example. All the user does to make this interface is enter URIs for the ontologies to generate the interface from.
Fill in a form
Fresnel Forms creates form pages that use the Semantic Forms extension of Semantic Mediawiki. Each form conforms to a given class and lets the user enter values of properties with that class as their domain. A form field has autocompletion to pages of a given wiki category when the field corresponds with an object property whose range includes the ontology's class that corresponds with that category. In this figure, the "knows" field has autocompletion to wiki pages in the category Person.
The informbox wiki page code that this example generates is:
{{Informbox Person |familyName=Berners-Lee |firstName=Tim |img=http://upload.wikimedia.org/wikipedia/commons/8/83/Tim_Berners-Lee-Knight-crop.jpg |knows=Conway Berners-Lee, Mary Lee Woods }}
View an informbox
Once the user fills a form and save it, it creates an informbox display show the page's new annotations.
Tailored interface
The administrator can fine tune the default interface Fresnel Forms generates by writing Fresnel triples that define additional interface style that cascades over the default. To give Fresnel Forms access to these cascading Fresnel triples, put them in an RDF file and include the URI of that file in the list of URIs given to Fresnel Forms to generate an interface from.
Cascade Fresnel to hide undesired properties
One possibility for cascading Fresnel style overriding the default style is the use of the fresnel:hideProperties property. To do so, make an RDF file with fresnel:hideProperties from the form lens for the undesired properties, and include a URI to that file in the list of ontologies to generate the interface from. The screendump here compared to the screendump in the "Fill in a form" section above has fewer displayed properties.
The Fresnel code that overrides default use of certain properties in the example here is:
:defaultLenshttpxmlnscomfoaf01Person rdf:type fresnel:Lens ; fresnel:hideProperties foaf:currentProject , foaf:family_name , foaf:geekcode , foaf:lastName , foaf:myersBriggs , foaf:pastProject , foaf:plan , foaf:publications , foaf:schoolHomepage , foaf:surname , foaf:workInfoHomepage , foaf:workplaceHomepage .
Cascade Fresnel to override property display defaults
Default Fresnel Forms interfaces render object property values as wiki page names. Cascading Fresnel style can override this default by assigning the fresnel:value property associated with the property to display with a fresnel value how how the wiki should display it. In the screendump here, the foaf:img property gets displayed as an image instead of a page name, as it was in the screendump in the "View an informbox" section above .
The Fresnel code that overrides defaults to show images as images rather than URIs is:
:imgFormat rdf:type fresnel:Format ; fresnel:value fresnel:image ; fresnel:propertyFormatDomain foaf:img .