Also Holger,
When I use the corrected Turtle in TBC, and I use OWLIM reasoner I get the
following error:
Reason:
java.lang.ClassCastException: org.openrdf.model.impl.BNodeImpl cannot be
cast to org.openrdf.model.URI
at
org.openrdf.sesame.sailimpl.OWLIMSchemaRepository$StatementImpl.getPredicate(OWLIMSchemaRepository.java:1105)
at org.topbraid.owlim.sesame.Sesame2Jena.getTriple(Sesame2Jena.java:79)
at org.topbraid.owlim.inference.OWLIM.addTriples(OWLIM.java:84)
at
org.topbraid.owlim.inference.SwiftOWLIMInferenceEngine.addTriples(SwiftOWLIMInferenceEngine.java:31)
at
org.topbraid.inference.change.AbstractInferenceChange.runReallyNow(AbstractInferenceChange.java:157)
at
org.topbraid.inference.change.AbstractInferenceChange.runReally(AbstractInferenceChange.java:124)
at
org.topbraidcomposer.inference.change.InferenceChange.access$0(InferenceChange.java:1)
at
org.topbraidcomposer.inference.change.InferenceChange$3.run(InferenceChange.java:90)
at java.lang.Thread.run(Thread.java:680)
But, it DOES give me the resultant triple I'm looking for, despite the
error, namely :Lloyd rdf:type :Uncle. So that tells me at least that the
restriction class seems to be defined correctly. However when I switch to
SPIN with OWL 2 RL profile, I do not get the desired inference result. I
can imagine that perhaps there is not a rule defined in OWL2-RL that would
infer the new triple, although I would have thought that it does. I'm now
wondering, are there other OWL 2 profiles available in TBC?
Thanks,
Tim
On Thursday, January 10, 2013 3:11:19 PM UTC-8, Holger Knublauch wrote:
>
> Hi Tim,
>
> the Turtle that Jena accepts looks like
>
> :Uncle
> a owl:Class ;
> rdfs:subClassOf :Person ;
> owl:equivalentClass
> [ a owl:Restriction ;
> owl:onProperty
> [ owl:inverseOf :hasBrother
> ] ;
> owl:someValuesFrom
> [ owl:onProperty
> [ owl:inverseOf :hasParent
> ] ;
> owl:someValuesFrom :Person
> ]
> ] .
>
> so your example had a few too many dots and was missing a closing bracket
> at the end. I haven't looked at the Turtle spec whether the dots should be
> allowed or not - if you think this is a bug please follow up on the Jena
> mailing list.
>
> It also lacked an rdf:type owl:Restriction triple.
>
> This is displayed by TBC in Manchester Syntax as
>
> inv(hasBrother) some (inv(hasParent) some Person)
>
> However the current TBC form widget doesn't seem to like this (unusual)
> construct so that editing the source code is your safest option at this
> time.
>
> ... or use SPIN which is arguably a more natural and more flexible way of
> modeling this scenario.
>
> HTH
> Holger
>
>
> On 1/11/2013 7:34, Tim Harsch wrote:
>
> Hi all,
> After reading the TBC getting started guide and some exploration of the
> restriction editor I find myself having difficulty creating a certain
> restriction class.
>
> First, my modeling problem and a relevant question took place here:
>
> https://answers.semanticweb.com/questions/20300/model-uncle-using-class-restrictions
>
> In that thread I was advised to try this solution:
>
> :Uncle owl:equivalentClass [
> owl:onProperty [ owl:inverseOf :hasBrother ]; # or :hasBrother if it's
> asserted to be symmetric
> owl:someValuesFrom [
> owl:onProperty [ owl:inverseOf :hasParent ]; # or :hasChild if it's
> defined
> owl:someValuesFrom :Person
> ] .
>
> I first tried to do this using TBC form editor but could not figure it
> out. Question 1: how do I model this using the form editor?
>
> I then tried a work around of just adding the turtle directly and then
> opening the file to see what TBC would do with the form for Uncle. But I
> get:
>
> Operation failed.
> Reason:
> com.hp.hpl.jena.shared.JenaException: org.openjena.riot.RiotException:
> [line: 51, col: 47] Triples not terminated properly in []-list
>
> The Turtle file is here:
> https://dl.dropbox.com/u/4464286/ForTopQuadrant/uncleProblem.ttl
>
> So, Question 2: Why is that turtle throwing an exception? It looks
> valid to me.
>
> Thanks for any help,
> Tim
> --
> -- You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include Enterprise
> Vocabulary Network (EVN), TopBraid Composer, TopBraid Live,
> TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to
> [email protected] <javascript:>
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en
>
>
>
>
>
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en