Autpopulate values for datatype properties

37 views
Skip to first unread message

Dan Segal

unread,
Feb 1, 2021, 3:53:16 PM2/1/21
to TopBraid Suite Users
Hello,

In EDG, is there a way to auto-populate the value of a datatype property?

For example, let's say we have an attribute such as skos:notation .

We want to auto-populate the attribute at the time that we create an Instance; for example, with a sequential number value  (similar to the counter method used when constructing URIs), so that the resulting graph would contain statements such as:

example:1000 skos:notation 1000.
example:1001 skos:notation 1001.
example:1002 skos:notation 1002.

(The predicate does not need to match the URI counter.  It just needs to be a unique, and preferably sequential, value).

Dan


Irene Polikoff

unread,
Feb 1, 2021, 4:01:08 PM2/1/21
to topbrai...@googlegroups.com
If you are already using the URI counter, then the simplest way is to create a property value rule for skos:notation that would infer the value from the URI by taking the local part of the URI. 

Property value rule values are inferred dynamically without being persisted. They are available for query. You would not be able to update them using a form as such fields are not editable. You could, however, add a value for a property backed by a rule using the source code. In this case, if the inferred value is different, you would get two values.

If you want such rule-based values to be physically stored, you can periodically run the inferencing under Transform tab to persist these values.

--
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/3ee513ef-21cb-4eab-ba43-98970e845db1n%40googlegroups.com.

David Price

unread,
Feb 2, 2021, 3:53:07 AM2/2/21
to topbrai...@googlegroups.com
In addition to what Irene said, values can also be set by writing Edit Rules. It requires a little coding but can read adds/deletes In real time and set values based on what it sees. These are seen as extensions of the EDG app, not part of the ontology, and must be deployed as code by a System Admin.

Cheers,
David

On 1 Feb 2021, at 21:01, Irene Polikoff <ir...@topquadrant.com> wrote:

If you are already using the URI counter, then the simplest way is to create a property value rule for skos:notation that would infer the value from the URI by taking the local part of the URI. 

Holger Knublauch

unread,
Feb 2, 2021, 7:00:45 PM2/2/21
to topbrai...@googlegroups.com

For future reference (as the terminology here is quite generic):

Property value rules are documented here: https://www.topquadrant.com/graphql/values.html

Edit rules are at: https://doc.topquadrant.com/6.4/application-configuration/#DeveloperGuide-AddingEvent-Condition-ActionsRules

HTH
Holger

Irene Polikoff

unread,
Feb 2, 2021, 7:16:43 PM2/2/21
to topbrai...@googlegroups.com
To add to this, instruction for creating property value rules in an ontology in EDG is available at https://doc.topquadrant.com/6.4/ontologies/#Working_with_Rules

Dan Segal

unread,
Feb 5, 2021, 2:50:33 PM2/5/21
to TopBraid Suite Users
The combination of the URI counter and a Property Rule looks like it will work for us.

Thank you all for your suggestions.   Much appreciated!
Reply all
Reply to author
Forward
0 new messages