View unanswered posts | View active topics It is currently Fri Dec 14, 2018 9:37 pm



Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next
 Identification of templates 
Author Message

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
As discussed in MMT SIG and P8IWG, see below samples of template definition and template instance presumably compliant to JORD ID spec.

One simple template is selected - Classification.

Template and template roles have human-readable fragment identifiers as part of URI.

Template and template roles have UUIDs assigned via pca:defaultRdsId predicate.

Template instance is self-explanatory.

Please comment on these examples. Are they correct? Are there enough data for tools developed?

Samples below can be cut-and-pasted into a text file with .rdf extension. Is it enough or sandbox endpoint is required by any testers?

Classification template:

Code:
<?xml version="1.0"?>

<!DOCTYPE rdf:RDF [
  <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
  <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
  <!ENTITY p7tm "http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tm#" >
  <!ENTITY dm "http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#" >
  <!ENTITY pca "http://posccaesar.org/rdl/" >
]>

<rdf:RDF
  xmlns="http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tpl#"
  xml:base="http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tpl"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:p7tm="http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tm#"
  xmlns:dm="http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#"
  xmlns:pca=" http://posccaesar.org/rdl/"
>

<owl:Class rdf:about="#Classification">
<rdfs:label>Classification</rdfs:label>
<pca:defaultRdsId>R-2d0daa18-30e0-49b7-aaa8-2ba433cb817a</pca:defaultRdsId>
<rdfs:comment>This class represents the ISO 15926-7 proto-template ClassificationTemplate.</rdfs:comment>
<rdfs:subClassOf rdf:resource="&p7tm;BaseTemplateStatement" />
<rdfs:subClassOf>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="#hasClassifier" />
<owl:allValuesFrom rdf:resource="&dm;Class" />
</owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasClassifier" />
<owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality>
<owl:onClass rdf:resource="&dm;Class" />
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty rdf:resource="#hasClassified" />
<owl:allValuesFrom rdf:resource="&dm;Thing" />
</owl:Restriction>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasClassified" />
<owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality>
<owl:onClass rdf:resource="&dm;Thing" />
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</rdfs:subClassOf>
</owl:Class>
<p7tm:TemplateDescription rdf:about="#Classification__desc">
<rdf:type rdf:resource="&owl;Thing" />
<p7tm:valNumberOfRoles rdf:datatype="&xsd;integer">2</p7tm:valNumberOfRoles>
<p7tm:hasTemplate rdf:resource="#Classification" />
</p7tm:TemplateDescription>
<p7tm:TemplateRoleDescription rdf:about="#Classification__rdesc2">
<rdf:type rdf:resource="&owl;Thing" />
<p7tm:valRoleIndex rdf:datatype="&xsd;integer">2</p7tm:valRoleIndex>
<p7tm:hasRoleFillerType rdf:resource="&dm;Class" />
<p7tm:hasTemplate rdf:resource="#Classification" />
<p7tm:hasRole rdf:resource="#hasClassifier" />
</p7tm:TemplateRoleDescription>
<p7tm:TemplateRoleDescription rdf:about="#Classification__rdesc1">
<rdf:type rdf:resource="&owl;Thing" />
<p7tm:valRoleIndex rdf:datatype="&xsd;integer">1</p7tm:valRoleIndex>
<p7tm:hasRoleFillerType rdf:resource="&dm;Thing" />
<p7tm:hasTemplate rdf:resource="#Classification" />
<p7tm:hasRole rdf:resource="#hasClassified" />
</p7tm:TemplateRoleDescription>
<owl:ObjectProperty rdf:about="#hasClassifier">
<rdfs:label>hasClassifier</rdfs:label>
<pca:defaultRdsId>R-43f790b7-9370-407b-ad6a-a07d34d3ef82</pca:defaultRdsId>
<rdfs:subPropertyOf rdf:resource="&p7tm;hasObjectRoleFiller" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="#hasClassified">
<rdfs:label>hasClassified</rdfs:label>
<pca:defaultRdsId>R-a63e7771-bd9b-4621-9015-93e91039ef54</pca:defaultRdsId>
<rdfs:subPropertyOf rdf:resource="&p7tm;hasObjectRoleFiller" />
</owl:ObjectProperty>
</rdf:RDF>


