DiscoveryDataDescriptionStructure

PhysicalMapping inherited from CDIFManifest

DiscoveryDataDescriptionStructure::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

Defines implementation-specific properties for the representation of a variable in a dataset. Aligned with CDIF 2026 schema using DDI-CDI flat per-column mapping structure.

Scope

Generic per-field physical mapping. Carries column index, format, physical data type, plus numeric-format details (decimal positions, separators, scale, length).

Diagram

Inheritance

Generalizes: AbstractMapping

Attributes

NameTypeMultiplicityDescription
indexinteger[0..1]

Documentation

Original
Reference

cdi:PhysicalMapping-index

CDIF
Definition

Non-negative integer that orders the fields in the data structure (column number).

Scope

cdif:index - column index of this variable's values.

formatstring[0..1]

Documentation

Original
Reference

cdi:PhysicalMapping-format

Definition

This 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."

CDIF
Definition

A format for number expressed as a string, or date format like YYYY/MM or MM-DD-YY.

Scope

cdif:format - format token / pattern for parsing values.

physicalDataTypestring[0..1]

Documentation

Original
Reference

cdi:physicalDataType

CDIF
Definition

identifier or name for the data type concept.

Scope

cdif:physicalDataType - physical representation type for the column's bytes.

decimalPositionsinteger[0..1]

Documentation

Original
Reference

cdi:decimalPositions

CDIF
Definition

cdi:decimalPositions - number of decimal positions.

defaultDecimalSeparatorstring[0..1]

Documentation

Original
Reference

cdi:defaultDecimalSeparator

CDIF
Definition

Decimal separator used when not otherwise specified (TextMapping.defaultDecimalSeparator).

Scope

cdi:defaultDecimalSeparator - default decimal separator character.

defaultDigitGroupSeparatorstring[0..1]

Documentation

Original
Reference

cdi:defaultDigitGroupSeparator

CDIF
Definition

Digit-group (thousands) separator (TextMapping.defaultDigitGroupSeparator).

Scope

cdi:defaultDigitGroupSeparator - default digit-group separator character.

numberPatternstring[0..1]

Documentation

Original
Reference

cdi:numberPattern

CDIF
Definition

Number format pattern for the field (PhysicalMapping.numberPattern). Text-format properties (column width, decimal/digit-group separators, display label) live on cdifTextMapping.

Scope

cdi:numberPattern - numeric format pattern.

scaleinteger[0..1]

Documentation

Original
Reference

cdi:scale

CDIF
Definition

cdi:scale - numeric scale.

lengthinteger[0..1]

Documentation

Original
Reference

cdi:PhysicalMapping-length

CDIF
Definition

The column width if the tabular text is fixed width (TextMapping.length).

Scope

cdi:length - column width / value length.

maximumLengthinteger[0..1]

Documentation

Original
Reference

cdi:PhysicalMapping-maximumLength

Definition

The 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."

CDIF
Definition

cdi:maximumLength - maximum value length.

minimumLengthinteger[0..1]

Documentation

Original
Reference

cdi:PhysicalMapping-minimumLength

Definition

The 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."

CDIF
Definition

cdi:minimumLength - minimum value length.

typeOfNumericValuestring[0..1]

Documentation

Original
Reference

cdi:typeOfNumericValue

CDIF
Definition

The type of numeric value carried in cdi:content — decimal, float, or double.

Scope

cdi:typeOfNumericValue - type of numeric value (integer / decimal / ...).

nullSequencestring[0..1]

Documentation

Original
Reference

cdi:PhysicalMapping-nullSequence

Definition

A 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."

CDIF
Definition

The value of this property becomes the null annotation for the described column.

Scope

cdi:nullSequence - sequence representing null.

arrayBaseinteger[0..1]

Documentation

Original
Reference

cdi:arrayBase

CDIF
Definition

Index of the first element/column (TabularTextDataSet.arrayBase).

Scope

cdi:arrayBase - base index for array-valued columns (0 or 1).

Associations

No associations.