OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-205) Merge TypeAnnotation and ValueAnnotation into Annotation


     [ http://tools.oasis-open.org/issues/browse/ODATA-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-205:
-----------------------------

    Proposal: 
- Remove TypeAnnotation
- Rename ValueAnnotation to Annotation
- Rename ValueTerm to Term and allow it to have any type. 
- Add an optional "AppliesTo" attribute to the <Term> element whose value is a whitespace-separated list of model elements to which the annotation may  be applied, including "Property", "EntityType", "EntitySet", "ComplexType", or "Term".
- Add a term to the Core vocabulary that allows marking a Term as "I'd like you to treat this as a type cast".

Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-205

  was:
- Remove TypeAnnotation
- Rename ValueAnnotation to Annotation
- Rename ValueTerm to Term and allow it to have any type. 
- Add an optional "AppliesTo" attribute to the <Term> element whose value is a comma-separated list of model elements to which the annotation may  be applied, including "Property", "EntityType", "EntitySet", "ComplexType", or "Term".
- Add a term to the Core vocabulary that allows marking a Term as "I'd like you to treat this as a type cast".

Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-205




> Merge TypeAnnotation and ValueAnnotation into Annotation
> --------------------------------------------------------
>
>                 Key: ODATA-205
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-205
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData CSDL v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>             Fix For: WD01
>
>
> Currently we can annotate anything using a ValueAnnotation, and ValueTerms can be of any type except EntityType and Collection(EntityType). We  can in addition annotate entity types and complex types with a TypeAnnotation, and these can be of complex type or entity type.		
> So for complex-type annotations we have to choose between a ValueAnnotation using a ValueTerm of that complex type,  or a TypeAnnotation using the complex type directly.
> 		
> From the expressiveness there's no difference. The value annotation will look like
> 		
> 		<ValueAnnotation Term="MyComplexTerm">
> 		  <Record>
> 		    <PropertyValue Name="FirstProperty" String="Constant value" />
> 		    <PropertyValue Name="SecondProperty" Path="SomePropertyInTheAnnotatedType" />
> 		  </Record>
> 		</ValueAnnotation>
> 		
> The type annotation will look like 
> 		
> 		<TypeAnnotation Term="MyComplexTerm">
> 		    <PropertyValue Name="FirstProperty" String="Constant value" />
> 		    <PropertyValue Name="SecondProperty" Path="SomePropertyInTheAnnotatedType" />
> 		</TypeAnnotation>
> 		
> The similarity is striking: just strike the <Record> and replace the prefix "Value" with "Type".
> 		
> If the annotation on an instance basis deviates from the metadata "default", the representation in Atom and JSON is already identical for both cases.
> 		
> The only difference is that with a type annotation the server expresses the opinion that the original instance can be "cast" to the annotation's type, while with a value annotation the original instance can be "projected" to the annotation's type. 
> 		
> From a data perspective there's no difference between the two, and the "cast" versus "project" choice is anyway ultimately left to the client. So this difference in opinion can be expressed as an annotation on the term definition.

-- 
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]