Hi
I have a probably basic query about the correct use of @type and schemaLocation when extending an existng class.
It is clear from the examples that when one is truly subclassing an entity to make a different entity, a new @type should be declared
e.g.
@type = MyFancyEquipment
@basetype=PhysicalResource
Where I've had some doubt is the slightly more subtle example where there is a need to simply extend something by adding more attributes.
For example - when using Contact/ContactMedium/MediumCharacteristic, we have Operators in jurisdictions where a postal address won't fit into the street1/street2/city/postcode/country pattern - suppose for example we need to add 'POBox'.
Or the 'Place' entity against Resource Inventory which has no fields at all beyond ID/name
Is the correct approach:
(a) Keep the @type=MediumCharacteristic and set a custom SchemaLocation (Design Guidelines part 2 mention a way of referencing original schema inside our own)
(b) Define a new @type=OurVendorExtendedMediumCharacteristic with @basetype=MediumCharacteristic with SchemaLocation defining our new schema
While I understand the analogy used to classes/polymorphism, from a practical implementation point of view I am torn between
'Do (b) it's a new class, so it must have a new name' and 'If we make up a new name, External systems that can only consume the standard MediumCharacteristic would be more likely to fall over if they don't recongise the @type, even though they can get value from the standard fields and just ignore the extras'. Or is it expected that all API consumers crawl @type/@baseType til they find something they can consume?
Regards
------------------------------
Andrew Torrance
Cerillion Technologies Limited
------------------------------