Adding (a number of) DatatypeProperty items for a class, then view them with the class - how-to?

46 views
Skip to first unread message

Einar Clementz

unread,
Feb 16, 2024, 4:09:20 PMFeb 16
to vocbench-user
Hi community. 

I am working on how-to approaches. The quest now is:
Add one or more DatatypeProprty items to a class in a simple and efficient way. 
It is part of a way to make models in semantic ways including the richness relations gives. 
I work in an OWL project. The sheet2rdf is not possible. 
PS. The resulting model will go into a process to make sql object for such physical database. I try a couple of ways. One is with GraphDB and make SQL query definition there. Two is to use LinkML tooling. Both has pros and cons. 

I have tested various approaches in Vocbench to add DatatypePropery (aka attribute). Only way I find is with the left side browser in property tab, only possible one by one. Then adding links to where the datatypeproperty belongs. 
To view a class with datatypeproperties connected looks hard to find. Reading in docs has not given me the silver bullet either. 

Some hints how-to will help me much. It is an building blocks to have practice to give people. 

Thanks.

Einar Clementz. 

Armando Stellato

unread,
Feb 19, 2024, 5:41:35 AMFeb 19
to Einar Clementz, vocbench-user

Dear Einar,

 

Apologies in advance as I say I am not sure exactly what is your need….but it might well be a hectic and chaotic Monday I woke up into :-D

 

By first: when you say “add to a class”, you mean you want to make these properties as, say, “templates” for the class (e.g. having the class in their domain) or you want to really value them?

 

e.g. say you have class “:Person”

 

you want to value these properties for :Person itself (it might be a need, but if you are valuing multiple properties for a class you might want to revise your modeling: class should be used to categorize instances, and not be too much described themselves) as in:

 

:Person :aDataTypeProperty  “some value”^^xsd:string

 

or you want to value the instances of that class?  As in:

 

:armando foaf:givenName “Armando”^^xsd:string

 

…or you want to add the properties to the ontology?

 

Furthermore, since you are mentioning databases…do you already have data for these properties? That part is confusing because you mention GDB and SQL…

Instead of saying what is possible and what is not, I suggest better describing what you have. FYI, Sheet2RDF is able also to get data from databases.

 

