Vapour exposes exactly the same RDF report through a REST API (currently only RDF/XML is supported). The reports are generated using EARL as the primary vocabulary.
It can be accessed using content negotiation, for instance using curl:
$ curl -H "Accept: application/rdf+xml" "http://validator.linkeddata.org/vapour?uri=http://dbpedia.org/resource/Asturias"
Or forcing the returned format with a query parameter, for instance:
$ curl "http://validator.linkeddata.org/vapour?uri=http://dbpedia.org/resource/Asturias&format=rdf"
Although you are free to use the raw RDF version of the report, we are also providing API bindings for some popular programming languages:
This bindings provides a Java-native API to use Vapour, allowing to perform validations and retrieve the details if the test suite executed. Using maven you just need to declare this dependency:
<dependencies> (...) <dependency> <groupId>net.sf.vapour</groupId> <artifactId>vapour-api</artifactId> <version>1.0</version> </dependency> </dependencies>
If you don't want to install it from the code, the simplest method to get the library is using the following repository:
<repositories> (...) <repository> <id>ctic</id> <url>http://repository.fundacionctic.org/artifactory/repo</url> </repository> </repositories>
For those who are not using maven in their projects, a JAR package with dependencies is also provided (vapour-api-1.0-with-dependencies.jar).
Please, be careful using this package in your projects, because the dependencies included could conflict with yours.
Finally, the code you would need to used could be something like:
VapourApi api = VapourApiFactory.createVapourApi(); VapourReport report = api.check("http://dbpedia.org/resource/Asturias"); System.out.println(report);
If you would require more details, this class diagram might be useful.
vapour.js provides the basic functionality to work with Vapour, allowing the validation of a URI and embedding the report with the performed tests on any web page. A full demo file is provided at the same source code repository for explain its usage.