Property not available in edg:mapsToProperty selection widget

12 views
Skip to first unread message

Tim Smith

unread,
Apr 17, 2020, 6:16:23 PM4/17/20
to topbrai...@googlegroups.com
Hi,

I created a small ontology in an Ontology Asset collection consisting of a couple of classes and properties.  Then I created a small Data Asset collection consisting of a couple of tables and columns.  Then I included/imported the ontology collection into the data asset collection.

For the database column instances, I want to use the edg:mapsToProperty property to associate the columns with properties defined in the Ontology Asset.  However, properties from that asset collection are not appearing in the selection window for edg:mapsToProperty widget even when entering the name of the property.  Other properties with similar names do appear from other graphs.

From reading the documentation, I thought including the Ontology asset collection would be sufficient to allow references to members of the ontology to be created in the Data Asset collection.  Any idea what I'm missing?

Thanks in advance for your help,

Tim

Irene Polikoff

unread,
Apr 17, 2020, 8:16:29 PM4/17/20
to topbrai...@googlegroups.com
This is what I suspect is happening:

  • You are creating classes
  • You are then adding property shapes using either the + sign on the class form or “add new” in the property group panel
  • When a property shape is created, this does not really adds a type for a property

Basically, you get something like:

ex:Product
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:label "Product" ;
  rdfs:subClassOf owl:Thing ;
  sh:property ex:Product-description ;
.
ex:Product-description
  a sh:PropertyShape ;
  sh:path ex:description ;
  sh:name "description" ;
  sh:or dash:HTMLOrStringOrLangString ;
.

There is no {ex:description a rdf:Property} or similar triple. And in most cases this is just fine and preferred.

The strategy for not inserting this triple is that in most cases it is not necessary in EDG and it takes ongoing maintenance (e.g., deletion of shapes) simpler. Just having datatype or class constraint is enough. 

However, for your use case, you need it the type for the property to appear in the autocomplete of the edg:mapToProperty field.

You could do one of these things:

1. Go to the shape you already created



click on the value of the path 



and use Source code panel to add the type statement




2. If you do not have a shape already created, bring in RDF/OWL List Panel
Use New to create a property


For example


Then create a property shape. If you type exactly the same name, the right property will be used for the shape.



Alternatively, you could use the button the right of the ID/Path field to select the property you already created.





--
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/CAF0WbnJqMkZabd2XcRajMkuAC8oquYyOQyOZh5Y%2BEbAgHzC70Q%40mail.gmail.com.

Tim Smith

unread,
Apr 20, 2020, 3:17:29 PM4/20/20
to topbrai...@googlegroups.com
Hi Irene,

I, indeed, did exactly as you described.  I noted at the time that the behavior was different than TBC in that EDG was prompting me for the ID/Path of Property and then let me add it even though I had not explicitly created it.  My assumption was that EDG had created it behind the scenes.

So I've added the rdf:Type rdf:Property triple as you indicated.  When I am in the ontology and I use the SPARQL window to run the query:  

SELECT *
WHERE {
    ?s a rdf:Property .
}

The description property is returned as expected.  When I run the same query in the Data Asset graph, I get four description properties one of which is the one from my ontology.  However, when I try to find the property in the edg:mapsToProperty drop down by typing "desc" as a search term, all of the results are shown in the screenshot below but none of them are the one I created.  Also note that there are more results returned in the drop down than in the SPARQL window (with query sub-graphs selected).  Does SPARQL and the drop down look in different places?

Thanks,

Tim

image.png


Irene Polikoff

unread,
Apr 20, 2020, 5:42:02 PM4/20/20
to topbrai...@googlegroups.com
Hi Tim,

Autocomplete dropdowns in EDG operate on the autocomplete indices. They are created automatically on first lookup, updated continuously, and reset on certain major operations. UI would not be responsive if it had to run SPARQL queries when a user enters a few letters in the look ups. 

Server Administration console has pages for index management. Various indices in TopBraid EDG are built over the underlying graphs and they will take into account graph closure (imports or includes). 

With respect to differences you are seeing:

1. Seeing more than what is returned by the query.

When you look at the screenshot in your e-mail, you see types of the available properties. These are not just resources with the direct rdf:type df:Property triples. These are also members of subclasses of rdf:Property class.

Your query, however, is:

SELECT *
WHERE {
    ?s a rdf:Property .
}

May be try:

SELECT *
WHERE {
    ?s rdf:type/rdfs:subClassOf+ rdf:Property .
}

2. Not seeing your property in the dropdown

I can’t reproduce this. I created a property and it is showing up - in the screenshot below it is one that is coming from the DA CUST collection


If you can send me a small example that reproduces the problem, I can look into it.



On Apr 20, 2020, at 3:17 PM, Tim Smith <smith...@gmail.com> wrote:

Hi Irene,

I, indeed, did exactly as you described.  I noted at the time that the behavior was different than TBC in that EDG was prompting me for the ID/Path of Property and then let me add it even though I had not explicitly created it.  My assumption was that EDG had created it behind the scenes.

So I've added the rdf:Type rdf:Property triple as you indicated.  When I am in the ontology and I use the SPARQL window to run the query:  

SELECT *
WHERE {
    ?s a rdf:Property .
}

The description property is returned as expected.  When I run the same query in the Data Asset graph, I get four description properties one of which is the one from my ontology.  However, when I try to find the property in the edg:mapsToProperty drop down by typing "desc" as a search term, all of the results are shown in the screenshot below but none of them are the one I created.  Also note that there are more results returned in the drop down than in the SPARQL window (with query sub-graphs selected).  Does SPARQL and the drop down look in different places?

