rdfs:comment backend bug

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

rdfs:comment backend bug

Antonino Lo Bue (gmail)
Hi, I'm working with protege and RDF documents.
>
> When I use Documentation slot to insert rdfs:comment into ontology
> instances I watched at rdf file and I notice that sometimes the
rdfs:comment
> is written as attribute of class instead of subclass this seems to be a
> consequence of short strings (attribute) instead of long strings
(subclass).
>
>  Any tips?
>
>  Thanks
>
> Antonino Lo Bue
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: rdfs:comment backend bug

Nick Drummond
Antonio,

I'm not sure quite what you're saying here. Could you clarify the following:
1) Are you using the rdf(s) or default owl profile?
2) You are adding rdfs:comment annotations on individuals - are you
using the default annotations table?
3) Are you saying the annotations are being added to the class, instead
of the individual?
4) I don't follow the short strings/long strings argument - if the
comment is over a certain length this happens?
5) which version of Protege are you using?

Thanks

Nick

Antonino Lo Bue (gmail) wrote:

>Hi, I'm working with protege and RDF documents.
>  
>
>>When I use Documentation slot to insert rdfs:comment into ontology
>>instances I watched at rdf file and I notice that sometimes the
>>    
>>
>rdfs:comment
>  
>
>>is written as attribute of class instead of subclass this seems to be a
>>consequence of short strings (attribute) instead of long strings
>>    
>>
>(subclass).
>  
>
>> Any tips?
>>
>> Thanks
>>
>>Antonino Lo Bue
>>
>>    
>>
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: rdfs:comment backend bug

Antonino Lo Bue (gmail)
1) I'm using rdf default profile
2)I'm adding annotation on classes
3)I want to add a comment to class at rdfs file
4)see below
5)3.1.1 build 216

Eg1: (comment as element)
<rdfs:Class
rdf:about="http://medialab.pa.icar.cnr.it/Repository/xml-schemas/RDF/Hypervi
deo.rdfs#AVSpatioTemporalDecomposition"
rdfs:label="AVSpatioTemporalDecomposition">
 <rdfs:comment>
Class of audiovideo objects decomposed in spatiotemporal  manner. Each item
of this can be a decomposition or not of an audiovideo media.
</rdfs:comment>
<rdfs:subClassOf
rdf:resource="http://medialab.pa.icar.cnr.it/Repository/xml-schemas/RDF/Hype
rvideo.rdfs#MediaItem"/>
</rdfs:Class>

Eg2: (comment as attribute)
<rdfs:Class
rdf:about="http://medialab.pa.icar.cnr.it/Repository/xml-schemas/RDF/Hypervi
deo.rdfs#HyperLevel1" rdfs:comment="First depth level"
rdfs:label="HyperLevel1">



----- Original Message -----
From: "Nick Drummond" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, February 02, 2006 5:39 PM
Subject: [protege-owl] Re: rdfs:comment backend bug


> Antonio,
>
> I'm not sure quite what you're saying here. Could you clarify the
following:

> 1) Are you using the rdf(s) or default owl profile?
> 2) You are adding rdfs:comment annotations on individuals - are you
> using the default annotations table?
> 3) Are you saying the annotations are being added to the class, instead
> of the individual?
> 4) I don't follow the short strings/long strings argument - if the
> comment is over a certain length this happens?
> 5) which version of Protege are you using?
>
> Thanks
>
> Nick
>
> Antonino Lo Bue (gmail) wrote:
>
> >Hi, I'm working with protege and RDF documents.
> >
> >
> >>When I use Documentation slot to insert rdfs:comment into ontology
> >>instances I watched at rdf file and I notice that sometimes the
> >>
> >>
> >rdfs:comment
> >
> >
> >>is written as attribute of class instead of subclass this seems to be a
> >>consequence of short strings (attribute) instead of long strings
> >>
> >>
> >(subclass).
> >
> >
> >> Any tips?
> >>
> >> Thanks
> >>
> >>Antonino Lo Bue
> >>
> >>
> >>
> >
> >-------------------------------------------------------------------------
> >To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
> >
> >
> >
> >
>
> --
>
> Nick Drummond
>
> http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: rdfs:comment backend bug

Nick Drummond
Antonio,

