Hey Holger,
I have a spin:Template with an argument (in gp: namespace):
:DescribeInstancesTemplate a spin:Template ;
spin:constraint [ a spl:Argument ;
spl:predicate :type ;
spl:valueType rdfs:Resource
] ;
spin:body [ a sp:Describe, sp:Query ;
sp:resultNodes (_:instanceVar) ;
sp:text """DESCRIBE ?instance WHERE {
{
SELECT ?instance
WHERE {
?instance a ?type .
}
} .
}"""^^xsd:string ;
sp:where ([ a sp:SubQuery ;
# full RDF representation follows here
_:instanceVar sp:varName "instance"^^xsd:string .
When called it like this
spin:constraint [ a gp:DescribeInstancesTemplate ;
gp:type owl:Ontology
] ;
I get the query I want (using the TemplateCall.getQueryString() method):
DESCRIBE ?instance
WHERE
{ { SELECT ?instance
WHERE
{ ?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#Ontology> }
}
}
However, if I change the template's query to use spin:text only:
:DescribeInstancesTemplate a spin:Template ;
spin:constraint [ a spl:Argument ;
spl:predicate :type ;
spl:valueType rdfs:Resource
] ;
spin:body [ a sp:Describe, sp:Query ;
sp:text """DESCRIBE ?instance WHERE {
{
SELECT ?instance
WHERE {
?instance a ?type .
}
} .
}"""^^xsd:string ] .
the ?type argument is not set:
DESCRIBE ?instance
WHERE
{ { SELECT ?instance
WHERE
{ ?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type
}
}
}
Is that the expected behaviour or am I missing something? spin:text syntax
is a really nice simplification, but I would expect Template and
TemplateCall to work the same way.
Martynas
graphity.org
--
-- 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
---
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.