From the last part of your email it seems you really need to add datatype properties (so the third option from those I described). Then (as with other cases) yes, you can:

  • use Semantic Turkey API (check https://vocbench.uniroma2.it/doc/user/  under “Web API” and feed your batch script from wherever you want, using the web api to write
  • use Sheet2RDF (whether you prepare the spreadsheet or you have an existing DB/spreadsheet)
  • model the properties in Turtle and then load the data (that’s the job VB is supposed to help you with, but if you are repeating templates with just the name of the property changing, you might want to consider this as a convenient hypothesis
  • prepare a SPARQL UPDATE with an INSERT DATA and the list of properties you want to add together with their describing triples

 

Finally, what you mention about seeing the properties for a class, pls in general consider that, in OWL ontologies, properties could be potentially used with instance of a given class even though they have no domain declared. It’s different from, say, frame-based modeling where you declare which properties are “template slots” for a class (something you might be more familiar with if you are familiar with OO design).

That means that, in principle, VocBench (nor any other tool) has no elements for telling that that property could be used with instances of that class, yet it can.

That said, if you define the domain for a given property, then you can use the “class diagram” for showing a class with all of “its” (with its defined as those properties having domain on that class) properties

 

Kind Regards,

 

Armando

 

 

--
You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/24c90a9f-1ee8-49ae-bde6-848ffd5efb16n%40googlegroups.com.

Einar Clementz

unread,
Feb 19, 2024, 7:11:32 AMFeb 19
to vocbench-user

Hi Armando.

 

Thank you for your input. Much appreciated.


It is this variant I aim for - “…or you want to add the properties to the ontology?” Adding some DatatypeProperty properties to subclasses.

You give more input in the last part of your message with possibilities.

 

I am not fluid in ontology design so I may confuse you, others, and myself to, with less coherent description. Sorry for that.

We have data, lot of, but not in this setup or shape. We move to more domain setup. We refactor much data to accommodate domains, data products and distributed ownership. We try not to carry forward old habits.

 

I try to do class/property management with the VB UI functionality. This is the quest. I want to made businesspeople do business model work and give them less jump between tools practice. One very nice thing with VB is the second level reference model to use. To connect the local items to where it belongs in the reference model. I talk specific about FIBO, the domain model for finance. Shape a subset of FIBO as the reference model for the local domain at hand (local domain is financial reporting). We then get good, curated vocabular definitions, descriptions, and relations. This is an important reason to think VB as a main UI for shaping our model(s).

 

 

Options you give.

Web-API.

Sheet2RDF.

Model outside VB.

Plain SPARQL.

 

We-API and plain SPARQL I have not approached. It is more last resort.

 

Sheet2RDF, I did try. A message said it work only for SKOS projects, not OWL projects. I try again. I can be ok, businesspeople know excel. 

 

Model outside VB. I work on this.

I have made a model using Gra.Fo from data.world. Exported to Turtle. Imported into VB project. The test now has 8 classes and some 40 DatatypeProperty items.

(PS. Gra.Fo is a neat tool for concept modelling. It is a possible option for outside VB work. But single add "attributes" there as well.).

 

What do I see, the view. The left side browser under Property tab I see all, also DatatypeProperty. Open one to the detailed right-side pane I see classes for the DatatypeProperty under Domains. For a class I can go to “Show in model-oriented graph” I can see the DatatypeProprty connected to it – it is the only place I can see this combination.

I would like to see this information in the details pane for a class. Lists are better when there are several things. In the detail pane we only see what connects to this item, not what this item connects to. Thats for the view part.

 

The edit - hope/wish/need? Is there a way to: If we can have a bulk edit for DatatypeProperty, in the left view or in the detail pane (preferable). And a (bulk) edit/connects to DatatypeProperty from the detailed class pane. Something of this nature.

 

Thank you.

 

Kind regards. 

Einar. 

Armando Stellato

unread,
Feb 19, 2024, 9:05:31 AMFeb 19
to Einar Clementz, vocbench-user

Dear Einar,

 

Thanks for the clarifications. I address now just a few points open in your email

  • about Sheet2RDF, if you could tell me exactly how it happens, we can pinpoint that. I can assure you, it works with everything and for creating any sort of RDF. The bulk creation for datatype properties (or any-type properties) is not that convenient, considering that if one is to create them from within VB and wants to add details for them, it is not really convenient a bulk creation. If a bulk is necessary as way to prompt ontology vocabularies, then Sheet2RDF can do its job.
  • Sure the “show in model-oriented graph” is one option, but the class diagram is even better for what you need.
    Here’s an example:

    VocBench allows for the creation and storage of these diagrams and for their convenient reuse into produced ontology documentation.
    Pls check here:
    https://art.uniroma2.it/legalhtml/ov.html#desc
    the whole HTML page has been produced with VocBench (as well as the diagram contained in it)
  • Another way to easily see all the properties that have a given class as their domain (actually, even a superclass, performing a transitive closure of the IS-A relationship) is to try to value a property from the “Other Property” section in the resource view. You will see by first a list of suggested properties. Those are those properties that explicitly have the class (or one of its superclasses) as their domain.
  • Finally, if you want to show a convenient way for valuing properties for instances of a given class (independently of the domain that has been axiomatically set) you can create custom forms.
    https://vocbench.uniroma2.it/doc/user/cforms/

 

Kind Regards,

 

Armando



 

 

 

Einar Clementz

unread,
Feb 19, 2024, 10:11:38 AMFeb 19
to vocbench-user
Hi Armando.

Thanks for your support. 

From you input, I have a little testing to do. Possibilities are there. I need to get to know it better. 
Class diagram look ok to me. 
I will verify Sheet2RDF. 
And look into custom forms. 
I have looked into Other Properties, but I have not found the nice way there yet. More digging for me. 

I will report any progress. 

Kind regards.
Einar. 

Einar Clementz

unread,
Feb 20, 2024, 4:26:04 AMFeb 20
to vocbench-user

Hi Armando.

 

I continue the quest.

 

I have two different themes here. First more details on DatatypeProperty. Then about Metadata, Imports vs Registry and how-to, for second level reference definitions.

 

You mentioned Other Properties on the detail pane.

I have revisited this. I try to find “owl:DatatypeProperty” here. It is not there.

Is it possible to add to the list of possible properties? If so, how can I do that? 

 

Today we can find many properties, but not the one I have clear interest in now.

Filter on “data”

owl:bottomDataProperty, owl:datatypeComplementOf, owl:onDataRange, owl:onDatatype, owl:topDataProperty

 

Filter on “prop”

rdfs:subPropertyOf, owl:annotatedProperty, owl:assertionProperty, owl:bottomDataProperty, owl:bottomObjectProperty, owl:equivalentProperty, owl:onProperties, owl:onProperty, owl:propertyChainAxiom, owl:propertyDisjointWith, owl:topDataProperty, owl:topObjectProperty 

 

Left window in Property Tab.

Possible to add these types.

  • Property
  • annotationProperty
  • datatypeProperty
  • objectProperty
  • ontologyProperty

Is it some mutual exclusive between Property tab and “Other properties” in detail pane?

 

In project create function, there exits the function to add more metadata stuff. Under Optional settings, resource Metadata.

We can add reference here. I try with DatatypePropery and with All properties. Where does that show when we work on definitions? I did not see where?

Doc for this project setting also point to Metadata Registry setting doc.

 

 

Metadata Imports vs Registry.

I have loaded FIBO ontologies into one project.

Make a user project. Make FIBO ontology project as read only for user project.

In user project first, I have added FIBO as metadata imports, (from the read-only space). It works, but with import it copies the complete ontology in the current user project.

I investigate Metadata registry. Ideally, I should have FIBO ontology here. And the user project read what it needs from this space.

I am a little confused about how to make functional for the user. The user should have easy access to the reference of FIBO. In both left browser and in detail right pane.

 

 

Thank you so much.

 

Kind regards.

Einar. 

Armando Stellato

unread,
Feb 20, 2024, 5:25:33 AMFeb 20
to Einar Clementz, vocbench-user

Dear Einar,

 

I clarify what I meant by getting all property for the class on the Other Properties area of the resource view.

 

The following example comes on a small sample project where the FOAF ontology has been imported.

 

If I click on the add button ( ) I get to the following window:

 

 

Where, as you can see, all the properties suggested (where suggested means what I said before: all properties having the class or a superclass of it on their domain) are being shown. They are not filtered by datatype, but…datatype properties are green, I guess unless you have thousands of properties this is bearable :-D

If you need explicitly a filter, we can consider this for future extension …

 

I am sorry, I don’t follow you in the description of the metadata registry, etc… if you could use the exact same terminology, or describe the actions, this helps us not guessing what you do, but clearly understanding  your actions.

 

The metadata registry is a registry of known datasets. It contains those in your projects and other that VB is aware of, e.g. Linked Open Datasets on the web, because you put them manually or because VB found them by following LOD publishing best practices. Please check in the manual, it will tell you what it does.

If, inside a project, say “projectA”, you imported the FIBO ontology (Metadata\namespaces and import—add import from..), then you will see it listed in the imports tree in that same page (Metadata\namespaces and import) and you will see FIBO’s classes and properties, light colored, in the classes and property tabs.

 

Kind Regards,

 

Armando

 

 

 

Einar Clementz

unread,
Feb 21, 2024, 3:09:49 AMFeb 21
to vocbench-user
Hi 

Thanks once again for for support and more information.

I will have one focused question. It is for now, the key question. 
On the detail pane, for "Other properties" and click on the add button ( ). Click on Show All check mark to get all possible in that list. 
Is it possible to have owl:DatatypeProperty as an item/option to choose in the list? 
If it is possible, how can I configure VB to have that as standard? 


Thanks for your support. 

Kind regards.
Einar. 

Armando Stellato

unread,
Feb 21, 2024, 6:07:57 AMFeb 21
to Einar Clementz, vocbench-user

Dear Einar,

 

Again, my apologies if I did not get exactly what you are asking. I’ll make two hypotheses:

 

  1. You are asking for a filter there to see only datatype properties. As I mentioned, this is not available there because it is usually not needed. One can spot immediately the needed properties (and they are identified by color) and nobody ever asked for a filter there as usually ontologies do not contain so many properties (additionally, suggested for a specific class). It could, in case it is of interested, added in a future iteration of the system
  2. You are asking (as it seems from your last msg) for having specifically owl:DatatypeProperty as a property listed there. This is not possible not due to any technical limitation, rather because it doesn’t make any sense. owl:DatatypeProperty is the class of all datatype properties, not a property itself. As of a list of properties suggested for the instance to be described (based on its types) thus, it doesn’t make any sense to show the class of all (datatype) properties. It’s a meta-model information, not what is needed there

 

If you want to see the owl:DatatypeProperty class, which is hidden by default (the almost-whole OWL ontology is hidden), you can edit the class panel settings, as described in here:

https://vocbench.uniroma2.it/doc/user/owl_editing.jsf#class_section_options

 

Once there, just change the root to rdfs:Resource, then in the class filter, activate all subclasses of rdfs:Rersource (ok, technically you only need the rdf:Property, which is a superclass for owl:DatatypeProperty)

 

 

 

And then you will see the class diagram populated with all the OWL vocabulary entities; you will see the owl:DatatypeProperty and all of its instances in the instance panel below, that is: datatype properties ;-) (in the case below, you only see four props from OWL itself, SKOS and SKOS-XL as no domain ontology has been loaded/imported/created).

 

 

Kind Regards,

 

Armando

 

 

 

 

 

 

Einar Clementz

unread,
Feb 21, 2024, 7:23:49 AMFeb 21
to vocbench-user
Hey Armando. 

Thanks again. 
This is clarifying to me. 

Your hypothesis. 
1 - No, this is not what I ask for. VB has it already. In the "Select property" window, the Search field at the bottom - is what I use the filter term for. Here - VB search term is my filter term, synonyms. 
2 - Thanks for the clarifying explanation. 

Class tree settings. This helps my. 
I have looked for a way to surface Container also. 
Forward we plan to use Container as root for defined data products. In addition to classes. Adding parts from the various classes to give a data products its attributes. 

Thanks. 

Kind regards. 
Einar. 
Reply all
Reply to author
Forward
0 new messages