Question on value based constraints

HI all,

I have a question on how to model alternative constraints based on literal
values.

Let's assume the two alternatives ways to express an address:

ALTERNATIVE 1:
ex:person1 ex:hasAddress "Street xzy plz 12345 ..."
ex:person1 ex:addressType "simpleAddress".

ALTERNATIVE 2:
ex:person1 ex:hasAddress ex:someComplexAddress1 # object is an instance of
class ex:complexAddress
ex:person1 ex:addressType "complexAddress".

I want to define two alternative shapes for addresses: one is simple, i.e.
the literal value "Street xzy plz 12345 ...", and one is complex, i.e. an
instance of ex:complexAddress.

How do I model the choice between the two address' shapes based on the
values "simpleAddress" vs. "complexAddress"?

Regards,

Felix

Received on Wednesday, 17 April 2019 16:27:11 UTC