-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.01_CS01
-
Fix Version/s: V4.01_CS02
-
Component/s: Vocabularies
-
Labels:None
-
Environment:
Proposed
-
Proposal:
-
Resolution:
Type inheritance implies polymorphism implies that a property may be any of type derived from the declared type. In some cases, a property may be able to be one of a discrete set of types.
For example, in the Schema.org schemas, many of the references can point to either a person or an organization. Person and Organization may derive from a common type, but other types derived from that common base type are not allowed.
There are several possible approaches for representing such unions:
1) Allow defining a discrete set of types for a property, that may or may not have a common base type, rather than a single type.
2) Define a "union" type structure that is an open complex type with properties for each "type"
3) Define an annotation that allows you to restrict the set of derived types of a property. The types must derive from the declared type of the property, which could be an abstract type (i.e., Edm.EntityType).