I am sorry, in theory I know most of things, but when it come to coding, I > make mistakes. > > I know Literal can be any string or integer value and resources are what we > used in our ontology (some things). > > Object of property FavioriteLeague is a resource : FACup, in this case, > whose URI is > > > > http://www.semanticweb.org/soccer# > <http://www.semanticweb.org/soccer#FavioriteLeague>FACup or > http://www.semanticweb.org/soccer#ChampLeague etc More important, the object of triples with the predicate rdf:type is either a URI u or a blank node b, i.e.
An RDF triple is basically defined as (old definition, RDF 1.1 is based on IRIs) t = U ∪B x U x U ∪B ∪L and for rdf:type triples we only have t = U∪B x rdf:type x U∪B with U being the set of URIs, B the set of blank node and L the set of literals. By the way, I don't know if "Faviorite" is correct in your language, but for me it looks like a typo. At least it doesn't look like proper English - favorite (US) or favourite is how I would write it > Thank you > > On Wed, Jan 11, 2017 at 2:04 PM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >>> How should I share the ontology, the attachment is not allowed here? >>> >>> I used this to execute the rule >>> >>> for (Iterator i = inf.listResourcesWithProperty(RDF.type, >>> favioriteleague); i.hasNext();) >>> { >>> inf.listStatements(null,RDF.type, "FavioriteLeague"); >>> >>> } >>> >>> I think the problem is here in the code. >> I don't know how often we told you that RDF resources are identified by >> URIs... >> Your class is >> >> http://www.semanticweb.org/soccer#FavioriteLeague >> >> and you use a literal >> >> "FavioriteLeague" >> >> in the code when you write >> >> inf.listStatements(null,RDF.type, "FavioriteLeague"); >> >> Please please read an RDF tutorial for the beginning. Please make sure >> that you understand the difference between literals and resources in RDF. >>> On Wed, Jan 11, 2017 at 1:12 PM, Lorenz B. < >>> buehm...@informatik.uni-leipzig.de> wrote: >>> >>>> Can you please share the whole ontology with us? >>>> And the snippet of code that loads + executes the rule. >>>>> *FACup* here is the resource in my ontology >>>>> >>>>> On Tue, Jan 10, 2017 at 11:40 PM, neha gupta <neha.bang...@gmail.com> >>>> wrote: >>>>>> Lorenz, what actually I did is created a data property in Protege : >>>>>> "FavioriteLeague". >>>>>> >>>>>> Then I wrote this rule: >>>>>> >>>>>> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type >>>>>> http://www.semanticweb.org/soccer#Team) " >>>>>> >>>>>> + "( ?x http://www.semanticweb.org/soccer#FACupGoals ?goals )" + >>>>>> >>>>>> "greaterThan(?goals,30) >>>>>> + " -> (?x http://www.semanticweb.org/ >> soccer#FavioriteLeague >>>>>> http://www.semanticweb.org/soccer#FACup )]"; >>>>>> >>>>>> >>>>>> On Tue, Jan 10, 2017 at 3:53 PM, Lorenz Buehmann >>>> <buehm...@informatik.uni- >>>>>> leipzig.de> wrote: >>>>>> >>>>>>> Sorry to say that, but with that one line of code I cannot help you. >>>>>>> >>>>>>> >>>>>>> It's not clear how you use the property. And as always, the correct >> URI >>>>>>> matters. If you have somewhere in the code a small type, then it will >>>>>>> create a different property. And if that property is not typed as OWL >>>>>>> data property, it will be an RDF property. OWL API and thus Protege >>>> will >>>>>>> render this then as OWL annotation property. >>>>>>> >>>>>>> >>>>>>> On 10.01.2017 12:49, neha gupta wrote: >>>>>>>> The data is stored in RDF/XML >>>>>>>> >>>>>>>> model.write(writer, "RDF/XML"); >>>>>>>> >>>>>>>> All other properties works fine and stored as data property but just >>>>>>> this >>>>>>>> one property is stored in Annotation area. >>>>>>>> Some weeks ago, I face the same problem but then it was fixed by >>>> random >>>>>>>> changes to code. I dont know in which situation this problem comes? >>>>>>>> I did not show the code because one type of code depends on other >> and >>>>>>> you >>>>>>>> will not be able to understand it easily. >>>>>>>> >>>>>>>> On Tue, Jan 10, 2017 at 2:22 PM, Lorenz Buehmann < >>>>>>>> buehm...@informatik.uni-leipzig.de> wrote: >>>>>>>> >>>>>>>>> You're missing again all necessary information... >>>>>>>>> >>>>>>>>> You don't show use the code and the data. What is the ontology? In >>>>>>> which >>>>>>>>> format do you save it and how? What do you expect from us with no >>>>>>>>> information like that? >>>>>>>>> >>>>>>>>> I don't see the problem so far. >>>>>>>>> >>>>>>>>> You load an OWL ontology that has the data property declarations, >> and >>>>>>>>> later on you write the same model to disk. Nothing will be >> converted >>>>>>>>> into an annotation property then. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 09.01.2017 22:17, neha gupta wrote: >>>>>>>>>> Hi >>>>>>>>>> I have a rule like this >>>>>>>>>> >>>>>>>>>> If a team Goal>30 in a League (PremLeague, ChampLeague etc) then >> it >>>> is >>>>>>>>> the >>>>>>>>>> team FavioriteLeague. >>>>>>>>>> >>>>>>>>>> FavioriteLeague is a data property to which teams will be assigned >>>>>>>>> through >>>>>>>>>> rules. But the problem here in my case is when I run the program, >>>> the >>>>>>>>>> FavioriteLeague property is saved in the "Annotations" section, >> near >>>>>>>>>> rdfs:comment and label. Also I see ManchesterCity >> FavioriteCategory >>>>>>>>>> PremLeague in Annotation section. >>>>>>>>>> >>>>>>>>>> Why this stored there and not as Data property of the team.? >>>>>>>>>> >>>>>>>>>> Thank you >>>>>>>>>> >>>> -- >>>> Lorenz Bühmann >>>> AKSW group, University of Leipzig >>>> Group: http://aksw.org - semantic web research center >>>> >>>> >> -- >> Lorenz Bühmann >> AKSW group, University of Leipzig >> Group: http://aksw.org - semantic web research center >> >> -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center