This class designates a root or entry point for a suite of mappings. For services, a "mapping" embeds the concept of taking some input and returning some output. An individual of this class is the object of the sswap:operatesOn relationship from a Resource and has one or more sswap:hasMapping relationships to one or more Subjects. By differentially using sswap:operatesOn and sswap:hasMapping, one can for example, differentiate between a pair of lists and a list of pairs.
Properties
sswap:hasMapping | Required property that points to a Subject (often a blank node [no URL]). Graphs can have more than one sswap:operatesOn |
Examples: Building an RDG (Resource Description Graph)
1. canonicalResource has two relationships, a sswap:providedBy relationship to the web resource resourceProvider and a sswap:operatesOn relationship to a blank node of type sswap:Graph. This RDG is not yet complete because we have not yet specified the Subject/Object mapping of the Graph.
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sswap = "http://sswapmeet.sswap.info/sswap/" > <sswap:Resource rdf:about="http://sswap.info/examples/resources/canonical/canonicalResource"> <sswap:name>A canonical SSWAP web resource</sswap:name> <sswap:providedBy> <sswap:Provider rdf:about="http://sswap.info/examples/resourceProvider"/> </sswap:providedBy> <sswap:operatesOn> <sswap:Graph/> </sswap:operatesOn> </sswap:Resource> </rdf:RDF>
2. Below: the blank node of type sswap:Graph (which is the object of sswap:operatesOn) has a sswap:hasMapping relation to different blank node of type sswap:Subject. The RDG is still incomplete because the Subject is not yet defining a mapping (even an empty mapping) to an Object. By using combinations of multiple sswap:operatesOn and sswap:hasMapping predicates, you can unambiguously establish various data structures, such as 1:1, 1:many, many:1, and many:many mappings. Thus, for example, you can differentiate between a list of pairs and a pair of lists. SSWAP does not use RDF Containers (rdf:Bag, rdf:Seq, rdf:Alt) and user-defined Collections (rdf:List) because these would render the graph OWL Full. See www.w3.org/TR/swbp-n-aryRelations/#pattern2 for more on representing lists in OWL DL
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sswap = "http://sswapmeet.sswap.info/sswap/" > <sswap:Resource rdf:about="http://sswap.info/examples/resources/canonical/canonicalResource"> <sswap:name>A canonical SSWAP web resource</sswap:name> <sswap:providedBy> <sswap:Provider rdf:about="http://sswap.info/examples/resourceProvider"/> </sswap:providedBy> <sswap:operatesOn> <sswap:Graph> <sswap:hasMapping> <sswap:Subject/> </sswap:hasMapping> </sswap:Graph> </sswap:operatesOn> </sswap:Resource> </rdf:RDF>
For a completed RDG see Object.
Hint: Use the HTTP API You never need to write raw RDF/XML. Write your RDG (Resource Description Graph) in JSON (Javascript Object Notation) and use the HTTP API to automatically generate the RDF/XML document. See /make, Semantic Pipeline RESTful API /make, and /makeRDG. |