<?xml version="1.0" encoding="UTF-8"?>  

<!DOCTYPE rdf:RDF [
    <!ENTITY rdf       "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <!ENTITY xsd       "http://www.w3.org/2001/XMLSchema#">
    <!ENTITY owl       "http://www.w3.org/2002/07/owl#">
    <!ENTITY sswap     "http://sswapmeet.sswap.info/sswap/">
    <!ENTITY nar       "http://sswap.info/proxies/NAR/databases/ontology/">
    <!ENTITY tax       "http://sswapmeet.sswap.info/NCBITaxonomyRecord/">
    <!ENTITY provider  "http://sswap.info/examples/">
    <!ENTITY resource  "http://sswap.info/examples/resources/taxonomyLookupService/">
]>


<rdf:RDF xmlns:rdf       = "&rdf;"
         xmlns:xsd       = "&xsd;"
         xmlns:owl       = "&owl;"
         xmlns:sswap     = "&sswap;"
         xmlns:nar       = "&nar;"
         xmlns:tax       = "&tax;"
         xmlns:provider  = "&provider;"
         xmlns:resource  = "&resource;"
     >

    <!--
    Import the declarations of the SSWAP protocol since OWL-DL
    requires that all terms be declared.

    See http://sswap.info/protocol.jsp for a clickable protocol.
    See http://sswapmeet.sswap.info/sswap/owlDoc for the OWL Docs.
    -->
    <owl:Ontology rdf:about="&sswap;owlOntology">
        <owl:imports rdf:resource="&sswap;owlOntology"/>
    </owl:Ontology>

    <!--
    For this file to be stand-alone OWL-DL, all terms be declared.  So either
    declare each external term here indepedent of its own definition file, or
    assert each resource to be an owl:Ontology and import them.  The owlImports
    file (when/if it exists) should do a cascading import on all terms.

    If you didn't want to import the entire ontology of terms (for example,
    because of a very large ontology), you could declare terms only as you
    need them.  For example, to use the rdf:type statement you, instead of
    importing all terms' definition and saying this:
        ...
        <rdf:type rdf:resource="&tax;TaxonomyRecord"/>

    you could forgo the importing and say this:
        ...
        <rdf:type>
            <owl:Class rdf:about="&tax;TaxonomyRecord"/>
        </rdf:type>
    -->
    <owl:Ontology rdf:about="&tax;owlImports">
        <owl:imports rdf:resource="&tax;owlImports"/>
    </owl:Ontology>

    <!--
    Lay out the SSWAP canonical graph by starting with the sswap:Resource
    definition.
    -->
    <sswap:Resource rdf:about="&resource;taxonomyLookupService">

      <!--
      This resource is tagged as belonging to these NAR Ontology classes.
      -->
      <rdf:type>
        <owl:Class rdf:about="&nar;subcategory/Genomics_Databases_non_vertebrate/Taxonomy_and_identification"/>
      </rdf:type>

      <!--
      Every resource must have a name.  Use something short and
      informative that can be displayed to users.
      -->
      <sswap:name rdf:datatype="&xsd;string">Taxonomy record lookup service</sswap:name>

      <!--
      Enter a one line description about this resource.  Client viewers,
      such as the search engine at http://sswap.info may use this one
      one line description to give users a quick description about the
      resource.  For more detailed information, direct users to the
      sswap:aboutURI URL.
      -->
      <sswap:oneLineDescription rdf:datatype="&xsd;string"
        >A service that accepts a common organism name, such as "dog" or "mouse" and returns an NCBI taxonomic record for that taxon.</sswap:oneLineDescription>

      <!--
      The sswap:aboutURI predicate allows you to link this resource to a
      web page for the benefit of users seeking more detailed information
      beyond just a name and oneLineDescription.

      SSWAP does not stipulate how the sswap:aboutURI is to be used, but it
      is suggested that it point to an informative human-readable web page.
      -->
      <sswap:aboutURI rdf:datatype="&xsd;anyURI"></sswap:aboutURI>

      <!--
      The sswap:inputURI allows you to associate a human-readable web page with
      your resource for handling interactive invocation of your service.  There
      is nothing in the SSWAP protocol that forces this predicate and its
      value to be used, but if it is defined the discovery server at
      http://sswap.info will defer to this URL to launch the service.
      -->
      <sswap:inputURI rdf:datatype="&xsd;anyURI">&resource;inputForm.jsp</sswap:inputURI>

      <!--
      The sswap:outputURI allows you to associate a human-readable web page with
      your resource for handling the output (the results) of your service.
      Because the discovery server at http://sswap.info hands off control to the
      service upon invocation, this predicate is not used by sswap.info.
      -->
      <sswap:outputURI rdf:datatype="&xsd;anyURI"></sswap:outputURI>

      <!--
      The metadata file allows you to associate searchable text
      with this resource.  While you have complete control over
      what is in the file, it is purposely left undefined how
      others may use the information in the file. (Resources "push"
      metadata but cannot stipulate how it is used).
      -->
      <sswap:metadata rdf:datatype="&xsd;anyURI"
        >&resource;metadata.txt</sswap:metadata>

      <!--
      Use the sswap:providedBy predicate to identify the
      provider claiming ownership of this resource.

      If a resource's URL is not a sub-directory of its provider's
      URL, then this predicate is required and the provider's
      sswap:providesResource predicate must reciprocate the assertion back
      to this resource.

      Each resource must have exactly one provider.
      -->
      <sswap:providedBy>
        <sswap:Provider rdf:about="&provider;resourceProvider"/>
      </sswap:providedBy>

      <!--
      This service accepts (sswap:Subject) un-typed data with the
      predicate tax:commonName and returns (via sswap:Object;
      i.e., creates a mapping or transformation to) data of type
      tax:TaxonomyRecord.

      Note that although the sswap:Subject is not explicitly typed
      with a user-defined class, the rdfs:domain of tax:commonName
      is tax:TaxonomyRecord (point your browser to tax:commonName
      to see its definition).  This means a reasoner will infer that
      the sswap:Subject individual is also of type tax:TaxonomyRecord,
      just as if you have explicited made the rdf:type statement.
      -->
      <sswap:operatesOn>
        <sswap:Graph>
          <sswap:hasMapping>
            <sswap:Subject>
              <tax:commonName></tax:commonName>
              <sswap:mapsTo>
                <sswap:Object>
                  <rdf:type rdf:resource="&tax;TaxonomyRecord"/>
                </sswap:Object>
              </sswap:mapsTo>
            </sswap:Subject>
          </sswap:hasMapping>
        </sswap:Graph>
      </sswap:operatesOn>

    </sswap:Resource>

</rdf:RDF>

