IDS icon indicating copy to clipboard operation
IDS copied to clipboard

Allow for an enumeration of data types

Open vulevukusej opened this issue 2 years ago • 7 comments

When specifying that property "foo" must exist in pset "bar", it would be useful to be able to specify the measure as either "IfcLabel" or "IfcText"

vulevukusej avatar Apr 27 '23 07:04 vulevukusej

I agree. I brought up the same point originally.

aothms avatar Apr 27 '23 11:04 aothms

This indeed keeps on coming back. How would we put that in the specification? Bringing in @CBenghi as a potential feature for the IDS diagnostics tool.

berlotti avatar May 17 '23 07:05 berlotti

We probably have to have a conversation as to what we mean when specifying the measure.

I see two aspects:

  1. a constraint on the type of value, but also
  2. information for converting the unit for the quantitative measures to the agreed SI unit

IfcLabel and IfcText probably don't need the conversion part and constraint on type can be approximated by the basetype on the value as xs:string.

That said I'm not necessarily opposed to adding them to the measures, it's just food for thoughts.

CBenghi avatar May 17 '23 08:05 CBenghi

My understanding was that it should be a constraint (option 1). Conversion does not make sense to me.

MatthiasWeise avatar May 17 '23 09:05 MatthiasWeise

Options:

  1. keep it as is (just require 'ifcText' for example)
  2. turn measure into an 'ids:Value' so you can use enumerations and patterns 2b) turn measure into a 'xs:list' to allow multiple values for measure
  3. add STRING, NUMBER, REAL (and maybe some others to the list of allowed values for measure

berlotti avatar Jun 13 '23 07:06 berlotti

And maybe equally important, the documentation is somewhat inconsistent:

Attribute name:

  • Schema: measure
  • Doc table: Data Type

Possible measure values:

  • For your convenience, a list of common data types are listed here: ... IfcLabel, ...
  • A valid data type name, taken from the IDS units table (does not include label)

Required:

  • Table says: Data Type, required YES
  • Description says "If not specified ..."

My take on these things was that we would use the full list of IFC defined types (which includes some types you would not or cannot actually use) instead of just the measures because it's the simplest way to define the superset of measures + sensible non-numeric and unitless value types. Hence, I think it would make sense to rename the attribute measure -> dataType. I'm a bit uncertain on whether the attribute should be required?


The documentation should also be extended to show how to specify e.g boolean and binary values (is that following xsd grammar or express grammar).

aothms avatar Jun 13 '23 07:06 aothms

  • renamed to 'data type' instead of 'measure'.
  • made required (but can be empty)
  • clarified it can be any ifcDefinedType; with additional 'base' types like STRING, UNDEFINED, COUNT, etc. --> needs documentation

This is a significant impact on the implementations.....

berlotti avatar Jun 16 '23 06:06 berlotti