spreadsheet import by pattern, no-domain target props issue

17 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Oct 19, 2021, 4:58:41 AM10/19/21
to topbrai...@googlegroups.com

Properties in the input ontology not having a domain cannot be chosen as target:

 

(where the dashes are)

 

Is this intended?

 

(these properties are valid for multiple sheets so they have multiple domains)

 

I can understand they are not automatically proposed but why can I not choose them manually from the list?

 

Should I indicate union of relevant domains?

 

Thx Michel

 

Ps

Missing target props are defined as:

 

sainput:bpsWeg

  a owl:DatatypeProperty ;

  rdfs:label "bpsWeg" ;

  rdfs:range xsd:integer ;

.

sainput:bpsStartKilometrering

  a owl:DatatypeProperty ;

  rdfs:label "bpsStartKilometrering" ;

  rdfs:range xsd:integer ;

.

sainput:bpsEindKilometrering

  a owl:DatatypeProperty ;

  rdfs:label "bpsEindKilometrering" ;

  rdfs:range xsd:integer ;

.

sainput:bpsBaan

  a owl:DatatypeProperty ;

  rdfs:label "bpsBaan" ;

  rdfs:range xsd:integer ;

.

sainput:bpsStrook

  a owl:DatatypeProperty ;

  rdfs:label "bpsStrook" ;

  rdfs:range xsd:integer ;

.

 

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

 

David Price

unread,
Oct 19, 2021, 5:26:17 AM10/19/21
to topbrai...@googlegroups.com
On 19 Oct 2021, at 09:58, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Properties in the input ontology not having a domain cannot be chosen as target:
 
<image004.png>
(where the dashes are)
 
Is this intended?
 

Yes.

See if you can create an instance of the thing in the EDG UI, and if so see what property shapes are visible. That’s what you have to work with. The importer, like all of EDG, is based on the SHACL Shapes, not the initial OWL. So, if a property does not appear in the SHACL as being relevant for the selected Class/Nodeshape then you cannot pattern map into it. I cannot remember what OWL2SHACL does in this case, but as always you can extend it to do whatever you want. I *think* the property shapes may be there, just not connected to a NodeShape.
As you say, these specific properties cleary DO have some reasonable but unstated domain in the ontology.  I imagine what would happen if you ran a DL reasoner on this is that it would infer owl:Thing as the domain of the property which is clearly wrong. bpsStartKilometrering is clearly not a property of Person, for example.

As far as SHACL/EDG is concerned, this is an under specificed (i.e. incomplete) ontology wrt doing any kind of sensible data validation/UI generation/etc. EDG Data Graphs are based on SHACL Shapes Graphs (i.e. not trying to be a generic, OWL-based collection type). 

Probably better to make an abstract superclass and tie these with a domain to that class. If you make a complex OWL structure, you may have to do an extension to OWL2SHACL to get what you want.

Cheers,
David


 
 
 
Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability
T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 
 

-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/9f044c442f7f4a9591b29cb8b421f974%40tno.nl.


Bohms, H.M. (Michel)

unread,
Oct 19, 2021, 5:44:10 AM10/19/21
to topbrai...@googlegroups.com

Hi David

 

That is what I suspected (getting lost in shacl-mapping).

 

I also tried:

 

sainput:bpsWeg

  rdf:type owl:DatatypeProperty ;

  rdfs:domain [

      rdf:type owl:Class ;

      owl:unionOf (

          sainput:OntwerpSpecificatie

          sainput:MonsterLaag

          sainput:MonitoringMeting

        ) ;

    ] ;

  rdfs:label "bpsWeg" ;

  rdfs:range xsd:integer ;

.

 

But I guess not treated by shacl-mapping since not

 

Guess I will differentiate them in the inputontology (per sheet).

I can have them one time in the target ontologie.

 

Thx Michel

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

David Price

unread,
Oct 19, 2021, 6:01:28 AM10/19/21
to topbrai...@googlegroups.com
Actually, OWL2SHACL handles that case (just tested in Composer 6.4). Something else must be “wrong”.

On 19 Oct 2021, at 10:44, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Hi David
 
That is what I suspected (getting lost in shacl-mapping).
 
