Hi Nicolas, yes SPIN templates are expected to have a URI - otherwise it is hard to reference/instantiate them. Why do you need bnode templates?
BTW if you send RDF source code snippets, please make them self-contained so that all information is present - using Turtle instead of RDF/XML (non-abbrev) usually does this right. Regards, Holger On May 6, 2012, at 6:47 AM, NVandenBossche wrote: > Hello, > > I have been doing a lot of testing with the SPIN API and I've > encountered this strange problem. > > I have found a workaround for it, but I though I'd mention it on this > mailing list, and perhaps maybe > someone has an explanation or a better solution. > > I created a SPIN Template that is a blank node, as follows: > > <rdf:Description rdf:nodeID="A5"> > <rdf:type rdf:resource="http://spinrdf.org/spin#Template"/> > <rdfs:subClassOf rdf:resource="http://spinrdf.org/spin#Templates"/ >> > <spin:constraint rdf:nodeID="A6"/> > <spin:body rdf:nodeID="A7"/> > <spin:labelTemplate rdf:datatype="http://www.w3.org/2001/ > XMLSchema#string">Rule for user {?userEntity}</spin:labelTemplate> > </rdf:Description> > > I've loaded this snippet into a Jena Model, and then registered all > templates and functions with the SPINModuleRegistry: > > SPINModuleRegistry.get().registerAll(settingsModel, null); > > When I try to access all Templates through: > > SPINModuleRegistry.get().getTemplates(); > > I don't get the Template that I had created. > > However, when I name the Template, I do get the Template when I call > the getTemplates() method: > > <rdf:Description rdf:about="http://example.org/Template1"> > <rdf:type rdf:resource="http://spinrdf.org/spin#Templates"/> > ... > </rdf:Description> > > > I don't know if this is expected behaviour, or if this is some fault > in the system. > > Any insight in this issue would be appreciated. > > Kind regards, > > Nicolas Vanden Bossche > > -- > 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 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 Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion 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
