On 24/03/2017 23:51, Ilya Ushakov wrote:
Hi everyone,
I need to have calculated field on skos:concept named displayLabel.
The value of displayLabel should be concatenation of "skos:prefLabel"
and "comment" fields.
For this goal I made next:
1. Created comment and displayLabel properties
Both of them have:
rdf:type owl:DatatypeProperty.
rdfs:domain skos:Concept.
rdfs:range xsd:string
2. On skos:Concept I created spin:rule:
CONSTRUCT {
?this tr:displayLabel ?displayLabel .
}
WHERE {
BIND (trevn:displayLabelVal(?this) AS ?displayLabel) .
BIND (smf:trace("INFO: displayLabel {?1}", ?displayLabel) AS
?dummy) .
}
the code of magicProperty trevn:displayLabelVal:
SELECT ?displayLabel
WHERE {
?arg1 skos:prefLabel ?label .
OPTIONAL {
?arg1 trevn:comment ?comment .
} .
BIND (smf:if(bound(?comment), smf:buildString("{?label}
{?comment}"), ?label) AS ?displayLabel) .
}
3. I created test taxonomy and open it in TopBraid Composer.
When i run inside TopBraidComposer (Inference->Run Inference)
everything works fine.
4. When it runs inside EVN (after deploying), nothing is happening.
I even see nothing in tomcat logs.
Apparently spin:rule was not being executed.
I added graph with my properties to "includes" on General tab of
taxonomy, but there were no any effects.
So, is it possible to run spin:rules on skos:Concept instances? If,
yes, what i did wrong?
EVN does not automatically execute SPIN rules. As Irene indicates, if
you define a magic property with suitable rdfs:domain then this will be
shown on forms and computed on the fly.
Holger
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include the TopBraid
Suite family of products and its base technologies such as
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
---
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]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Group "TopBraid
Suite Users", the topics of which include the TopBraid Suite family of products and
its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
---
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/d/optout.