Reasons over the graph sent as the body of the request Example:
command line: curl -d@ontologyToUpload.owl http://sswap.info/reason where ontologyToUpload.owl is the file you are uploading to reason
All RDGs are reasoned over before being published.
We automatically resolve terms on the web by either dereferencing them for their definitions or referring to known ontologies (Del Vescovo et al. 2011).
If the graph is OWL DL and if all terms can be resolved, the resulting ontology is guaranteed to be complete.
Input format must be W3C RDF/XML OWL
sswap.info/modularize Modularize large BioPortal ontologies into compact necessary and sufficient entailments
GET /modularize
Retrieves a web page for user interaction Example:
Body of the content must be RDF/XML statements; terms referenced therein are extracted as the signature to modularize Example:
command line: curl -d@ontologyToUpload.owl http://sswap.info/modularize where ontologyToUpload.owl is the file of statements to modularize
A signature is a set of terms, which should be expressed by their full URLs for dereferencing. Modularization is the process of returning the minimum set of statements that still guarantee completeness over entailment for that set of terms.
A full solution is known to be undecidable; the algorithm uses a syntactic approximation which returns the minimal set in many conditions, but is not guaranteed minimal in all conditions.
Modularization may take 30 seconds or more. Internal wall clocks and byte counters are used to guarantee the return of results. In pathological cases that either take a long time to compute or require the deferencing of many dependent ontology terms, the results may not satisfy the minimal or completeness goals.
"Minimal" is with respect to statements with logical implications; annotation statements (e.g., rdfs:comment) may be included in the return set.
sswap.info/publish Request a SSWAP RDG (Resource Description Graph) to be scheduled for publication
GET /publish
Retrieves a web page for user interaction Example:
The content (body) of the POST must be either a URL or a JSON array of URLs. The URLs must dereference to a hosted SSWAP RDF/XML RDG (Resource Description Graph) such as made with the HTTP API; see /makeRDG. An RDG describes the service; to implement semantics see Hosting Semantic Web Services. Publishing is on-demand, but it may take up to four hours before the web service is discoverable. Examples:
command line: curl -d@array-of-RDG-URLs.json http://sswap.info/publish where array-of-RDG-URLs.json is a file containing a JSON array such as: [ "http://mySite/myResource1", "http://mySite/myResource2" ]
The RDG will be validated before publication; to manually validate first, use validate
The RDG must be first hosted on the web (e.g., on your web server, as your semantic web service end-point) at the URL of its sswap:Resource before its is published
To update a published service, just republish. To remove a published service, remove or otherwise invalidate the RDG at its URL and republish the URL
RDGs are always W3C RDF/XML OWL
sswap.info/query Executes a query ("find all graphs like ...") on the Discovery Server
GET /query
Retrieves a web page for user interaction Example:
command line: curl -d@resourceGaphToUpload.owl http://sswap.info/query where resourceGraphToUpload.owl is the file you are uploading to query
(Resource graphs are one of RDG, RIG, RQG, RRG; see below)
Querying returns all published services that:
are the same or a subtype of the service in the query graph, and
accept an input subject that is the same or a super-type of the query graph's input subject, and
return an output object that is the same or a subtype of the query graph's output object
A query graph is called an RQG: Resource Query Graph; see /makeRQG
Graphs that are not RQGs are converted into an RQG automatically. Graphs must be a SSWAP RDG, RIG, RRG, or RQG; generic OWL is non-convertible. See HTTP API.
RDGs are easy to find: just visit sswap.info and note any discovered service's URL; that's its RDG.
Input format (SSWAP Resource Graphs) is W3C RDF/XML OWL
Output format is JSON
Failure to match any services returns an empty JSON array [ ]
sswap.info/search Return a web page to a new pipeline with suggested services based on the search phrase
GET /search
Retrieve the home page with a text box ready to accept a search phrase Example:
Converts the graph sent as the body of the request to the requested format Example:
command line: curl -d@ontologyToUpload.xml http://sswap.info/convert/n3 where ontologyToUpload.xml is the file you are uploading to convert
Input format is determined automatically; currently reading TSV is not supported.
TSV is based on the fundamental RDF truism that any RDF (subject,predicate,object) triple can be mapped to a (row,column,value) tuple. Columns correspond to properties; rows to data entries, with the first column being the subject of the properties. The TSV converter constructs a header line (first row) of unique predicates (properties) from those observed in the graph. Subsequent rows correspond to at least one row per subject, with cells either filled with values or left blank as appropriate. If a subject has two or more values for a predicate, the value(s) will appear on subsequent row(s). This manner of unique columns and minimal yet distinct subject rows corresponds to normalization principles of relational databases.
sswap.info/api HTTP API for conversion of JSON specifications into SSWAP Resource Graphs and ontology types and properties
GET /api
Home page of the self-documenting HTTP API Example:
Allows developers to write SSWAP Resource Graphs and ontology terms in "non-semantic" JSON and have them translated into "semantic" W3C RDF/XML OWL DL
If the "api" directive is specified in the JSON file, then the file can be POSTed to sswap.info/api and it will be directed to its respective end-point
Input format must be JSON following the syntax and semantics as described at sswap.info/api; generic JSON is not translatable