S2S is a tool rapidly developing advanced search interfaces and faceted browsers for web services.

S2S Screenshot

How It Works

The work on S2S is divided between two components, the S2S user interfaces and the S2S Server. S2S user interfaces can be designed to meet different functional requirements, ranging from advanced search using free-text input to faceted browsing. The S2S Server is based on PHP, SPARQL, and RDF/OWL. The Server is also split into two parts: the ontology knowledge base, containing all the metadata about the framework components (i.e., services, widgets, parameters, query interfaces, and output formats); and the server, acting as an interface to the knowledge base and providing a proxy to access web services complying with the standards supported by S2S.

S2S User Interfaces

The image above is an example user interface based on the S2S Framework. In the current prototype user interface, we have enabled a number of features found in faceted browsers, including:

  • arbitrary restriction order
  • result cardinalities
  • multiple selection
  • configurable facet sets

S2S Faceted Browsing Platform

This section discusses one of the application prototypes of S2S, the faceted browsing framework. This framework has been applied in the development of a number of search interfaces across many domains, including an Open Government Data Catalogue and a Biological and Chemical Oceanography Data Catalogue.

For more information about the Faceted Browsing Platform, visit the Faceted Browse Working Group Page.

S2S Server

The S2S Server includes the back-end parts of the system. The server is implemented using OOP, and an adapter pattern is used to enable extensibility to web service standards. The ontology is encoded in RDF/OWL, and the knowledge base consists of instances of the classes defined in the S2S ontology.

The S2S Server has two externally facing services, metadata.php and proxy.php.

S2S Metadata Service

