On 10/11/2013 1:50, [email protected] wrote:
Yes Holger, that might actually work. Looking forward to the next release!

Just checking, have you tried the approach (of making the function public) and does it work? I do not have time right now to experiment with those things myself, so if you have a patch then I could turn around a new version quickly.

Thanks,
Holger



Martynas

2013 m. spalis 7 d., pirmadienis 03:47:18 UTC+2, Holger Knublauch rašė:

    Hi Martynas,

    you may know that for SPIN rules it is possible to use
    sub-properties of
    spin:rule. People can define their own properties such as my:prepRule
    and my:postRule and use this for grouping. The SPIN API exposes
    this by
    allowing developers to pass in the rule predicate as an argument. The
    same mechanism could be used for constraints.

    If you look at SPINConstraints, you should see a call to the
    private method

             addConstraintViolations(results, instance, SPIN.constraint,
    false, stats, monitor);

    where the SPIN.constraint property is hard-coded. In your version,
    you
    could make this method public, or expose alternative versions of
    check
    with an additional parameter for the sub-property, similar to how
    SPINInferences does it.

    Would this work? I could add such a public method to the next
    release.

    In the absence of this change, the conservative solution is to use
    multiple files:

    main.ttl
    preconstraints.ttl (imports main.ttl)
    postconstraints.ttl (imports main.ttl)

    and then use the outer control logic to select which union graph
    to run
    over.

    Cheers,
    Holger


    On 10/2/2013 21:26, [email protected] <javascript:> wrote:
    > Hey,
    >
    > I'm receiving an RDF model which then goes through the following
    steps:
    > 1. pre-process SPIN validation (checking for missing properties
    etc)
    > 2. processing (building URIs for blank nodes, generating hashes
    from
    > passwords etc.)
    > 3. post-process SPIN validation (checking for processed properties,
    > existing resources with same URI etc)
    >
    > What I need is a way to group constraint templates (or their
    > instances?), so that some of them would only be executed during
    > pre-process, and others during post-process.
    > I've noticed the practice of grouping templates into super-classes,
    > but it gets complicated as for example dqc:MissingProperties
    could be
    > a pre-process constraint in relation to foaf:name, but
    post-process in
    > relation to :passwordHash property.
    >
    > Any ideas on how to go about this? The code I'm currently using to
    > register and execute constraints is:
    >
    >     getOntModel().add(model);
    >     SPINModuleRegistry.get().registerAll(getOntModel(), null);
    >     List<ConstraintViolation> cvs =
    > SPINConstraints.check(getOntModel(), null);
    >
    > Thanks,
    >
    > Martynas
    > graphityhq.com <http://graphityhq.com>
    > --
    > -- 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
    > Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
    > To post to this group, send email to
    > [email protected] <javascript:>
    > To unsubscribe from this group, send email to
    > [email protected] <javascript:>
    > For more options, visit this group at
    > http://groups.google.com/group/topbraid-users?hl=en
    <http://groups.google.com/group/topbraid-users?hl=en>
    > ---
    > You received this message because you are subscribed to the Google
    > Groups "TopBraid Suite Users" group.
    > To unsubscribe from this group and stop receiving emails from
    it, send
    > an email to [email protected] <javascript:>.
    > For more options, visit https://groups.google.com/groups/opt_out
    <https://groups.google.com/groups/opt_out>.

--
-- 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 Insight, 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
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
-- 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 Insight, 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
--- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to