Template instance:

Code:
<?xml version="1.0"?>

<!DOCTYPE rdf:RDF [
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
  <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
  <!ENTITY p7tpl "http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tpl#" >
  <!ENTITY pcardl "http://posccaesar.org/rdl/" >
]>

<rdf:RDF
  xmlns="http://example.org/rdl#"
  xml:base="http://example.org/rdl"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:p7tpl="http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tpl#"
  xmlns:pcardl="http://posccaesar.org/rdl/"
>
<rdf:Description rdf:about="#id63e30338-945b-4d03-aa6e-7d169b6211e3">
<rdfs:label>classification_sample</rdfs:label>
<rdf:type rdf:resource="&p7tpl;Classification" />
<rdf:type rdf:resource="&owl;Thing" />
<p7tpl:hasClassified rdf:resource="&pcardl;RDS327239" />
<p7tpl:hasClassifier rdf:resource="&pcardl;RDS208394" />
</rdf:Description>
</rdf:RDF>


Tue Apr 23, 2013 8:13 pm
Profile WWW

Joined: Tue Jan 08, 2013 12:08 pm
Posts: 59
These are correct from my understanding and should be used as a reference for all other templates to follow. Next step is to use the ID patterns in this example to update the hosted sandboxes in JORD.


Tue May 14, 2013 10:07 pm
Profile

Joined: Sun Jan 22, 2012 10:02 pm
Posts: 283
Hi,

So far we have used this style:
Code:
<p7tpl:Classification rdf:ID="id63e30338-945b-4d03-aa6e-7d169b6211e3">
    <rdfs:label>classification_sample</rdfs:label>
    <rdf:type rdf:resource="&owl;Thing" />
    <p7tpl:hasClassified rdf:resource="&pcardl;RDS327239"/>
    <p7tpl:hasClassifier rdf:resource="&pcardl;RDS208394" />
</p7tpl:Classification>

The style now proposed:
Code:
<rdf:Description rdf:about="#id63e30338-945b-4d03-aa6e-7d169b6211e3">
     <rdfs:label>classification_sample</rdfs:label>
     <rdf:type rdf:resource="&p7tpl;Classification" />
     <rdf:type rdf:resource="&owl;Thing" />
     <p7tpl:hasClassified rdf:resource="&pcardl;RDS327239" />
     <p7tpl:hasClassifier rdf:resource="&pcardl;RDS208394" />
</rdf:Description>

gives exactly the same triples (see side note 3 below).

The reason why Victor proposed the second style is because his tool produces that, and that is because he built it that way.
The use of rdf:Description is not mandatory.

The first style, used by us so far, has the advantage of quick recognition in a listing by a human being, because it starts with telling what template it is an instance of.

My urgent request is to accept both styles. Technically they are equivalent.

Some side notes:
1) The RDF world sticks to declaring with rdf:ID and later addition of information with rdf:about="#[earlier declared ID]"; I checked that on semanticweb.com
2) ID's shall start with a letter, UUIDs often start with a number; so far we added the prefix C for owl:Class and T for owl:Thing, but that is only convention.
3) There is no template called Classification. The one shown corresponds with ClassificationOfClassOfIndividual, but that has one more role. So do not take my example too literally, because it is incorrect and only there to show the difference in style.
4) The use of ClassificationOfClassOfIndividual and other templates in the RDL has not, so far, been implemented. I strongly advise first to agree on the set of base templates.


Fri May 17, 2013 3:44 pm
Profile

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
Hans,

The only goal of this example was to demonstrate the way to use predicate pca:defaultRdsId. Everything else was indeed driven by the tool at hand.

Quote:
My urgent request is to accept both styles. Technically they are equivalent.


I don't think there is special need for such declarations. They are both correct RDF, I believe there is some formal proof they're the same N3. The tools have to understand both styles if they are compliant to W3C standards, without any references to ISO 15926.

