Hi,

I am perplexed by the results I'm receiving from a simple SPIN rule.

The SPIN rule is part of a larger effort to add metadata to specific
classes so we can create a data migration capability.

In the attached file there is a class called Class_1.  This class has two
properties: predicate and isLiteral.  Predicate is used to point to a
property.  isLiteral is used as a flag to indicate if the specified
property is an owl:DataTypeProperty or not.

I'm attempting to use the following SPIN rule to set the value of isLiteral
based on the value of predicate.

DELETE {
    ?this st:isLiteral ?old .
}
INSERT {
    ?this st:isLiteral ?new .
}
WHERE {
    ?this st:predicate ?pred .
    ?pred a ?ptype .
    BIND (!spl:subClassOf(?ptype, owl:ObjectProperty) AS ?new) .
}

After setting inference to TopSPIN only, here's what happens:

I have two instances of Class_1.  Instance1 contains the triple:

instance1 predicate testProp1

where testProp1 is explicitly defined as both an
owl:InverseFunctionalProperty and an owl:ObjectProperty (redundant I know,
but it mirrors a situation I have in the real data and I cannot change it)

Instance2 is nearly the same:

instance2 predicate testProp2

where testProp2 is an owl:DataTypeProperty.

Based on the SPIN rule above, you would expect isLiteral to be true for
instance2 and false for instance1.

If you test the query in the SPARQL view you receive the expected results.
However if you run inferencing, instance2 is correct but instance1 receives
two triples for isLiteral - one false and one true.

I do not understand why the inference engine functions this way.

Any thoughts?  The attached file is what I'm using for testing.  TBC 3.6.1,
win7-64.

Thanks for your 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]
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


Attachment: Spin Rule Test.ttl
Description: Binary data

Attachment: Spin Rule Test.ttl.tbc
Description: Binary data

Reply via email to