PCA Reference Data and Services - Staging
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

From the command line

1 Retrieving ontology modules

The PLM-RDL ontologies can be downloaded to local files. Specifying which format you will accept makes use of content negotiation; for a friendly introduction, see Bob DuCharme’s 2011 blog post “Quick and dirty linked data content negotiation”. The following commonly used tools work well for downloads.

Choose one of these file formats (cf. downloads for details):

filetype text/turtle
filetype application/rdf+xml
filetype application/ld+json

For example, here is how to download the ISO 15926-14 OWL 2 ontology in Turtle format, into a file named lis14.ttl. We request the format with "Accept: text/turtle".

Download using wget
specify the filename with --output-document.
wget --header="Accept: text/turtle" http://rds.posccaesar.org/ontology/lis14/ont/core --output-document=lis14.ttl
Download using curl
use > to redirect the retrieved data to a file.
curl --header "Accept: text/turtle" -L http://rds.posccaesar.org/ontology/lis14/ont/core > lis14.ttl

2 If you get a “not trusted” response

It is common for companies to protect their networks with services that filter traffic. This will in some cases block the download of PCA ontologies, and you will see messages like the following.

message from wget :

ERROR: The certificate of ‘rds.posccaesar.org’ is not trusted.
ERROR: The certificate of ‘rds.posccaesar.org’ doesn't have a known issuer.

message from curl :

curl: (60) SSL certificate problem: unable to get local issuer certificate

The workaround is to instruct wget or curl to trust the rds.posccaesar.org website anyway, with the following command-line switches.

for wget
for curl

That is, the commands shown in the previous section need to be given as follows.

wget --no-check-certificate --header="Accept: text/turtle" http://rds.posccaesar.org/ontology/lis14/ont/core --output-document=lis14.ttl
curl --insecure --header "Accept: text/turtle" -L http://rds.posccaesar.org/ontology/lis14/ont/core > lis14.ttl

3 Retrieving single resources

Thanks to the Linked Data service on this website, each entity in the RDL can be downloaded separately, by requesting its resource URI. Here are two examples (both apply the “insecure certificate” workaround of the previous section). We download the description of the RDL class Compressor, which has the URI https://rds.posccaesar.org/ontology/plm/rdl/PCA_100001002.

  • Using wget, download the RDF/XML description of Compressor to local file compressor.xml.
wget --header="Accept: application/rdf+xml" https://rds.posccaesar.org/ontology/plm/rdl/PCA_100001002 --no-check-certificate --output-document compressor.xml
  • Using curl, download the JSON-LD description of Compressor to local file compressor.jsonld.
curl --header "Accept: application/ld+json" https://rds.posccaesar.org/ontology/plm/rdl/PCA_100001002 -L --insecure > compressor.jsonld

4 Example: Find the current version of an RDL ontology

The RDL ontologies have IRIs that don’t directly reflect the version of the ontology. Instead, the OWL 2 annotation property owl:versionIRI provides the version number (as per the recommendation).

The following command line can be used to find the current version IRI for an ontology, by downloading the ontology with curl, then extracting the version IRI with filters sed and grep.

curl -s -L --header "Accept: application/rdf+xml" --insecure \
http://rds.posccaesar.org/ontology/plm/ont/uom | sed 's/^ *//g' | grep -ie "owl:versioniri"


<owl:versionIRI rdf:resource="http://rds.posccaesar.org/ontology/plm/ont/uom/0.9.0"/>