Dear TopBraid assistance folks,
I'm new to SPIN but have recently presented how useful it could be. So now I
need to actually be able to add it to an ontology. :) Unfortunately I'm having
trouble locating documentation and moderately complex examples for SPIN. If
documentation on available functions and more complex examples exist, where can
I find this information?
Now for one of the things with which I'm having trouble. I suspect there are
multiple things wrong with my code and don't expect full debug assistance. Just
being able to add a new instance of a class to the ontology when an instance of
a different class is imported into the ontology will get me started.
I'm importing a tab delimited spreadsheet containing EventReports. For each
EventReport I want to generate an Event. I know this sounds backwards. This
isn't for real-time operations at this point. I'm essentially back filling
from a log file to test out the value of query over an ontology.
So a simpler example using the purchases.rdf file is:
I added a service report that should be associated with each service contract
through the spin:rule. I try running inferences and nothing happens.
:Report
a owl:Class ;
rdfs:label "Report"^^xsd:string ;
rdfs:subClassOf owl:Thing .
:ServiceReport
a owl:Class ;
rdfs:label "Service report"^^xsd:string ;
rdfs:subClassOf :Report .
:reportFor
a owl:ObjectProperty ;
rdfs:domain rdf:Property ;
rdfs:label "report for"^^xsd:string ;
rdfs:range :Report .
:ServiceContract
a owl:Class ;
rdfs:subClassOf :Purchase ;
spin:rule
[ a sp:Construct ;
sp:templates ([ sp:object :ServiceReport ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "report"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate :reportFor ;
sp:subject
[ sp:varName "report"^^xsd:string
]
]) ;
sp:where ([ sp:object :ServiceContract ;
sp:predicate rdf:type ;
sp:subject spin:_this
])
] .
Best regards,
Michelle
--
-- 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