Tutorial | Inrupt Documentation
Tutorial
The tutorial in this section creates a Spring Boot personal (i.e., single-user) Web service on http://localhost:8080 that uses Inrupt’s Java client library to:
Read the Pod URLs associated with the user’s WebID.
The locally-run personal Web service uses the Client Credentials flow; that is, the service logs in with its credentials on behalf of the user who registered the client.
For this part of the tutorial, an expense record (with date, description, provider, amount, currency, category information) is stored as a file in the Pod with the following structure and sample values (shown in Turtle):
<https://storage.example.com/{rootContainer}/expenses/20230306/teamLunchExpense>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://schema.org/Invoice> ;
<https://schema.org/purchaseDate> "2023-03-07T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://schema.org/provider> "Example Restaurant" ;
<https://schema.org/description> "Team Lunch";
<https://schema.org/category> "Travel and Entertainment" ;
<https://schema.org/priceCurrency> "USD" ;
<https://schema.org/totalPrice> "120"^^<http://www.w3.org/2001/XMLSchema#decimal> .The
subjectand thepredicatesare URLs.The
objectmay be URLs or literals.
Attach a receipt to the expense:
Store the receipt (as a non-RDF
.png,.pdf, or.jpegfile) to the user’s Pod.Update the the Expense resource by adding a link to the saved receipt file.
<https://storage.example.com/{rootContainer}/expenses/20230306/teamLunchExpense>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://schema.org/Invoice> ;
<https://schema.org/purchaseDate> "2023-03-07T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<https://schema.org/provider> "Example Restaurant" ;
<https://schema.org/description> "Team Lunch";
<https://schema.org/category> "Travel and Entertainment" ;
<https://schema.org/priceCurrency> "USD" ;
<https://schema.org/totalPrice> "120"^^<http://www.w3.org/2001/XMLSchema#decimal> ;
<strong> <https://schema.org/image> <https://storage.example.com/{rootContainer}/expenses/20230306/teamLunchExpense_somerandomsuffix.jpg> .Last updated