Search Mailing List Archives
[protege-owl] createOWLThing / makeOWLThing confusion
weinanr at cs.tu-berlin.de
Thu Dec 6 16:28:50 PST 2007
On Dec 6, 2007 6:32 PM, Martin O'Connor <martin.oconnor at stanford.edu> wrote:
> Ralf Weinand wrote:
> > Hi Martin,
> > AFAIK the createOWLThing was renamed to makeOWLThing, but in 
> > (which is referenced in ) there is only
> > the createOWLThing defined. Which URI do I have to import in Protege
> > in order to use the makeOWLThing functionality?
> This has been fixed.
Thank you. Maybe createOWLThing could be annotated as deprecated.
> > Two more requests/suggestions:
> > 1. Could you add 3rd parameter in which one can define the Type of the
> > individual to be created.
> > Something like: makeOWLThing(?loc, ?x, b:Location) similar to the
> > method hasProperty(?x, b:hasLocation).
> It is not required because you can just classifiy the new indiviudal to
> be an instance of the appropriate type in the rule consequent.
So simple, so true...
> > 2. I only want to create a new instance, if no data-property of a
> > certain type exists for a given individual,
> > because I don´t want to have duplicates created if a rule fires a
> > second time.
> > e.g. I have the following rule:
> > a:Address(?x) ∧ a:street(?x, ?str) ∧ a:number(?x, ?no) ∧
> > swrlx:createOWLThing(?loc, ?x)
> > → b:streetname(?loc, ?str) ∧ b:number(?loc, ?no) ∧ b:hasLocation(?x,
> > If the rule fires twice, I have two Locations bound to the individual
> > and the individual
> > should not be classified as a Postaddress according to the n&s
> > condition "hasLocation exactly 1" (which by the way it does --> bug?).
> > I could add something like [hasLocation = 1](?x) also, but I think it
> > is not supported (yet). What do you think about it.
> The swrlx:makeOWLThing built-in can accept a variable number of
> arguments and an individual is only created for each unique patttern of
> the second and (optional) subsequent arguments. The atom
> swrlx:makeOWLThing(?loc, ?x, ?no) should ensure that the rule does what
> you want it to do.
Oh, all right, thanks for the hint! But what does 'each unique pattern of
... arguments' exactly mean? And in your example above what is "?no" used
for? I read the description of makeOWLThing but I still did not get it.
Could you provide a more concrete example please?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the protege-owl