Semantic Web Steps / Use Cases

The basic use cases are:

1. Harvest information via RDFa from a collection of documents.

2. Translate between RDF and Turtle.

3. Query RDF/Turtle locally via SPARQL.

4. Access SPARQL endpoints and process the results.

This step harvests information from a collection documents via RDFa 1.1
[1].  The input is any kind of markup that utilizes RDFa and the output is
either RDF or Turtle [2].

The step's declaration:

<p:declare-step type="p:harvest-rdfa">
   <p:input port="source" sequence="true" primary="true"/>
   <p:input port="initial-context"/>
   <p:output port="result" primary="true"/>
   <p:option name="output-type" select="'application/rdf+xml'"/>
   <p:option name="profile"/>
</p:declare-step>

Note: I'm not overly attached to the name.

The input is a sequence of documents from which an annotation graph is to
be harvested.  The result is the union of the graphs.

The 'output-type' controls the output vocabulary and can either be RDF
(application/rdf+xml) or Turtle (text/turtle), specified by media type.  If
the output is Turtle, a c:data element will wrap the tuples in Turtle
syntax.

The 'profile' option can either be the strings 'xml', 'xhtml', or 'html'
for the various defined RDFa profiles.  Other values are implementation
defined.


Also, we need steps that go between RDF and Turtle:

<p:declare-step type="p:turtle2rdf">
   <p:input port="source" primary="true"/>
   <p:output port="result" primary="true"/>
</p:declare-step>

<p:declare-step type="p:rdf2turtle">
   <p:input port="source" primary="true"/>
   <p:output port="result" primary="true"/>
</p:declare-step>

I could also imagine a local SPARQL [3] query step:

<p:declare-step type="p:sparql-query">
   <p:input port="source" sequence="true" primary="true"/>
   <p:input port="query"/>
   <p:output port="result" primary="true"/>
   <p:option name="output-type" select="'application/rdf+xml'"/>
</p:declare-step>

I'm not sure what other options people might want on a SPARQL query.

SPARQL end points are often accessed over HTTP and so we already have that
covered.  The results are often in Turtle, RDF, or possibly now RDFa.  The
above steps should help process that information.

[1] http://www.w3.org/TR/rdfa-core/
[2] http://www.w3.org/TR/turtle/
[3] http://www.w3.org/TR/rdf-sparql-query/

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 5 March 2013 18:44:37 UTC