Sorry for just getting back to you. I understand what you're saying now.
I don't believe it should make any difference to the meaning, although
obviously this makes it more difficult if you then want to parse the file.
This is a "feature" of the jena serialisation - it might be worth
posting a mail to them to find out if this was intentional.
In the meantime, you could also try the native writer (OWL->preferences)
which has been written to be more regular (but less compact) than the
jena writer.

Nick


Antonino Lo Bue (gmail) wrote:

>1) I'm using rdf default profile
>2)I'm adding annotation on classes
>3)I want to add a comment to class at rdfs file
>4)see below
>5)3.1.1 build 216
>
>Eg1: (comment as element)
><rdfs:Class
>rdf:about="http://medialab.pa.icar.cnr.it/Repository/xml-schemas/RDF/Hypervi
>deo.rdfs#AVSpatioTemporalDecomposition"
>rdfs:label="AVSpatioTemporalDecomposition">
> <rdfs:comment>
>Class of audiovideo objects decomposed in spatiotemporal  manner. Each item
>of this can be a decomposition or not of an audiovideo media.
></rdfs:comment>
><rdfs:subClassOf
>rdf:resource="http://medialab.pa.icar.cnr.it/Repository/xml-schemas/RDF/Hype
>rvideo.rdfs#MediaItem"/>
></rdfs:Class>
>
>Eg2: (comment as attribute)
><rdfs:Class
>rdf:about="http://medialab.pa.icar.cnr.it/Repository/xml-schemas/RDF/Hypervi
>deo.rdfs#HyperLevel1" rdfs:comment="First depth level"
>rdfs:label="HyperLevel1">
>
>
>
>----- Original Message -----
>From: "Nick Drummond" <[hidden email]>
>To: <[hidden email]>
>Sent: Thursday, February 02, 2006 5:39 PM
>Subject: [protege-owl] Re: rdfs:comment backend bug
>
>
>  
>
>>Antonio,
>>
>>I'm not sure quite what you're saying here. Could you clarify the
>>    
>>
>following:
>  
>
>>1) Are you using the rdf(s) or default owl profile?
>>2) You are adding rdfs:comment annotations on individuals - are you
>>using the default annotations table?
>>3) Are you saying the annotations are being added to the class, instead
>>of the individual?
>>4) I don't follow the short strings/long strings argument - if the
>>comment is over a certain length this happens?
>>5) which version of Protege are you using?
>>
>>Thanks
>>
>>Nick
>>
>>Antonino Lo Bue (gmail) wrote:
>>
>>    
>>
>>>Hi, I'm working with protege and RDF documents.
>>>
>>>
>>>      
>>>
>>>>When I use Documentation slot to insert rdfs:comment into ontology
>>>>instances I watched at rdf file and I notice that sometimes the
>>>>
>>>>
>>>>        
>>>>
>>>rdfs:comment
>>>
>>>
>>>      
>>>
>>>>is written as attribute of class instead of subclass this seems to be a
>>>>consequence of short strings (attribute) instead of long strings
>>>>
>>>>
>>>>        
>>>>
>>>(subclass).
>>>
>>>
>>>      
>>>
>>>>Any tips?
>>>>
>>>>Thanks
>>>>
>>>>Antonino Lo Bue
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>-------------------------------------------------------------------------
>>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>>
>>>
>>>
>>>
>>>      
>>>
>>--
>>
>>Nick Drummond
>>
>>http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
>>-------------------------------------------------------------------------
>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>
>>    
>>
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Jess and external address error

Antonino Lo Bue (gmail)
In reply to this post by Nick Drummond
Hi, I'm using JessTab in a OWL project, I want to obtain class name when
using slot-get function, in my ontology,
I have a class A with slot SLT1 with range of class B, eg I have an
individual A1 with B2 value in the slot SLT1.

When I try (slot-get A1 SLT1) I obtain
<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivid
ual> value but
I need the referenced Individual name (B2).

I tried with method of below mail but It doesn't work, Jess return this
error:
  Message: Not a list:
"<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivi
dual>" (type = EXTERNAL_ADDRESS).  Program text: ( foreach ?e ( slot-get
ACTIVATES_4 :TO ) ( printout t ( instance-name ?e ) crlf ) )  at line 97.

