PML example: the domain of hasURL is Information

From Inference Web

Jump to: navigation, search

(draft example; see iw:PML Primer for an introduction to PML.)

by: Tim Lebo

Contents

Introduction

While discussing the use of pmlp:hasURL, its rdfs:domain was questioned. Some thought the domain was pmlp:Source and some thought it was pmlp:Information. Once somebody finds out, how should they convince the others of the truth?

An example

The process to document

Since the ontology I downloaded a while ago may not be up to date, I asked for a link to the authoritative ontology so that I could verify my claims. Paulo posted the link http://inference-web.org/wiki/Documentation to http://iwepad.titanpad.com/3. I followed this link, selected http://inference-web.org/2.0/pml-provenance.owl, and used Firefox to search for hasURL. I found:

<owl:DatatypeProperty rdf:about="http://inference-web.org/2.0/pml-provenance.owl#hasURL">
  <rdfs:label   xml:lang="en">url</rdfs:label> 
  <rdfs:comment xml:lang="en">The URL of a relevant web page.</rdfs:comment>
  <rdfs:domain  rdf:resource="http://inference-web.org/2.0/pml-provenance.owl#Information"/> 
  <rdfs:range   rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
</owl:DatatypeProperty>

I am now convinced that the rdfs:domain of pmlp:hasURL is pmlp:Information, and am convinced that Paulo should be convinced of this as well. How do I convince him? I could paste this text into an email and say it came from http://inference-web.org/2.0/pml-provenance.owl, but that wouldn't be eating dog food, would it?

Some thoughts:

The process documentation

First, we'll encode the last piece of evidence I needed to be convinced that pmlp:hasURL's domain is pmlp:Information:

@prefix pmlp: <http://inference-web.org/2.0/pml-provenance.owl#> .

[] a pmlp:Information;
   pmlp:hasRawString """<owl:DatatypeProperty rdf:about="http://inference-web.org/2.0/pml-provenance.owl#hasURL">
<rdfs:label xml:lang="en">url</rdfs:label>
<rdfs:comment xml:lang="en">The URL of a relevant web page.</rdfs:comment>
<rdfs:domain rdf:resource="http://inference-web.org/2.0/pml-provenance.owl#Information"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
</owl:DatatypeProperty>""";

We can encode the conclusion, too:

@prefix pmlp: <http://inference-web.org/2.0/pml-provenance.owl#> .
@prefix : <#> .

:hasURL_domain_is_Information 
   a pmlp:Information;
   pmlp:hasRawString """@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
                        @prefix pmlp: <http://inference-web.org/2.0/pml-provenance.owl#> .
                        pmlp:hasURL rdfs:domain pmlp:Information .""";
.

We'll want to identify the string as following the Turtle syntax, so utilities will know how the raw string should be parsed. But we don't want to reinvent a URI for Turtle, so lets find one by following the guidance for how to find and reuse existing instances of Language, Format, Software, and InferenceRule. After not finding one, lets follow the guidance for how to create a findable instance of Language, Format, Software, and InferenceRule. Now that it is created, we can add a description to the Information so we know what Format the raw string is in.

@prefix pmlp:   <http://inference-web.org/2.0/pml-provenance.owl#> .
@prefix turtle: <http://inference-web.org/registry/FMT/Turtle.owl#> .
@prefix : <#> .


:hasURL_domain_is_Information
   a pmlp:Information;
   pmlp:hasRawString """@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
                        @prefix pmlp: <http://inference-web.org/2.0/pml-provenance.owl#> .
                        pmlp:hasURL rdfs:domain pmlp:Information .""";
   pmlp:hasFormat turtle:Turtle;
.
Personal tools
Navigation