Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{color:#000000}The WSO2 Data Services

...

 Server supports  exposing relational data in RDF (Resource Description Framework) format as a service. In the following example, we demonstrate how a CSV data source can be exposed as a RDF resource.{color}

{color:#000000}In order to expose relational data in RDF format, you need to configure  the relevant data service query accordingly. To start, add a new query to your  CSV data service. For instructions on creating a CSV data service, refer to section{color} {color:#000000}[DSS263:CSV]{color}.

{color:#000000}1. Log on to the{color} {color:#000000}Data Services{color} {color:#000000}Server{color} {color:#000000}Management Console.{color}

{color:#000000}2. {color} {color:#000000}Click the{color} {color:#000000}{_}Main{_}{color} {color:#000000}menu and select{color} {color:#000000}{_}List{_}{color} {color:#000000}under{color} {color:#000000}{_}Web Services{_}{color}{color:#000000}.{color}

{color:#000000}3.{color} {color:#000000}The{color} {color:#000000}{_}Deployed Services{_}{color} {color:#000000}page appears which lists out all the currently active services and service groups.{color}

{color:#000000}Click on the data service you want to edit.{color}


{color:#000000}4. The dashboard of the data service opens. Click on the{color} {color:#000000}{_}Edit Data Service{_}{color} {color:#000000}link. In this example, we edit using the management console.{color}

{color:#000000}5. Navigate to the Queries page{color} {color:#000000}of the data service and click the{color} {color:#000000}{_}Add New Query{_}{color} {color:#000000}link{color}{color:#000000}.{color}

{color:#000000}6. The{color} {color:#000000}{_}Add New{_}{color} {color:#000000}{_}Query{_}{color} {color:#000000}page opens.{color}

Since the output is a RDF result set, select output type as RDF from the drop-down list in the Output Mapping section.

_RDF Base URI_ contains the format of rdf:about URI which uniquely identifies each resource. In this example, the _RDF base URI_ is  http://www.product/cd/{1}. This takes the value of column 1 of the CSV created here (which is the ProductCode) for each row and replaces it with the RDF about attribute inside rdf:Description element.

RDF Base URI :\- http://www.product/cd/{1}

Row namespace :\- http://www.product/cd#