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-119) Allow definition of "simple" types that fix values for facet attributes of primitive types


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

Ralf Handl updated ODATA-119:
-----------------------------

    Proposal: 
Support a new TypeDefinition element for defining new simple types. TypeDefinitions specify a name, underlying types, and zero or more facets applicable to that type.
-TypeDefinitions cannot derive from base type definitions.
-TypeDefinitions can be used wherever a simple type is used (other than as the underlying type in a new TypeDefinition), and are type-comparable with their underlying types and any TypeDefinitions defined using the same underlying type. 
-Additional facets appropriate for the underlying type may be specified in the usage, but the facets specified in the typedefinition must not be respecified.
-Annotations may be applied to a TypeDefinition, and are considered applied wherever the TypeDefinition is used. Applying the same annotation to a property whose TypeDefinition already defines that annotation is an error.
-Where TypeDefinitions are used, the type definition is returned in place of the primitive type wherever the type is specified in a response.
Example:
<TypeDefinition Name="Length" UnderlyingType="Edm.Int32" Nullable=false>
  <Annotation Term="Org.Odata.Measurements.V1.Units" String="Centimeters"/>
</TypeDefinition>
<TypeDefinition Name="Weight" UnderlyingType="Edm.Int32" Nullable=false>
  <Annotation Term=" Org.Odata.Measurements.V1.Units" String="Kilograms"/>
</TypeDefinition>
<ComplexType Name="Size">
  <Property Name="Height" Type="Self.Length" />
  <Property Name="Weight" Type="Self.Weight" />
</ComplexType>

Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47355/latest/odata_meeting-14_on-20121101-minutes.html

  was:
Support a new TypeDefinition element for defining new simple types. TypeDefinitions specify a name, underlying types, and zero or more facets applicable to that type.
-TypeDefinitions cannot derive from base type definitions.
-TypeDefinitions can be used wherever a simple type is used (other than as the underlying type in a new TypeDefinition), and are type-comparable with their underlying types and any TypeDefinitions defined using the same underlying type. 
-Additional facets appropriate for the underlying type may be specified in the usage, but the facets specified in the typedefinition must not be respecified.
-Annotations may be applied to a TypeDefinition, and are considered applied wherever the TypeDefinition is used. Applying the same annotation to a property whose TypeDefinition already defines that annotation is an error.
-Where TypeDefinitions are used, the type definition is returned in place of the primitive type wherever the type is specified in a response.
Example:
<TypeDefinition Name="Length" UnderlyingType="Edm.Int32" Nullable=false>
  <Annotation Term="Org.Odata.Measurements.V1.Units" String="Centimeters"/>
</TypeDefinition>
<TypeDefinition Name="Weight" UnderlyingType="Edm.Int32" Nullable=false>
  <Annotation Term=" Org.Odata.Measurements.V1.Units" String="Kilograms"/>
</TypeDefinition>
<ComplexType Name="Size">
  <Property Name="Height" Type="Self.Length" />
  <Property Name="Weight" Type="Self.Weight" />
</ComplexType>


> Allow definition of "simple" types that fix values for facet attributes of primitive types
> ------------------------------------------------------------------------------------------
>
>                 Key: ODATA-119
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-119
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: New Feature
>          Components: OData CSDL v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>            Assignee: Michael Pizzo
>            Priority: Minor
>             Fix For: WD01
>
>
> It would be helpful if we could define "simple" types that are based on primitive types. This would be useful for providing values for facet attributes in one place:
> <SimpleType Name="Char80" BaseType="Edm.String" MaxLength="80" FixedLength="true" />
> <SimpleType Name="AmountInFInancialReportingCurrency" BaseType="Edm.Decimal" Precision="30" Scale="2" />

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