I also tried:
 
sainput:bpsWeg
  rdf:type owl:DatatypeProperty ;
  rdfs:domain [
      rdf:type owl:Class ;
      owl:unionOf (
          sainput:OntwerpSpecificatie
          sainput:MonsterLaag
          sainput:MonitoringMeting
        ) ;
    ] ;
  rdfs:label "bpsWeg" ;
  rdfs:range xsd:integer ;
.

 I just did this:

# prefix: unnamed

@prefix unnamed: <http://example.org/unnamed#> .

  a owl:Ontology ;
  owl:versionInfo "Created with TopBraid Composer" ;
.
unnamed:DatatypeProperty_1
  a owl:DatatypeProperty ;
  rdfs:domain [
      a owl:Class ;
      owl:unionOf (
          unnamed:Thing_1
          unnamed:Thing_2
        ) ;
    ] ;
  rdfs:label "Datatype property 1" ;
  rdfs:range xsd:integer ;
.
unnamed:Thing_1
  a owl:Class ;
  rdfs:label "Thing 1" ;
  rdfs:subClassOf owl:Thing ;
.
unnamed:Thing_2
  a owl:Class ;
  rdfs:label "Thing 2" ;
  rdfs:subClassOf owl:Thing ;
.

and get this:


@prefix dash: <http://datashapes.org/dash#> .
@prefix unnamed: <http://example.org/unnamed#> .

unnamed:Thing_1
  a sh:NodeShape ;
  sh:property unnamed:Thing_1-DatatypeProperty_1 ;
.
unnamed:Thing_1-DatatypeProperty_1
  a sh:PropertyShape ;
  sh:path unnamed:DatatypeProperty_1 ;
  sh:datatype xsd:integer ;
.
unnamed:Thing_2
  a sh:NodeShape ;
  sh:property unnamed:Thing_2-DatatypeProperty_1 ;
.
unnamed:Thing_2-DatatypeProperty_1
  a sh:PropertyShape ;
  sh:path unnamed:DatatypeProperty_1 ;
  sh:datatype xsd:integer ;
.
  a owl:Ontology ;
  owl:imports <http://datashapes.org/dash> ;
  owl:imports <http://example.org/unnamed> ;
.


Cheers,
David

 
But I guess not treated by shacl-mapping since not
 
Guess I will differentiate them in the inputontology (per sheet).
I can have them one time in the target ontologie.
 
Thx Michel
 
 
Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability
T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Bohms, H.M. (Michel)

unread,
Oct 19, 2021, 6:14:10 AM10/19/21
to topbrai...@googlegroups.com

That would be good news….

 

I added union domains for the relevant columns (5x).

 

However ‘spreadsheet import by pattern’ does not provide the mapping, nor does it allow me to select myself.

 

(for the five union-based domains):

 

 

Using EDG started from Windows TBC ME 7.0.3.

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

David Price

unread,
Oct 19, 2021, 6:37:18 AM10/19/21
to topbrai...@googlegroups.com
As I said, go look at the Class/Nodeshape in a Data Graph and see if the properties are there for you to fill into an instance. If not, then you may need to look a SHACL source code to understand.

Also, after adding relevant domains did you go to Transforms and run the OWL2SHACL again?

Cheers,
David

On 19 Oct 2021, at 11:14, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

That would be good news….
 
I added union domains for the relevant columns (5x).
 
However ‘spreadsheet import by pattern’ does not provide the mapping, nor does it allow me to select myself.
 
(for the five union-based domains):
 
<image004.png>
 
Using EDG started from Windows TBC ME 7.0.3.
 
 
Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability
T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Bohms, H.M. (Michel)

unread,
Oct 19, 2021, 6:55:03 AM10/19/21
to topbrai...@googlegroups.com

Solved by first converting ‘owl to shacl’ before the spreadsheet import (after ontology import)

 

It seems the simple domains are directly taken into account (without this conversion), where the domain-unions need this explicit conversion first…..

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

Bohms, H.M. (Michel)

unread,
Oct 19, 2021, 6:57:00 AM10/19/21
to topbrai...@googlegroups.com

Thx!

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

 

Reply all
Reply to author
Forward
0 new messages