Holger: Thanks for your response. I was able to get my SPIN function to run following your advice (though the function does not do what I want -- that's another story). However I'm not clear that things are configured properly with my .spin.ttl file. I didn't find very specific TBC documentation on this topic (the SPIN tutorial is too high-level), so I looked for inspiration and examples to emulate, in particular looking at spl.spin.ttl under TopBraid/SPIN and kennedysSPIN.ttl under TopBraid/Examples. Although these two files have the same format, I don't understand why kennedysSPIN.ttl doesn't follow the file extension convention you mentioned, e.g., kennedys.spin.ttl. More of a concern is that my .spin.ttl file does not display in TBC as the other two do. These others each display an 'Ontology Overview' page in TBC; mine only displays a 'Resource Form' when I click on the home icon. The resource is not recognized as a local resource (it is in red in the tool bar).
Here is the preamble to my myFunctions.spin.ttl file: # baseURI: http://INSERT-PATH-HERE/myFunctions # imports: http://spinrdf.org/spin @prefix data: <http://INSERT-PATH-HERE/data#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix sp: <http://spinrdf.org/sp#> . @prefix spin: <http://spinrdf.org/spin#> . @prefix spl: <http://spinrdf.org/spl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . What am I doing wrong? Rich On Thursday, January 8, 2015 at 3:30:17 PM UTC-8, Holger Knublauch wrote: > > First you should make sure that the SPIN function is stored in a file > ending with .spin.* so that it will be picked up when the system starts. To > make sure it got registered, a restart also helps. > > Also the function must be an instance of spin:Function, not rdf:type > owl:Class (first row of your Turtle snippet below). > > Please get back to us if this does not resolve the issue. > > Thanks, > Holger > > > On 1/9/15, 9:23 AM, Rich Keller wrote: > > Hi. I am getting the following error when performing inferencing: > > WARN [Thread-25] (E_Function.java:89) - URI > <http://INSERT-PATH-HERE/data#dailyWITIcalc> > <http://INSERT-PATH-HERE/data#dailyWITIcalc> has no registered function > factory > > The function data:dailyWITIcalc is SPIN function that I created. > Presumably it is not properly defined. How do I go about debugging this > error? > > I am using TBC-SE v.4.5.0 on a Mac. > > Thanks, Rich > > PS: The function definition is below. > > data:dailyWITIcalc a owl:Class ; > rdfs:label "dailyWITIcalc"^^xsd:string ; > rdfs:subClassOf spin:Functions ; > spin:body [ a sp:Select ; > sp:resultVariables ( [ sp:expression [ > a sp:Sum ; > > sp:expression [ sp:varName "hourlyWITI"^^xsd:string ] > ] ; > sp:varName > "dailyWITI"^^xsd:string > ] ) ; > sp:where ( [ sp:object > data:ASPMhourlyARecord ; > sp:predicate rdf:type ; > sp:subject [ > sp:varName "hourlyData"^^xsd:string ] > ] [ sp:object [ > sp:varName "nasday"^^xsd:string ] ; > sp:predicate > data:reportingNday ; > sp:subject > spin:_arg1 > ] [ sp:object > spin:_arg1 ; > sp:predicate > data:hasWITIdata ; > sp:subject [ > sp:varName "air"^^xsd:string ] > ] [ sp:object [ > sp:varName "hourlyData"^^xsd:string ] ; > sp:predicate > data:hasASPMhourlyData ; > sp:subject [ > sp:varName "air"^^xsd:string ] > ] [ sp:object [ > sp:varName "nasday"^^xsd:string ] ; > sp:predicate > data:reportingNday ; > sp:subject [ > sp:varName "hourlyData"^^xsd:string ] > ] [ sp:object > [ sp:varName "hourlyWITI"^^xsd:string ] ; > sp:predicate > spin:_arg2 ; > sp:subject > [ sp:varName "hourlyData"^^xsd:string ] > ] ) > ] ; > spin:constraint [ a spl:Argument ; > spl:predicate sp:arg1 > ] ; > spin:constraint [ a spl:Argument ; > spl:predicate sp:arg2 > ] . > > > -- > 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] > <javascript:> > --- > 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/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.