Thanks,

Tim

<image.png>


<PastedGraphic-12.png>


click on the value of the path 


<PastedGraphic-13.png>

and use Source code panel to add the type statement

<PastedGraphic-14.png>



2. If you do not have a shape already created, bring in RDF/OWL List Panel
Use New to create a property

<PastedGraphic-11.png>

For example

<PastedGraphic-15.png>

Then create a property shape. If you type exactly the same name, the right property will be used for the shape.

<PastedGraphic-16.png>


Alternatively, you could use the button the right of the ID/Path field to select the property you already created.

<PastedGraphic-17.png>




On Apr 17, 2020, at 6:16 PM, Tim Smith <smith...@gmail.com> wrote:

Hi,

I created a small ontology in an Ontology Asset collection consisting of a couple of classes and properties.  Then I created a small Data Asset collection consisting of a couple of tables and columns.  Then I included/imported the ontology collection into the data asset collection.

For the database column instances, I want to use the edg:mapsToProperty property to associate the columns with properties defined in the Ontology Asset.  However, properties from that asset collection are not appearing in the selection window for edg:mapsToProperty widget even when entering the name of the property.  Other properties with similar names do appear from other graphs.

From reading the documentation, I thought including the Ontology asset collection would be sufficient to allow references to members of the ontology to be created in the Data Asset collection.  Any idea what I'm missing?

Thanks in advance for your help,

Tim

--
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/CAF0WbnJqMkZabd2XcRajMkuAC8oquYyOQyOZh5Y%2BEbAgHzC70Q%40mail.gmail.com.


--
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/4E84E60E-61E3-4C94-AA84-DD330D0FEF46%40topquadrant.com.

--
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.

Tim Smith

unread,
Apr 20, 2020, 9:01:14 PM4/20/20
to topbrai...@googlegroups.com
Hi Irene,

Thank you for clarifying that the sub-properties are driving the different results.  That makes perfect sense.

I've done a lot of testing and what I have found is that if I add the property first using the RDF/OWL Properties List panel and then create the property shape, everything works as expected.

However, if, as I did in my original example, I create the property shape first and then add the rdf:type triple to the property by manually editing the source code for the "placeholder property" entered when I created the property shape, that property will not appear in the edg:mapsToProperty selection dropdown in the Data Asset collection.  I tested this several times with different test properties and it seems to be consistent.

My learning:  Create the property first :) 

Thanks for all your help,

Tim

Irene Polikoff

unread,
Apr 20, 2020, 9:09:37 PM4/20/20
to topbrai...@googlegroups.com
Hmm…

Probably autocomplete index update is not being triggered in this sequence. 

On Apr 20, 2020, at 9:00 PM, Tim Smith <smith...@gmail.com> wrote:

Hi Irene,

Thank you for clarifying that the sub-properties are driving the different results.  That makes perfect sense.

I've done a lot of testing and what I have found is that if I add the property first using the RDF/OWL Properties List panel and then create the property shape, everything works as expected.

However, if, as I did in my original example, I create the property shape first and then add the rdf:type triple to the property by manually editing the source code for the "placeholder property" entered when I created the property shape, that property will not appear in the edg:mapsToProperty selection dropdown in the Data Asset collection.  I tested this several times with different test properties and it seems to be consistent.

My learning:  Create the property first :) 

Thanks for all your help,

Tim
On Mon, Apr 20, 2020 at 5:42 PM Irene Polikoff <ir...@topquadrant.com> wrote:
Hi Tim,

Autocomplete dropdowns in EDG operate on the autocomplete indices. They are created automatically on first lookup, updated continuously, and reset on certain major operations. UI would not be responsive if it had to run SPARQL queries when a user enters a few letters in the look ups. 

Server Administration console has pages for index management. Various indices in TopBraid EDG are built over the underlying graphs and they will take into account graph closure (imports or includes). 

With respect to differences you are seeing:

1. Seeing more than what is returned by the query.

When you look at the screenshot in your e-mail, you see types of the available properties. These are not just resources with the direct rdf:type df:Property triples. These are also members of subclasses of rdf:Property class.

Your query, however, is:

SELECT *
WHERE {
    ?s a rdf:Property .
}

May be try:

SELECT *
WHERE {
    ?s rdf:type/rdfs:subClassOf+ rdf:Property .
}

2. Not seeing your property in the dropdown

I can’t reproduce this. I created a property and it is showing up - in the screenshot below it is one that is coming from the DA CUST collection

<PastedGraphic-20.png>

Holger Knublauch

unread,
Apr 20, 2020, 9:58:31 PM4/20/20
to topbrai...@googlegroups.com

Does the rdf:Property also have an rdfs:label (in the same graph)? It SHOULD work.

In any case, I think you are experienced enough to fall back to the Source Code panel if needed, to avoid declaring the property altogether :) In an ideal world no such global declaration should be needed anymore, and the UI could pick up the needed info from the property shape declarations. The global property axioms are in this case rather legacy from RDFS design patterns.

Holger

Tim Smith

unread,
Apr 20, 2020, 11:44:55 PM4/20/20
to topbrai...@googlegroups.com
Hi Holger, 

I suspect that's the issue... I did not add a label.  The test properties are simple and I'm used to TBC's behavior of using the qname if there is no rdfs:label so it never crossed my mind.

At least EDG is working as designed.  I'll have to look to see if a missing label would show up as a problem.

Thanks,

Tim

Reply all
Reply to author
Forward
0 new messages