PhysicalMapping
CDIFManifest::Classes::PhysicalMapping
Definition
Documentation
Original
Reference
cdi:PhysicalMapping
Definition
Definition
Physical characteristics of the values of an instance variable as part of a physical data set.
Examples
A variable "age" might be represented in a file as a string with a maximum length of 5 characters and a number pattern of ##0.0
Explanatory notes
An instance variable has details of value domain and data type, but will not have the final details of how a value is physically represented in a data file. A variable for height, for example, may be represented as a real number, but may be represented as a string in multiple ways. The decimal separator might be, for example a period or a comma. The string representing the value of a payment might be preceded by a currency symbol. The same numeric value might be written as "1,234,567" or "1.234567". A missing value might be written as ".", "NA", ".R" or as "R". The value mapping describes how the value of an instance variable is physically expressed. The properties of the value mapping as intended to be compatible with the W3C Metadata Vocabulary for Tabular Data (https://www.w3.org/TR/tabular-metadata/) as well as common programming languages and statistical packages. The 'format' property, for example, can draw from an external controlled vocabulary such as the set of formats for Stata, SPSS, or SAS.
CDIF
Definition
Generic per-field physical mapping with column index, format, and numeric-format details.
Diagram
Inheritance
Generalizes: AbstractMapping
Attributes
| Name | Type | Multiplicity | Description |
|---|---|---|---|
| index | integer | [0..1] | DocumentationOriginalReferencecdi:PhysicalMapping-index CDIFDefinitionNon-negative integer that orders the fields in the data structure (column number). Scopecdif:index. |
| format | string | [0..1] | DocumentationOriginalReferencecdi:PhysicalMapping-format DefinitionThis defines the format of the physical representation of the value. From https://www.w3.org/TR/tabular-metadata/ 5.11.2 format: "An atomic property that contains either a single string or an object that defines the format of a value of this type, used when parsing a string value as described in Parsing Cells in [tabular-data-model]. The value of this property becomes the format annotation for the described datatype." See https://www.w3.org/TR/tabular-metadata/ Tabular 6.4.2 "Formats for numeric datatypes" this may include decimalChar, groupChar, pattern "By default, numeric values must be in the formats defined in [xmlschema11-2]. It is not uncommon for numbers within tabular data to be formatted for human consumption, which may involve using commas for decimal points, grouping digits in the number using commas, or adding percent signs to the number." See https://www.w3.org/TR/tabular-metadata/ Tabular 6.4. Formats for Booleans " Boolean values may be represented in many ways aside from the standard 1 and 0 or true and false." See https://www.w3.org/TR/tabular-metadata/ 6.4.4. Formats for dates and times "By default, dates and times are assumed to be in the format defined in [xmlschema11-2]. However dates and times are commonly represented in tabular data in other formats." See https://www.w3.org/TR/tabular-metadata/ 6.4.5 Formats for durations "Durations MUST be formatted and interpreted as defined in [xmlschema11-2], using the [ISO8601] format -?PnYnMnDTnHnMnS. For example, the duration P1Y1D is used for a year and a day; the duration PT2H30M for 2 hours and 30 minutes." See https://www.w3.org/TR/tabular-metadata/ 6.4.6 Formats for other types "If the datatype base is not numeric, boolean, a date/time type, or a duration type, the datatype format annotation provides a regular expression for the string values, with syntax and processing defined by [ECMASCRIPT]. If the supplied value is not a valid regular expression, implementations MUST issue a warning and proceed as if no format had been provided." From DDI3.2 ManagedNumericRepresentation@format "A format for number expressed as a string." From DDI3.2 ManagedDateTimeRepresentation_DateFieldFormat "Describes the format of the date field, in formats such as YYYY/MM or MM-DD-YY, etc. If this element is omitted, then the format is assumed to be the XML Schema format corresponding to the type attribute value." CDIFDefinitionA format for number expressed as a string, or date format like YYYY/MM or MM-DD-YY. Scopecdif:format. |
| physicalDataType | string | [0..1] | DocumentationOriginalReferencecdi:physicalDataType CDIFDefinitionidentifier or name for the data type concept. Scopecdif:physicalDataType. |
| decimalPositions | integer | [0..1] | DocumentationOriginalReferencecdi:decimalPositions CDIFDefinitioncdi:decimalPositions. |
| numberPattern | string | [0..1] | DocumentationOriginalReferencecdi:numberPattern CDIFDefinitionNumber format pattern for the field (PhysicalMapping.numberPattern). Text-format properties (column width, decimal/digit-group separators, display label) live on cdifTextMapping. Scopecdi:numberPattern. |
| scale | integer | [0..1] | DocumentationOriginalReferencecdi:scale CDIFDefinitioncdi:scale. |
| maximumLength | integer | [0..1] | DocumentationOriginalReferencecdi:PhysicalMapping-maximumLength DefinitionThe largest possible value of the length of the physical representation of the value. From the W3C Recommendation "Metadata Vocabulary for Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.11.2: "maxLength: A numeric atomic property that contains a single integer that is the maximum length of the value. The value of this property becomes the maximum length annotation for the described datatype. See Length Constraints in [tabular-data-model] for details." CDIFDefinitioncdi:maximumLength. |
| minimumLength | integer | [0..1] | DocumentationOriginalReferencecdi:PhysicalMapping-minimumLength DefinitionThe smallest possible value for the length of the physical representation of the value. From the W3C Recommendation "Metadata Vocabulary for Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.11.2: "minLength: An atomic property that contains a single integer that is the minimum length of the value. The value of this property becomes the minimum length annotation for the described datatype. See Length Constraints in [tabular-data-model] for details." CDIFDefinitioncdi:minimumLength. |
| nullSequence | string | [0..1] | DocumentationOriginalReferencecdi:PhysicalMapping-nullSequence DefinitionA string indicating a null value. From the W3C Recommendation "Metadata Vocabulary for Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 4.3: "null: the string or strings which cause the value of cells having string value matching any of these values to be null." From the same source, Inherited 5.7: "null: An atomic property giving the string or strings used for null values within the data. If the string value of the cell is equal to any one of these values, the cell value is null. See Parsing Cells in [tabular-data-model] for more details. If not specified, the default for the null property is the empty string ''. The value of this property becomes the null annotation for the described column." CDIFDefinitionThe value of this property becomes the null annotation for the described column. Scopecdi:nullSequence. |
| arrayBase | integer | [0..1] | DocumentationOriginalReferencecdi:arrayBase CDIFDefinitioncdi:arrayBase. |
| defaultValue | string | [0..1] | DocumentationOriginalReferencecdi:defaultValue CDIFDefinitionA default string indicating the value to substitute for an empty string. Scopecdi:defaultValue. |
| isRequired | boolean | [0..1] | DocumentationOriginalReferencecdi:PhysicalMapping-isRequired DefinitionIf the value of this property is True indicates that a value is required for the referenced instance variable. From the W3C Recommendation "Metadata Vocabulary for Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.7 Inherited Properties: "required: A boolean atomic property taking a single value which indicates whether the cell value can be null. See Parsing Cells in [tabular-data-model] for more details. The default is false, which means cells can have null values. The value of this property becomes the required annotation for the described column." CDIFDefinitioncdi:isRequired. |
Associations
No associations.