[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Issue Comment Edited: (ODATA-535) Define specialization for terms
[ http://tools.oasis-open.org/issues/browse/ODATA-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34803#action_34803 ] Ralf Handl edited comment on ODATA-535 at 9/27/13 1:50 PM: ----------------------------------------------------------- If you have a hierarchy of schema types in non-OData format you can choose to translate that into a term hierarchy backed by complex types that contain just the properties directly declared on each schema type, but not interconnected by inheritance. <Schema Namespace="org.schema"> <Term Name="Thing" Type="org.schema.ThingType" /> <Term Name="CreativeWork" BaseTerm="org.schema.Thing" Type="org.schema.CreativeWorkType" /> ... <ComplexType Name="ThingType"> <Property Name="additionalType" Type="Edm.String"> <Annotation Term="Core.IsURL" /> ... </Property> ... </ComplexType> <ComplexType Name="CreativeWork"> <Property Name="about" Type="org.schema.Thing"> <Annotation Term="Core.Description" String="The subject matter of the content." /> </Property> ... </ComplexType> ... </Schema> Another use case is if you already have an OData structured-type hierarchy and just want to use them in annotations. Here you can define a term for the top-level type and choose a derived type when annotating: <Term Name="AThing" Type="org.schema.Thing" /> <Annotation Term="org.schema.AThing"> <Record Type="org.schema.CreativeWork"> <PropertyValue ... /> </Record> </Annotation was (Author: ralfhandl): If you have a hierarchy of schema types in non-OData format you can choose to translate that into a term hierarchy backed by complex types that contain just the properties directly declared on each schema type, but not interconnected by inheritance. <Schema Namespace="org.schema"> <Term Name="Thing" Type="org.schema.ThingType" /> <Term Name="CreativeWork" BaseTerm="org.schema.Thing" Type="org.schema.CreativeWorkType" /> ... <ComplexType Name="ThingType"> <Property Name="additionalType" Type="Edm.String"> <Annotation Term="Core.IsURL" /> ... </Property> ... </ComplexType> <ComplexType Name="CreativeWork"> <Property Name="about" Type="org.schema.Thing"> <Annotation Term="Core.Description" String="The subject matter of the content." /> </Property> ... </ComplexType> ... </Schema> Another use case is if you already have an OData structured-type hierarchy and just want to use them in annotations. Here you can define a term for the top-level type and choose a derived type when annotating: <Term Name="AThing" Type="org.schema.Thing" /> <Annotation Term="org.schema.AThing"> <Record Type="org.schema.CreativeWork"> <PropertyValue ... /> </Record> </Annotation > Define specialization for terms > ------------------------------- > > Key: ODATA-535 > URL: http://tools.oasis-open.org/issues/browse/ODATA-535 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Improvement > Components: OData CSDL > Affects Versions: V4.0_CS01 > Environment: [Proposed] > Reporter: Ralf Handl > Fix For: V4.0_CSD03 > > > When merging type terms and value terms we lost the possibility to define terms that are a specialization of other terms, e.g. "developers are also people". > What we can currently do: > - define a term Person using complex PersonType > - define a complex DeveloperType that inherits from PersonType > - annotate something with term Person and use a record of type DeveloperType > So someone knowing the term Person will find this term with additional properties defined on the DeveloperType. > (If we don't accept ODATA-513 that someone may only find the additional properties and none of the PersonType properties.) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]