Antonino Lo Bue
CNR-ICAR Palermo


>Hi Chris,

>what you are actually getting back is a list of java objects,
>referenced by their address. If you want to access their properties
>(slot values for these instances) you have to loop over the list you
<get back:

>(foreach ?e (slot-get Courtship_begging_hypothesis
>hypothesised_function)
  (printout t (instance-name ?e) crlf))

>instance-name is a built-in function provided by JessTab to access
>instance names easily. For other slots you need to do another slot-get,
>e.g.

(printout t (slot-get ?e my_other_slot) crlf)

HTH

Dona

On May 12, 2004, at 9:55 AM, chris catton wrote:

>
> Hi,
> I'm completely new to Jess, and am trying to use the Jess Tab to find
> instances of a slot. I have a Class called Hypothesis_about_Function
> and
> a slot on this class called hypothesised_function.
> Courtship_begging_hypothesis is an instance of
> Hypothesis_about_Function
> and has two instances as values for hypothesised_function.
> When I do:
> Jess> (slot-get Courtship_begging_hypothesis hypothesised_function)
> I get:
> (<External-Address:
> edu.stanford.smi.protegex.owl.model.impl.DefaultSimpl
> eOWLInstance>
> <External-Address:
> edu.stanford.smi.protegex.owl.model.impl.DefaultSimple
> OWLInstance>)
>
> I expected to get the instance names - can anyone tell me what I'm
> doing
> wrong?
>
> Thanks,
> Chris

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Jess and external address error

samsontu

The JessTab function "slot-get" returns a list if the slot has
cardinality multiple; otherwise it returns a single object.

Samson


Antonino Lo Bue (gmail) wrote:

> Hi, I'm using JessTab in a OWL project, I want to obtain class name when
> using slot-get function, in my ontology,
> I have a class A with slot SLT1 with range of class B, eg I have an
> individual A1 with B2 value in the slot SLT1.
>
> When I try (slot-get A1 SLT1) I obtain
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivid
> ual> value but
> I need the referenced Individual name (B2).
>
> I tried with method of below mail but It doesn't work, Jess return this
> error:
>   Message: Not a list:
> "<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivi
> dual>" (type = EXTERNAL_ADDRESS).  Program text: ( foreach ?e ( slot-get
> ACTIVATES_4 :TO ) ( printout t ( instance-name ?e ) crlf ) )  at line 97.
>
> Antonino Lo Bue
> CNR-ICAR Palermo
>
>
>
>>Hi Chris,
>
>
>>what you are actually getting back is a list of java objects,
>>referenced by their address. If you want to access their properties
>>(slot values for these instances) you have to loop over the list you
>
> <get back:
>
>
>>(foreach ?e (slot-get Courtship_begging_hypothesis
>>hypothesised_function)
>
>   (printout t (instance-name ?e) crlf))
>
>
>>instance-name is a built-in function provided by JessTab to access
>>instance names easily. For other slots you need to do another slot-get,
>>e.g.
>
>
> (printout t (slot-get ?e my_other_slot) crlf)
>
> HTH
>
> Dona
>
> On May 12, 2004, at 9:55 AM, chris catton wrote:
>
>
>>Hi,
>>I'm completely new to Jess, and am trying to use the Jess Tab to find
>>instances of a slot. I have a Class called Hypothesis_about_Function
>>and
>>a slot on this class called hypothesised_function.
>>Courtship_begging_hypothesis is an instance of
>>Hypothesis_about_Function
>>and has two instances as values for hypothesised_function.
>>When I do:
>>Jess> (slot-get Courtship_begging_hypothesis hypothesised_function)
>>I get:
>>(<External-Address:
>>edu.stanford.smi.protegex.owl.model.impl.DefaultSimpl
>>eOWLInstance>
>><External-Address:
>>edu.stanford.smi.protegex.owl.model.impl.DefaultSimple
>>OWLInstance>)
>>
>>I expected to get the instance names - can anyone tell me what I'm
>>doing
>>wrong?
>>
>>Thanks,
>>Chris
>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>


--
Samson Tu                    email: [hidden email]
Senior Research Scientist    web: www.stanford.edu/~swt/
Stanford Medical Informatics phone: 1-650-725-3391
Stanford University          fax: 1-650-725-7944

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Jess and external address error

