Hi Chi Zhang,

SPARQL functions in general cannot have side effects (such as adding triples) because that would potentially modify the query results at execution time. So creating new triples is not possible with SPIN functions either. If you just want to return multiple values within the same function (e.g. to query an existing instance), you can use SPIN magic properties.

Holger


On 28/04/2016 6:23, Chi Zhang wrote:
Hi,

Is it possible to return an instance with some created properties for it from a SPIN function?
An example like return a vector back from vector cross product function.

RDF file:

inst:vector_1
      a       geom:Vector ;
      geom:x  "1.0"^^xsd:double ;
      geom:y  "1.0"^^xsd:double ;
      geom:z  "2.0"^^xsd:double .

inst:vector_2
      a       geom:Vector ;
      geom:x  "3.5"^^xsd:double ;
      geom:y  "-1.5"^^xsd:double ;
      geom:z  "1.5"^^xsd:double .

Is it possible to create a SPIN function, something like cross(v1, v2) to return a vector instance back with its associated x, y, z?

Thank you very much!





--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, 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 Enterprise Vocabulary Network (EVN), 
Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, 
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.

Reply via email to