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.
On Wed, Jan 11, 2017 at 1:12 PM, Lorenz B. <
[email protected]> 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 <[email protected]>
> 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
> <[email protected]
> >> 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 <
> >>>> [email protected]> 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
>
>