Quote:
1) The RDF world sticks to declaring with rdf:ID and later addition of information with rdf:about="#[earlier declared ID]"; I checked that on semanticweb.com

That's RDF/XML conventions. Do they have any meaning in triples/SPARQL paradigm? I honestly don't know!

Quote:
2) ID's shall start with a letter, UUIDs often start with a number; so far we added the prefix C for owl:Class and T for owl:Thing, but that is only convention.

"R-" is used because it is specifically an example of JORD ID spec implementation.

Quote:
3) There is no template called Classification. The one shown corresponds with ClassificationOfClassOfIndividual, but that has one more role. So do not take my example too literally, because it is incorrect and only there to show the difference in style.

Template called Classification exists in P7 attachment p7tpl.owl and is widely (and I believe officially?) distributed with the standard. I hope that http://standards.iso.org/iso/ts/15926/-8/ed-1/tech/reference-data/p7tm#Classification will forever remain its URI, or will be officially revoked by ISO. Otherwise we'll be in big trouble.


Fri May 17, 2013 4:48 pm
Profile WWW

Joined: Sun Jan 22, 2012 10:02 pm
Posts: 283
Hi Victor,

I haven't seen any pca:defaultRdsId.

The Classification you refer to is a proto template, that is used in the First-Order Logic of lifted templates as ClassificationTemplate, not in between lowered templates in a Part 8 file.


Fri May 17, 2013 8:56 pm
Profile

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
Quote:
I haven't seen any pca:defaultRdsId.