Antonino Lo Bue (gmail)
Thanks, but when I work with single cardinality slots how can I obtain
instances name?

With multiple cardinality I write this
         (foreach ?e (slot-get AVFocus_2 hypervideo:hasMediaItemNode)
(printout t "dsfds" (instance-name ?e) crlf))
where hypervide:hasMediaItemNode is a slot with multiple cardinality but
when this slot becomes single cardinalty how will proceed?

Thanks

Antonino Lo Bue





----- Original Message -----
From: "Samson Tu" <[hidden email]>
To: <[hidden email]>
Sent: Monday, February 13, 2006 5:28 PM
Subject: [protege-owl] Re: Jess and external address error


>
> The JessTab function "slot-get" returns a list if the slot has
> cardinality multiple; otherwise it returns a single object.
>
> Samson
>
>
> Antonino Lo Bue (gmail) wrote:
> > Hi, I'm using JessTab in a OWL project, I want to obtain class name when
> > using slot-get function, in my ontology,
> > I have a class A with slot SLT1 with range of class B, eg I have an
> > individual A1 with B2 value in the slot SLT1.
> >
> > When I try (slot-get A1 SLT1) I obtain
> >
<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivid
> > ual> value but
> > I need the referenced Individual name (B2).
> >
> > I tried with method of below mail but It doesn't work, Jess return this
> > error:
> >   Message: Not a list:
> >
"<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivi
> > dual>" (type = EXTERNAL_ADDRESS).  Program text: ( foreach ?e ( slot-get
> > ACTIVATES_4 :TO ) ( printout t ( instance-name ?e ) crlf ) )  at line
97.

> >
> > Antonino Lo Bue
> > CNR-ICAR Palermo
> >
> >
> >
> >>Hi Chris,
> >
> >
> >>what you are actually getting back is a list of java objects,
> >>referenced by their address. If you want to access their properties
> >>(slot values for these instances) you have to loop over the list you
> >
> > <get back:
> >
> >
> >>(foreach ?e (slot-get Courtship_begging_hypothesis
> >>hypothesised_function)
> >
> >   (printout t (instance-name ?e) crlf))
> >
> >
> >>instance-name is a built-in function provided by JessTab to access
> >>instance names easily. For other slots you need to do another slot-get,
> >>e.g.
> >
> >
> > (printout t (slot-get ?e my_other_slot) crlf)
> >
> > HTH
> >
> > Dona
> >
> > On May 12, 2004, at 9:55 AM, chris catton wrote:
> >
> >
> >>Hi,
> >>I'm completely new to Jess, and am trying to use the Jess Tab to find
> >>instances of a slot. I have a Class called Hypothesis_about_Function
> >>and
> >>a slot on this class called hypothesised_function.
> >>Courtship_begging_hypothesis is an instance of
> >>Hypothesis_about_Function
> >>and has two instances as values for hypothesised_function.
> >>When I do:
> >>Jess> (slot-get Courtship_begging_hypothesis hypothesised_function)
> >>I get:
> >>(<External-Address:
> >>edu.stanford.smi.protegex.owl.model.impl.DefaultSimpl
> >>eOWLInstance>
> >><External-Address:
> >>edu.stanford.smi.protegex.owl.model.impl.DefaultSimple
> >>OWLInstance>)
> >>
> >>I expected to get the instance names - can anyone tell me what I'm
> >>doing
> >>wrong?
> >>
> >>Thanks,
> >>Chris
> >
> >
>
> -------------------------------------------------------------------------
> > To unsubscribe go to
http://protege.stanford.edu/community/subscribe.html

> >
> >
>
>
> --
> Samson Tu                    email: [hidden email]
> Senior Research Scientist    web: www.stanford.edu/~swt/
> Stanford Medical Informatics phone: 1-650-725-3391
> Stanford University          fax: 1-650-725-7944
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Jess and external address error

samsontu

(instance-name (slot-get AVFocus_2 hypervideo:hasMediaItemNode))


Antonino Lo Bue (gmail) wrote:

