Skip to content

FAqT Service with Secondary Parameters

Tim L edited this page Jul 9, 2014 · 5 revisions

What is first

Let's get to it!

If you POST an instance of SecondaryParameters to a SADI service, it can use them to control its behavior.

[] a hello:SecondaryParameters; 
   hello:author_identification_stance hello:conservative .

The RDF above can be queried from within a FAqT Service with the following python/SuRF code:

      # Query the RDF graph POSTed: input.session.default_store.execute
      query = select('?stance').where(('?parameters', a, ns.HELLO['SecondaryParameters']),
                                      ('?parameters', ns.HELLO['author_identification_stance'], '?stance'))
      results = input.session.default_store.execute(query)
      for binding in results:
         print 'parameter! ' + binding[0]

It is very odd that the owl:Class for secondary parameters is within the namespace for the hello world, but we're just following what they specify. Yes, it makes sense to have a new class of SecondaryParameters for each service, but they should be a subclass of some sadi:SecondaryParameters class ...

@prefix hello: <http://sadiframework.org/examples/hello.owl#> .

Actually, let's just define the super class that we'd like: http://purl.org/twc/vocab/datafaqs#SecondaryParameters (sorry, we'll go define it "later"...) We need it for LiftCKAN.java to know what domain name to mint Linkset URIs into.

What is next

Clone this wiki locally