Hi Paul,
did I not already respond to a very similar question?
https://groups.google.com/forum/#!msg/topbraid-users/i5pfTbVsd8s/bMLyYtAIBwAJ;context-place=forum/topbraid-users
If this answer doesn't help please clarify whether you can use instances
instead?
Thanks,
Holger
On 5/07/2017 1:20, Paul Patrick wrote:
What I'm trying to do is to model a vocabulary as a restricted set of
values, similar to a enum. While it is easy to define this directly
using owl:oneOf directly on the property definition, except that I
need to use this same definition on a number of different properties,
thus I believe I need to do this as a user-defined data type so that
it can be used as a value for a datatype's range.
I think I've gotten close based on the following code below, but when
Ilook at an instance serialized, I see the data type of the selected
value is represented as the datatype xsd:string (^^xsd:string). With
a suspicion that it was the value followed by^^xsd:string, I went into
Source Code view in TopQuadrant and changed the"xsd:string" to the
datatype "cti:ObjectStatusVocab".
|
cti:ObjectStatusVocab
a rdfs:Datatype;
rdfs:comment "Defines the vocabulary that defines the status of an
object."@en-US ;
rdfs:label "Object Status Vocabulary"@en-US ;
rdfs:subClassOf rdfs:Resource;
owl:onDatatype xsd:string;
owl:oneOf
("active"^^xsd:string"deprecated"^^xsd:string"revoked"^^xsd:string).
|
That seemed to work as I got the serialization I was looking for:
|
<subject_id><http://example.com/cti#ObjectStatus"active"^^<http://example.com/cti#ObjectStatusVocab
<http://example.com/cti#ObjectStatusVocab>>.
|
Does this seem correct? It does what I'm looking for, but perhaps
there is a better way to do this.
When I then tried to do it in the Form view, but the Form editor
didn't like the syntax:
|
["active"^^cti:ObjectStatusVocab","deprecated"^^cti:ObjectStatusVocab,
"revoked"^^cti:ObjectStatusVocab]
|
so still trying to figure out if I'm justdoing something wrong or if
I've got to use the Source Code view becausethe Form view doesn't let
one enter in anything except primitive types.
Can anyone tell me if I'm doing this correct?
--
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 [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.