Menu

Protocol-Resource

Damian Gessler
Attachments

Resource


Provider      Resource      Graph      Subject      Object

Resource

This class designates the semantically described resource. Resources that "do things", for example, transform input (Subject) to output (Object), are called services. Resources must have exactly one Provider. Dereferencing the URL that claims to be of rdf:type sswap:Resource must return the resource's Resource Description Graph (RDG).

Properties

sswap:name Required property for the Resource's preferred name
sswap:providedBy Required property that points to the Provider that is providing the Resource. Resources can have at most one Provider. If a Resource claims to be provided by a Provider, the Provider must either explicitly reciprocate the relationship by using a sswap:providesResource predicate, or the Resource's URI must be a subpath of the Provider's path; e.g., http://sswap.info/examples/resourceProvider and http://sswap.info/examples/resources/canonical/canonicalResource. If resourceProvider would claim to provide www.YourWebsite.org/yourResource, yourResource must reciprocate the relationship by using the sswap:providedBy predicate pointing back to resourceProvider. See also Provider.
sswap:operatesOn Required property that points to a resource of type Subject. That resource is often a blank node (no URI). Resources can have more than one sswap:operatesOn. OWL DL does not allow the use of RDF Containers and Collections. By using the Subject class you can build complex data structures while remaining OWL DL compliant. This allows you, for example, to differentiate between accepting and returning data as a pair of lists or a list of pairs.
sswap:oneLineDescription Optional property for a brief (one line) description of the Resource. Should be human readable for display and use by search engines
sswap:aboutURI Optional reference to a web page for additional information about the Resource
sswap:metadata Optional reference to a text resource that may be used by search engines to richen the association of words or phrases with the Resource. The Resource has no control as to how, or if, the text is used by third-party engines.
sswap:icon Optional reference to an image representing the Resource (e.g., to be used in a visual pipeline or search result). Recommended size is 64 x 64 pixels in PNG format.
sswap:inputURI Optional reference to web page where the Resource can solicit input from a user
sswap:outputURI Optional reference to web page where the Resource can present (render) output for a user

Examples: Building an RDG (Resource Description Graph)

1. canonicalResource is a sswap:Resource. This RDG is not yet complete because we have not yet specified 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:Resource>

</rdf:RDF>

2. canonicalResource is a sswap:Resource and has a sswap:providedBy relationship to the SSWAP Provider resourceProvider

<?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: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.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.