Still struggling a little.  The comment for spin:constraint states:

Links a class with constraints on its instances. The values of this
property are "axioms" expressed as CONSTRUCT or ASK queries where the
variable ?this refers to the instances of the surrounding class. ASK
queries must evaluate to false for each member of this class - returning
true means that the instance ?this violates the constraint. CONSTRUCT
queries must create instances of spin:ConstraintViolation to provide
details on the reason for the violation.

which to me sounds like the object of a spin:constraint triple should
only be a CONSTRUCT or ASK query, and the CONSTRUCT queries must return
only instances of spin:ConstraintViolation.  But your statement:
 
Since the arguments and attributes are attached to a class as
spin:constraint
 
Seems to say spl:Argument or spl:Attribute can be attached as a
spin:constraint, and I don't think either of them are either ASK or
CONSTRUCT queries.  Perhaps I'm getting lost in the meta levels?  Is
there an example where a default value is set in any of your example
ontologies so I can see where ConstructDefaultValues would come into
play?
 
Thanks,
Jeff


________________________________

From: Holger Knublauch [mailto:[email protected]] 
Sent: Wednesday, January 07, 2009 1:53 PM
To: [email protected]
Subject: spl:ConstructDefaultValues (was: Re: [tbc-users] Re: SPIN
Examplesand Videos posted)


Hi Jeff, 

spin:constructor can be used to add arbitrary triples to new objects
when they are created.

The particular template spl:ConstructDefaultValues is meant to be used
in conjunction with spl:Argument or spl:Attribute: It will look at any
defined default values for those arguments or attributes and make sure
that they are copied into the new instance at creation time. Since the
arguments and attributes are attached to a class as spin:constraint, the
constructor's template will need to look them up there.

I hope this makes it clearer?
Holger



On Jan 7, 2009, at 8:57 AM, Schmitz, Jeffrey A wrote:


        Looking in the spl.owl ontology I'm a little confused about the
slp:ConstructDefaultValues Template Class.  It states:
         
        This template can be attached as spin:constructor to a root
class such as rdfs:Resource to ensure that SPIN processors assign
default values to certain properties. Looks for any templates attached
as spin:constraints to the types of ?this and then assigns their
declared spl:defaultValues.

        and the spin:body is:
         
        CONSTRUCT {
        ?this ?predicate ?defaultValue .
        }
        WHERE {
        ?this a ?directType .
        ?directType rdfs:subClassOf* ?type .
        ?type spin:constraint ?attribute .
        ?attribute spl:defaultValue ?defaultValue .
        ?attribute spl:predicate ?predicate .
        }

        
         My confusion is, why is it looking for spin:constraints
attached to the type's (and super types') and not spin:constructor's?  I
thought it was spin construtors that set default values.
         
        Thanks,
        Jeff 
        






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
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-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to