The intention of the metadata.php service is to provide a RESTful interface to the S2S Knowledge Base. Update functionality has not yet been implemented, and the design of the RESTful URLs is not yet final. Meanwhile, we are providing a GET service that supports five types of requests:

  • Services
    • Returns a JSON object containing metadata about a service or set of services
    • Restriction Parameters:
      • (optional) instances: get metadata for specific service URIs
    • Request format: metadata.php?type=services[&instances=uri-1,uri-2,...]
    • Response format:
      • Note: the service request returns metadata for parameters and query interfaces used by the service to minimize the number of requests needed

  { "serviceUri" : //URI of an S2S Service instance
    { "service" : {
       "label" : "string", //rdfs:label of the service
       "comment" : "string", //rdfs:comment on the service
       "type" : [ "uri" ], //an array of classes (URIs) to which the service belongs
       "links" : [ "url" ], //rdfs:seeAlso links for the service
    }, 
    "parameters" : { //see Parameters request for response format },
    "queries" : { //see Queries request for response format }
  }} 

  • Parameters
    • Returns a JSON object containing metadata about a parameter or set of parameters
    • Restriction Parameters:
      • instances: get metadata for specific parameter URIs
      • service: get metadata for all parameters used by a given service URI
    • Request format: metadata.php?type=parameters&instances=uri-1,uri-2,...
    • Request format: metadata.php?type=parameters&service=uri
    • Response format:
      • Note: additional features of the parameter class will be added as needed (e.g., range restriction, composite parameters)

  { "parameterUri" : //URI of S2S Parameter instance
    { "label" : "string", //rdfs:label of the parameter
       "comment" : "string", //rdfs:comment on the parameter
       "instance" : "uri" //(optional) s2s:hasInstanceParameter for a s2s:ClassParameter
  }}

  • Widgets
    • Returns a JSON object containing metadata about a widget or set of widgets
    • Restriction Parameters:
      • instances: get metadata for specific widget URIs
      • output: get metadata for all widgets that support a given output format
      • parameter: get metadata for all widgets that support a given parameter
    • Request format: metadata.php?type=widgets&instances=uri-1,uri-2,...
    • Request format: metadata.php?type=widgets&output=uri[¶meter=uri]
    • Request format: metadata.php?type=widgets¶meter=uri[&output=uri]
    • Response format:

  { "widgetUri" : //URI of S2S Widget instance
    { "label" : "string", //rdfs:label of the widget
       "comment" : "string", //rdfs:comment on the widget
       "generate" : "string", //name of generator function used to create widget skeleton
       "callback" : "string", //name of callback function used to integrate query response into widget
       "output" : "string", //name of output function used to get user input from a widget
       "scripts" : [ "url" ], //an array of URLs to JavaScript files required by the widget
       "css" : [ "url" ], //an array of URLs to CSS files used by the widget
       "type" : [ "uri" ], //an array of classes (URIs) to which the widget belongs
       "parameters" : [ "uri" ], //an array of parameters (URIs) that the widget works with
       "supports" : [ "uri" ] //an array of output formats (URIs) that the widget supports
  }}

  • Queries
    • Returns a JSON object containing metadata about a query interface or set of query interfaces
    • Restriction Parameters:
      • instances: get metadata for specific query interface URIs
      • service: get metadata for all query interfaces used by a given service URI
    • Request format: metadata.php?type=queries&instances=uri-1,uri-2,...
    • Request format: metadata.php?type=queries&service=uri
    • Response format:

  { "queryInterfaceUri" : //URI of S2S Query Interface instance
    { "label" : "string", //rdfs:label of the query interface
       "comment" : "string", //rdfs:comment on the query interface
       "type" : [ "uri" ], //an array of classes (URIs) to which the query interface belongs
       "output" : "uri", //the output format URI of the query interface
       "param" : "uri" //the parameter for parameter values and parameter description queries
  }}

  • Defaults
    • Returns a document containing the default configuration for the service
    • Restriction Parameters:
      • service: get the defaults for a specific service URI
    • Request format: metadata.php?type=defaults&service=uri

S2S Proxy Service

The intention of the proxy.php service is to provide a universal means of submitting queries to heterogeneous web services (and standards). The proxy service instantiates an adapter class, depending on the OWL class to which a service URI belongs. For instance, those services described as instances of the http://escience.rpi.edu/ontology/sesf/s2s/2/0/OpenSearchService class will use the OpenSearchService adapter, as described in the Utilities.php file (used for helper functions and configurations). The adapter classes implement three basic methods:

  • getSearchParameters
    • Returns an array of URIs, corresponding to the S2S Parameters used by the service
  • getQueryInterfaces
    • Returns an array of URIs, corresponding to the S2S Query Interfaces implemented by the service
  • runQuery
    • Returns whatever response is expected from a particular service and query interface for a set of parameter constraints
    • Arguments:
      • $query: the query interface URI is being requested
      • $parameters: a hash array of parameter URIs and the values that should be provided to the service

Using this proxy interface also overcomes the issue of cross-domain AJAX requests (for those services that do not use the Access-Control-Allow-Origin HTTP header). In the future, we plan to implement this service using SOAP. Meanwhile, the service is a HTTP POST service that accepts a JSON request in the following format:

  { "service" : "uri", //the URI of the service
     "query" : "uri", //the URI of the query interface
     "parameters" : { "uri" : "value" } //an object containing URI-value pairs 
  }

The response that returns from this POST request depends on the values specified in the request. The response can be anticipated from metadata about the service and the query interface submitted in the request.

Ontology and Knowledge Base

The S2S ontology contains a class for each individual component in the S2S framework. Here is a summary:


component S2S Class URI description
a user interface The user interface component of S2S is used by scientists to search and analyze data from multiple repositories.
search services s2s:Service A s2s:Service is an abstraction for a search service. Currently, we have created extensions of the extraction for OpenSearch services.
parameters s2s:Parameter A s2s:Parameter describes an input to a web service.
queries s2s:QueryInterface A s2s:QueryInterface is an abstraction for a specific kind of request to a service. Currently, we have created extensions of the query interface to enable faceted browsing interfaces.
widgets s2s:Widget A s2s:Widget takes the s2s:Service response for a particular s2s:QueryInterface, and transforms that response into an XHTML element that can be used in the user interface. Some widgets are meant to take user input (Parameter widgets), other are meant to display results.
output formats s2s:OutputFormat A s2s:OutputFormat is an abstraction for matching s2s:Widget-s for s2s:QueryInterface-s. The purpose of the s2s:OutputFormat is to enable interchangeable widgets for a single query interfaces.

Here is a CMAP visualization of the ontology:

The knowledge base contains all the instances of the classes in the diagram and summary above. The RDF instances are created for each instance of an S2S framework component. The Metadata Service described in the S2S Server section provides access to the knowledge base.

We are currently using TDB and Joseki as an index of the RDF metadata. We plan to use the Web as our repository in future versions, by enabling the consumption and use of linked data through the S2S framework.

Publications

Rozell, E., Wang, H., West, P., Zednik, S., Fox, P. (2011), Configurable User Interface Framework for Data Discovery in Cross-Disciplinary and Citizen Science, Abstract EGU2012-12859 to be presented at General Assembly 2012, EGU, Vienna, Austria, 22-27 Apr

Eric Rozell. High-Performace Faceted Interfaces Using S2S. TWed Talk. 25 January 2012. (slides) (video)

Rozell, E., Maffei, A., West, P., Zednik, S., Fox, P. (2011), Open Standards and Technologies in the S2S Framework, Abstract IN31A-1435 presented at 2011 Fall Meeting, AGU, San Francisco, Calif., 5-9 Dec (poster)

Rozell, E., Fox, P., Maffei, A., Zednik, S. (2011), A Framework for Earth Science Search Interface Development, Abstract EGU2011-13413 presented at General Assembly 2011, EGU, Vienna, Austria, 03-08 Apr (slides)

Maffei, A., Rozell, E., Fox, P. (2010), A Framework for Integrating Oceanographic Repositories, Abstract IN23A-1349 presented at 2010 Fall Meeting, AGU, San Francisco, Calif., 13-17 Dec (poster)

Support

Download

Tutorials

To Do List

  • Create FacetOntology adapter
  • Create "ToolMatch-like" architecture for matching widgets to services and parameters
  • Create "Linked Data Widget" ontology/architecture
  • Create forms for S2S metadata creation/editing
  • Create "MapServer" Result Widget
  • Create WMS/WFS Search Widget
  • Create SOAP and WSDL capabilities for S2S Server (in addition to existing JSON services)
  • Implement dynamic facet capabilities
  • Create Apache Solr adapter
  • Create TWFacet adapter (Jin's facet service)

External Resources

Background Work