Number fields
An attribute for scale is provided for number fields in OSLC. Scale is the number of digits to the right of the decimal for the number.
If the number has a custom display mask, the scale value that is returned is based on the custom display mask. If the display mask is missing, and there is no unit of measure (UOM) set, the value of two is returned by default. If there is a UOM set for the number field but there is no display mask set for the field, the scale of the UOM display mask is returned. The characters 0 and # in the display mask are considered when the scale is determined.
Example: Scale in number fields
The following example shows the returned results with a scale value of 3:
<oslc:property>
<oslc:Property>
<spi:scale> 3 </spi:scale>
<oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#decimal" />
<oslc:readOnly> false </oslc:readOnly>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one" />
<dcterms:title rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">
Cost </dcterms:title>
<oslc:name> triCostNU </oslc:name>
<oslc:propertyDefinition rdf:resource="http://jazz.net/ns/spi#triCostNU" />
</oslc:Property>
</oslc:property>