IndomitoGallo / semanticturkey

Automatically exported from code.google.com/p/semanticturkey
0 stars 0 forks source link

support the use of IRIs or/and rdfs:label of Resources #58

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
steps  reproduce the problem?
1. Open Ontology Panel
2. Browse to some webpage and select some short text with some Illegal URI 
character
say it is "Fehércsoki-trüffeles csokitorta" and drag it to owl:Thing  in 
<Ontology Panel>/<Class Panel> to create an instance in the current project
3. select some "related info" from the webpage and drag onto the 
<Fehércsoki-trüffeles csokitorta> Thing instance. 
select the "related info" is a further annotation of Fehércsoki-trüffeles 
csokitorta then click Annotate instance
4. Open Graph view of the Ontology panel Click owl:Thing then click 
Fehércsoki-trüffeles csokitorta 

Expected result:

Generated ann:Semanticannotation instance for <related info> shows up in the 
the Open Graph View without exception

Exception occours 

 as seen in Java Console ( some of the involved code lines are:)
java.net.URISyntaxException: Illegal character in query at index 132: 
http://127.0.0.1:1979/semantic_turkey/resources/stserver/STServer?service=cls&re
quest=getClsDescription&clsName=Fehércsoki-trüffeles 
csokitorta&method=templateandvalued&bnodeFilter=true
    at java.net.URI$Parser.fail(URI.java:2809)
(...)
it.uniroma2.art.semanticturkey.services.OWLServiceClient.getClassDescription(OWL
ServiceClient.java:77)
    at it.uniroma2.art.semanticturkey.services.OWLServiceClient.getChildrenOf(OWLServiceClient.java:50)
    at 
(...)
it.uniroma2.art.semanticturkey.graph.SimpleViewer$STGraphMouseListener.graphClic
ked(SimpleViewer.java:406)
    at edu.uci.ics.jung.visualization.control.MouseListenerTranslator.mouseClicked(MouseListenerTranslator.java:67)
(...)

I use 0.7.3-SNAPSHOT on Linux

additional info:
Q1: How to avoid URI Syntax error?
*If the Resource is represented by an IRI  it should be converted to URI when 
making a request

Q2:
*When the user drags a text onto  a Class (Or an instance )
namely when ST creates a Resource what should ST do?
a. create an IRI (URI with syntax error  currently)
b. or create URI + rdfs:label 

Q3:
How how does this effect the UI components?

Original issue reported on code.google.com by barat...@gmail.com on 26 Jan 2011 at 8:19

GoogleCodeExporter commented 8 years ago
Dear Zoltan,

thanks for the useful input, I'll address it (not immediately since we're 
thinking major changes for the next official version regarding annotation 
mechanism).
Howeverm, regarding your questions, at the moment the behavior is:
1) when u drag on a class, an instance for that class is being created, with an 
IRI taken after the selected text (actually IRI = defaultnamespace + 
localname_taken_from_annotated_text)
2) a semantic annotation (see ontology: 
http://art.uniroma2.it/ontologies/annotation) is created, with the text 
property being set to the same string as before

so, initially the local name of the IRI and the text of the semantic annotation 
(which is not a label of the resource) associated to it are being created and 
are equal. what may happen is that the user decides to chane thre name of the 
resource (IRI), so he can do that, and the annotation still remains unchanged 
('cause it is the real reference for that instance to a portion of text in a 
web page).

The graph has been added again (after disappearing from past versions) in 0.7.2 
(totally revamped with respect to previous one), but in effect it is still 
quite new and we expect quite a few other bugs to emerge :-)

Original comment by stell...@info.uniroma2.it on 26 Jan 2011 at 10:55