OntoWiki icon indicating copy to clipboard operation
OntoWiki copied to clipboard

Auto complete predicates in 'Add Property' dialogue

Open frodeseverin opened this issue 12 years ago • 3 comments

When using the 'Add Property' button to add a property to a resource, a nice dialogue with suggested properties appears.

Suggested properties dialogue: add_property_autocomplete

A number of suggested properties (i.e. predicates) are listed, as well as a list of generally applicable properties.

Typing in the input box in the dialogue should provide auto-completion according to the defined prefixes, or at least according to the predicates in active use in the Knowledge Base.

Not so. Actually, adding a predicate is quite cumbersome and error prone.

Typing a prefix followed by a predicate and hitting enter seemingly adds the predicate to the top of the resource in question. However, upon selecting the resource radio button, finding a resource, and using the 'Save Changes' button, nothing seems to happen. After a while OntoWiki responds with the following error:

OntoWiki Error

Supplied resource <m:program> is not a valid URI.
back  home

After this the modified resource is inacessible to OntoWiki, and the only way to work around this is to navigate to the resource and prepend http://data.bbib.no/source/edit/r/ to the resource address, replacing the leading part of the URL.

The Turtle source looks like this:

ns2:konserter_fiolin_orkester_op77_d_dur ns1:komposisjonstype "nmbf:Fiolinkonserter" ;
                                         mo:composer ns2:johannes_brahms ;
                                         mo:instrument "Fiolin", "Orkester" ;
                                         mo:key "D-dur" ;
                                         mo:opus "op. 77" ;
                                         schema:name "Konserter, fiolin, orkester, op. 77, D-dur" ;
                                         a mo:MusicalWork ;
                                         <m:program> ns2:lustspiel_ouverture_op38_bfo_24111949 .

Removing the last predicate and saving solves the problem.

Now, entering http://www.kanzaki.com/ns/music#program in the aforementioned input box produces the desired result, and the Turtle source then becomes:

ns2:konserter_fiolin_orkester_op77_d_dur ns1:komposisjonstype "nmbf:Fiolinkonserter" ;
                                         mo:composer ns2:johannes_brahms ;
                                         mo:instrument "Fiolin", "Orkester" ;
                                         mo:key "D-dur" ;
                                         mo:opus "op. 77" ;
                                         schema:name "Konserter, fiolin, orkester, op. 77, D-dur" ;
                                         m:program ns2:lustspiel_ouverture_op38_bfo_24111949 ;
                                         a mo:MusicalWork .

It should be easier and less error prone to add properties to a resource. Autocompletion of properties seems to be the most viable solution.

frodeseverin avatar Sep 03 '13 10:09 frodeseverin

This seems to be an RDFauthor issue, could you please add this description there?

white-gecko avatar Sep 18 '13 21:09 white-gecko

Can you please check if your properties have the type rdf:Property explicitly written down in your model? The autocompletion should suggest such properties. However, I agree, it would probably be better if that information could also be derived. Also, I will look further into the other issue you mentioned about the flawed Turtle.

nareike avatar Sep 25 '13 14:09 nareike

using the develop branch i can't even use the "add property" button. The screen just grays out and thats it, reloading make the site again controllable but i still can't use the button. I get no errors, only some js warnings about deprecated functions

The button has 3 GET's, the response of the last one is empty @white-gecko @pfrischmuth i guess you should take a look at it.

_edit the button does work with the feature/php-composer branch version for me *_edit i can't reproduce the issue (bit we still don't seem to have autocomplete)

shinobu avatar Mar 06 '16 16:03 shinobu