It is there among properties of roles and template itself, not in an instance part of an example. It was one of the problems - whether iRING Tools users need some instance format which is not really RDF. Looks like they are happy with RDF (because they don't use it).

Quote:
The Classification you refer to is a proto template, that is used in the First-Order Logic of lifted templates as ClassificationTemplate, not in between lowered templates in a Part 8 file.


That puzzles me. If I want to express simple fact of classification - can't I just use this one?


Fri May 17, 2013 9:05 pm
Profile WWW

Joined: Sun Jan 22, 2012 10:02 pm
Posts: 283
Hi Victor,

From the very beginning of implementing ISO 15926 in OWL and RDF the OWLites have complained about the Part 2 Relationships and ClassOfRelationships. They see those as subtypes of rdf:Property (I don't). In RDF instances of rdf:Property can be used neither as rdf:subject nor as rdf:object, so in their view one cannot address a Part 2 Relationship. Looking at all templates it is evident that there is an incompatibility.

So, Johan came with a workaround. In Annex C of part 7 you find prototemplates like these:
Code:
ClassificationTemplate(y, z) <->
exists u(ClassificationTriple(u, y, z)) .

(if you see a ClassificationTemplate with attributes y and z then that is equivalent to a ClassificationTriple u with attributes y and z.
That ClassificationTriple (below) is equivalent to a Classification x AND a Property hasClassified y AND a Property hasClassifier z.)
Code:
ClassificationTriple(x, y, z) <->
Classification(x) ^ hasClassified(x, y) ^ hasClassifier(x, z) .

These are used in the FOL code for the defining Lifted Template, that you find in every template specification: the XxxTriple in case you need to address it, and the XxxTemplate in case not.

In some exceptional cases, like Approval, a Relationship would have to be addressed. In those templates I have avoided that by putting the two objects of such relationship in the signature, instead of that relationship.

Quote:
If I want to express simple fact of classification - can't I just use this one?

Well, that depends on the acceptance of the approx. 250 template specifications on 15926.org. These have been crafted such that information integration is made possible. Mixing those with prototemplates will render erratic query results.


Sat May 18, 2013 12:24 pm
Profile

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
Quote:
Well, that depends on the acceptance of the approx. 250 template specifications on 15926.org. These have been crafted such that information integration is made possible. Mixing those with prototemplates will render erratic query results.


Agreed. Templates designed for life-cycle information integration do not mix well with basic sets designed for data exchange only.


Sun May 19, 2013 11:57 am
Profile WWW

Joined: Thu Mar 08, 2012 12:39 pm
Posts: 16
Hi Victor,

I saw your sample of template definition and template instance. I have some comments:

At the Classification template, we have this code:

<p7tm:TemplateDescription rdf:about="#Classification__desc">

<rdf:type rdf:resource="&owl;Thing" />

<p7tm:valNumberOfRoles rdf:datatype="&xsd;integer">2</p7tm:valNumberOfRoles>

<p7tm:hasTemplate rdf:resource="#Classification" />

</p7tm:TemplateDescription>


I think that "Classification_desc" is an instance of Template Description, isn´t it?
I disagree of this syntax, because the Template Description is a class declared at the p7tm. p7tm:TemplateDescription is not a tag declared at some
XMLSchema or DTD file to be used as shown above.

At the p7tpl.owl file we have two different types of individual Declaration, as the samples bellow:

1-
<!-- http://standards.iso.org/iso/ts/15926/- ... dividual_2 -->

<p7tm:TemplateRoleDescription rdf:about="#TemplateRoleDescription_of_AssemblyOfIndividual_2">
<rdf:type rdf:resource="&owl;Thing"/>
<rdfs:label
>TemplateRoleDescription_of_AssemblyOfIndividual_2</rdfs:label>
<p7tm:valRoleIndex rdf:datatype="&xsd;integer">2</p7tm:valRoleIndex>
<p7tm:hasRoleFillerType rdf:resource="&dm;ArrangedIndividual"/>
<p7tm:hasTemplate rdf:resource="#AssemblyOfIndividual"/>
<p7tm:hasRole rdf:resource="#hasWhole"/>
</p7tm:TemplateRoleDescription>


Your sample follows the sample above.

2-
<!-- http://standards.iso.org/iso/ts/15926/- ... dividual_1 -->

<owl:Thing rdf:about="#TemplateRoleDescription_of_AssemblyOfIndividual_1">
<rdf:type rdf:resource="&p7tm;TemplateRoleDescription"/>
<rdfs:label
>TemplateRoleDescription_of_AssemblyOfIndividual_1</rdfs:label>
<p7tm:valRoleIndex rdf:datatype="&xsd;integer">1</p7tm:valRoleIndex>
<p7tm:hasRoleFillerType rdf:resource="&dm;PossibleIndividual"/>
<p7tm:hasTemplate rdf:resource="#AssemblyOfIndividual"/>
<p7tm:hasRole rdf:resource="#hasPart"/>
</owl:Thing>


I think that the sample 2 is right , but I prefer to use the owl:NamedIndividual than owl:Thing, because
owl:Thing is a class of all instances[1], it can be identified or anonimous individual, and owl:NamedIndividual is an entity declarations to express that individuals that are identified by an IRI[2].

[1]http://www.w3.org/TR/2004/REC-owl-guide-20040210/#DefiningIndividuals
[2]http://www.w3.org/TR/owl2-quick-reference/


Regards,
Geiza


Tue May 21, 2013 3:51 pm
Profile

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
Hi Geiza,

Quote:
p7tm:TemplateDescription is not a tag declared at some XMLSchema or DTD file to be used as shown above.


This type of XML is allowed by the standard: http://www.w3.org/TR/rdf-syntax-grammar ... yped-nodes . There is no formal difference whether to start declaration of an object in RDF/XML with rdf:Description or with any of object's types. And the difference is relevant in XML only, triples are the same whether returned by SPARQL or in N3/Turtle notation.

We may agree on some convention, but W3C-compliant tools should not differentiate. And there is an argument in favour of starting description of an element with template type - it really increases human readability of a dataset.

Concerning owl:NamedIndividual - I don't have any opinion. But rigorous use of OWL 2 constructs has sense only in models which are OWL 2 models in other aspects. Can you really use OWL reasoner/verifier software to check template definition model which combines template and role declarations with meta-template instances we're discussing here?


Tue May 21, 2013 3:53 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
eXTReMe Tracker
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.