> Thanks, but when I work with single cardinality slots how can I obtain
> instances name?
>
> With multiple cardinality I write this
>          (foreach ?e (slot-get AVFocus_2 hypervideo:hasMediaItemNode)
> (printout t "dsfds" (instance-name ?e) crlf))
> where hypervide:hasMediaItemNode is a slot with multiple cardinality but
> when this slot becomes single cardinalty how will proceed?
>
> Thanks
>
> Antonino Lo Bue
>
>
>
>
>
> ----- Original Message -----
> From: "Samson Tu" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, February 13, 2006 5:28 PM
> Subject: [protege-owl] Re: Jess and external address error
>
>
>
>>The JessTab function "slot-get" returns a list if the slot has
>>cardinality multiple; otherwise it returns a single object.
>>
>>Samson
>>
>>
>>Antonino Lo Bue (gmail) wrote:
>>
>>>Hi, I'm using JessTab in a OWL project, I want to obtain class name when
>>>using slot-get function, in my ontology,
>>>I have a class A with slot SLT1 with range of class B, eg I have an
>>>individual A1 with B2 value in the slot SLT1.
>>>
>>>When I try (slot-get A1 SLT1) I obtain
>>>
>
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivid
>
>>>ual> value but
>>>I need the referenced Individual name (B2).
>>>
>>>I tried with method of below mail but It doesn't work, Jess return this
>>>error:
>>>  Message: Not a list:
>>>
>
> "<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndivi
>
>>>dual>" (type = EXTERNAL_ADDRESS).  Program text: ( foreach ?e ( slot-get
>>>ACTIVATES_4 :TO ) ( printout t ( instance-name ?e ) crlf ) )  at line
>
> 97.
>
>>>Antonino Lo Bue
>>>CNR-ICAR Palermo
>>>
>>>
>>>
>>>
>>>>Hi Chris,
>>>
>>>
>>>>what you are actually getting back is a list of java objects,
>>>>referenced by their address. If you want to access their properties
>>>>(slot values for these instances) you have to loop over the list you
>>>
>>><get back:
>>>
>>>
>>>
>>>>(foreach ?e (slot-get Courtship_begging_hypothesis
>>>>hypothesised_function)
>>>
>>>  (printout t (instance-name ?e) crlf))
>>>
>>>
>>>
>>>>instance-name is a built-in function provided by JessTab to access
>>>>instance names easily. For other slots you need to do another slot-get,
>>>>e.g.
>>>
>>>
>>>(printout t (slot-get ?e my_other_slot) crlf)
>>>
>>>HTH
>>>
>>>Dona
>>>
>>>On May 12, 2004, at 9:55 AM, chris catton wrote:
>>>
>>>
>>>
>>>>Hi,
>>>>I'm completely new to Jess, and am trying to use the Jess Tab to find
>>>>instances of a slot. I have a Class called Hypothesis_about_Function
>>>>and
>>>>a slot on this class called hypothesised_function.
>>>>Courtship_begging_hypothesis is an instance of
>>>>Hypothesis_about_Function
>>>>and has two instances as values for hypothesised_function.
>>>>When I do:
>>>>Jess> (slot-get Courtship_begging_hypothesis hypothesised_function)
>>>>I get:
>>>>(<External-Address:
>>>>edu.stanford.smi.protegex.owl.model.impl.DefaultSimpl
>>>>eOWLInstance>
>>>><External-Address:
>>>>edu.stanford.smi.protegex.owl.model.impl.DefaultSimple
>>>>OWLInstance>)
>>>>
>>>>I expected to get the instance names - can anyone tell me what I'm
>>>>doing
>>>>wrong?
>>>>
>>>>Thanks,
>>>>Chris
>>>
>>>
>>-------------------------------------------------------------------------
>>
>>>To unsubscribe go to
>
> http://protege.stanford.edu/community/subscribe.html
>
>>>
>>
>>--
>>Samson Tu                    email: [hidden email]
>>Senior Research Scientist    web: www.stanford.edu/~swt/
>>Stanford Medical Informatics phone: 1-650-725-3391
>>Stanford University          fax: 1-650-725-7944
>>
>>-------------------------------------------------------------------------
>>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>
>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>


--
Samson Tu                    email: [hidden email]
Senior Research Scientist    web: www.stanford.edu/~swt/
Stanford Medical Informatics phone: 1-650-725-3391
Stanford University          fax: 1-650-725-7944

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html