SCHEMA IFC4;

TYPE IfcAreaMeasure = REAL;

END_TYPE;

TYPE IfcBoolean = BOOLEAN;

END_TYPE;

TYPE IfcCountMeasure = NUMBER;

END_TYPE;

TYPE IfcDate = STRING;

END_TYPE;

TYPE IfcDateTime = STRING;

END_TYPE;

TYPE IfcDayInMonthNumber = INTEGER;

| WHERE
ValidRange | : | {1 <= SELF <= 31} |

END_TYPE;

TYPE IfcDayInWeekNumber = INTEGER;

| WHERE
ValidRange | : | {1 <= SELF <= 7} |

END_TYPE;

TYPE IfcDimensionCount = INTEGER;

| WHERE
WR1 | : | { 0 < SELF <= 3 } |

END_TYPE;

TYPE IfcDuration = STRING;

END_TYPE;

TYPE IfcElectricConductanceMeasure = REAL;

END_TYPE;

TYPE IfcElectricCurrentMeasure = REAL;

END_TYPE;

TYPE IfcElectricVoltageMeasure = REAL;

END_TYPE;

TYPE IfcForceMeasure = REAL;

END_TYPE;

TYPE IfcGloballyUniqueId = STRING (22) FIXED;

END_TYPE;

TYPE IfcIdentifier = STRING (255);

END_TYPE;

TYPE IfcIlluminanceMeasure = REAL;

END_TYPE;

TYPE IfcInteger = INTEGER;

END_TYPE;

TYPE IfcIonConcentrationMeasure = REAL;

END_TYPE;

TYPE IfcLabel = STRING (255);

END_TYPE;

TYPE IfcLengthMeasure = REAL;

END_TYPE;

TYPE IfcLinearVelocityMeasure = REAL;

END_TYPE;

TYPE IfcLogical = LOGICAL;

END_TYPE;

TYPE IfcMassMeasure = REAL;

END_TYPE;

TYPE IfcMonthInYearNumber = INTEGER;

| WHERE
ValidRange | : | {1 <= SELF <= 12} |

END_TYPE;

TYPE IfcNormalisedRatioMeasure = IfcRatioMeasure;

| WHERE
WR1 | : | {0.0 <= SELF <= 1.0} |

END_TYPE;

TYPE IfcPHMeasure = REAL;

| WHERE
WR21 | : | {0.0 <= SELF <= 14.0} |

END_TYPE;

TYPE IfcPlaneAngleMeasure = REAL;

END_TYPE;

TYPE IfcPositiveLengthMeasure = IfcLengthMeasure;

| WHERE
WR1 | : | SELF > 0. |

END_TYPE;

TYPE IfcPositiveRatioMeasure = IfcRatioMeasure;

| WHERE
WR1 | : | SELF > 0. |

END_TYPE;

TYPE IfcPowerMeasure = REAL;

END_TYPE;

TYPE IfcPressureMeasure = REAL;

END_TYPE;

TYPE IfcRadioActivityMeasure = REAL;

END_TYPE;

TYPE IfcRatioMeasure = REAL;

END_TYPE;

TYPE IfcReal = REAL;

END_TYPE;

TYPE IfcSoundPressureMeasure = REAL;

END_TYPE;

TYPE IfcTemperatureRateOfChangeMeasure = REAL;

END_TYPE;

TYPE IfcText = STRING;

END_TYPE;

TYPE IfcThermalConductivityMeasure = REAL;

END_TYPE;

TYPE IfcThermodynamicTemperatureMeasure = REAL;

END_TYPE;

TYPE IfcTime = STRING;

END_TYPE;

TYPE IfcTimeMeasure = REAL;

END_TYPE;

TYPE IfcTimeStamp = INTEGER;

END_TYPE;

TYPE IfcTorqueMeasure = REAL;

END_TYPE;

TYPE IfcURIReference = STRING;

END_TYPE;

TYPE IfcVolumetricFlowRateMeasure = REAL;

END_TYPE;

TYPE IfcActuatorTypeEnum = ENUMERATION OF (

| ELECTRICACTUATOR, HANDOPERATEDACTUATOR, HYDRAULICACTUATOR, PNEUMATICACTUATOR, THERMOSTATICACTUATOR, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcAlarmTypeEnum = ENUMERATION OF (

| BELL, BREAKGLASSBUTTON, LIGHT, MANUALPULLBOX, SIREN, WHISTLE, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcBenchmarkEnum = ENUMERATION OF (

| GREATERTHAN, GREATERTHANOREQUALTO, LESSTHAN, LESSTHANOREQUALTO, EQUALTO, NOTEQUALTO, INCLUDES, NOTINCLUDES, INCLUDEDIN, NOTINCLUDEDIN);

END_TYPE;

TYPE IfcCableSegmentTypeEnum = ENUMERATION OF (

| BUSBARSEGMENT, CABLESEGMENT, CONDUCTORSEGMENT, CORESEGMENT, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcChangeActionEnum = ENUMERATION OF (

| NOCHANGE, MODIFIED, ADDED, DELETED, NOTDEFINED);

END_TYPE;

TYPE IfcCommunicationsApplianceTypeEnum = ENUMERATION OF (

| ANTENNA, COMPUTER, FAX, GATEWAY, MODEM, NETWORKAPPLIANCE, NETWORKBRIDGE, NETWORKHUB, PRINTER, REPEATER, ROUTER, SCANNER, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcConstraintEnum = ENUMERATION OF (

| HARD, SOFT, ADVISORY, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcControllerTypeEnum = ENUMERATION OF (

| FLOATING, PROGRAMMABLE, PROPORTIONAL, MULTIPOSITION, TWOPOSITION, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcDataOriginEnum = ENUMERATION OF (

| MEASURED, PREDICTED, SIMULATED, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcDistributionPortTypeEnum = ENUMERATION OF (

| CABLE, CABLECARRIER, DUCT, PIPE, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcDistributionSystemEnum = ENUMERATION OF (

| AIRCONDITIONING, AUDIOVISUAL, CHEMICAL, CHILLEDWATER, COMMUNICATION, COMPRESSEDAIR, CONDENSERWATER, CONTROL, CONVEYING, DATA, DISPOSAL, DOMESTICCOLDWATER, DOMESTICHOTWATER, DRAINAGE, EARTHING, ELECTRICAL, ELECTROACOUSTIC, EXHAUST, FIREPROTECTION, FUEL, GAS, HAZARDOUS, HEATING, LIGHTING, LIGHTNINGPROTECTION, MUNICIPALSOLIDWASTE, OIL, OPERATIONAL, POWERGENERATION, RAINWATER, REFRIGERATION, SECURITY, SEWAGE, SIGNAL, STORMWATER, TELEPHONE, TV, VACUUM, VENT, VENTILATION, WASTEWATER, WATERSUPPLY, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcEventTriggerTypeEnum = ENUMERATION OF (

| EVENTRULE, EVENTMESSAGE, EVENTTIME, EVENTCOMPLEX, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcEventTypeEnum = ENUMERATION OF (

| STARTEVENT, ENDEVENT, INTERMEDIATEEVENT, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcFlowDirectionEnum = ENUMERATION OF (

| SOURCE, SINK, SOURCEANDSINK, NOTDEFINED);

END_TYPE;

TYPE IfcFlowInstrumentTypeEnum = ENUMERATION OF (

| PRESSUREGAUGE, THERMOMETER, AMMETER, FREQUENCYMETER, POWERFACTORMETER, PHASEANGLEMETER, VOLTMETER_PEAK, VOLTMETER_RMS, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcObjectiveEnum = ENUMERATION OF (

| CODECOMPLIANCE, CODEWAIVER, DESIGNINTENT, EXTERNAL, HEALTHANDSAFETY, MERGECONFLICT, MODELVIEW, PARAMETER, REQUIREMENT, SPECIFICATION, TRIGGERCONDITION, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcProcedureTypeEnum = ENUMERATION OF (

| ADVICE_CAUTION, ADVICE_NOTE, ADVICE_WARNING, CALIBRATION, DIAGNOSTIC, SHUTDOWN, STARTUP, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcProfileTypeEnum = ENUMERATION OF (

| CURVE, AREA);

END_TYPE;

TYPE IfcPropertySetTemplateTypeEnum = ENUMERATION OF (

| PSET_TYPEDRIVENONLY, PSET_TYPEDRIVENOVERRIDE, PSET_OCCURRENCEDRIVEN, PSET_PERFORMANCEDRIVEN, QTO_TYPEDRIVENONLY, QTO_TYPEDRIVENOVERRIDE, QTO_OCCURRENCEDRIVEN, NOTDEFINED);

END_TYPE;

TYPE IfcRecurrenceTypeEnum = ENUMERATION OF (

| DAILY, WEEKLY, MONTHLY_BY_DAY_OF_MONTH, MONTHLY_BY_POSITION, BY_DAY_COUNT, BY_WEEKDAY_COUNT, YEARLY_BY_DAY_OF_MONTH, YEARLY_BY_POSITION);

END_TYPE;

TYPE IfcSIPrefix = ENUMERATION OF (

| EXA, PETA, TERA, GIGA, MEGA, KILO, HECTO, DECA, DECI, CENTI, MILLI, MICRO, NANO, PICO, FEMTO, ATTO);

END_TYPE;

TYPE IfcSIUnitName = ENUMERATION OF (

| AMPERE, BECQUEREL, CANDELA, COULOMB, CUBIC_METRE, DEGREE_CELSIUS, FARAD, GRAM, GRAY, HENRY, HERTZ, JOULE, KELVIN, LUMEN, LUX, METRE, MOLE, NEWTON, OHM, PASCAL, RADIAN, SECOND, SIEMENS, SIEVERT, SQUARE_METRE, STERADIAN, TESLA, VOLT, WATT, WEBER);

END_TYPE;

TYPE IfcSensorTypeEnum = ENUMERATION OF (

| CONDUCTANCESENSOR, CONTACTSENSOR, FIRESENSOR, FLOWSENSOR, GASSENSOR, HEATSENSOR, HUMIDITYSENSOR, IONCONCENTRATIONSENSOR, LEVELSENSOR, LIGHTSENSOR, MOISTURESENSOR, MOVEMENTSENSOR, PHSENSOR, PRESSURESENSOR, RADIATIONSENSOR, RADIOACTIVITYSENSOR, SMOKESENSOR, SOUNDSENSOR, TEMPERATURESENSOR, WINDSENSOR, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcSimplePropertyTemplateTypeEnum = ENUMERATION OF (

| P_SINGLEVALUE, P_ENUMERATEDVALUE, P_BOUNDEDVALUE, P_LISTVALUE, P_TABLEVALUE, P_REFERENCEVALUE, Q_LENGTH, Q_AREA, Q_VOLUME, Q_COUNT, Q_WEIGHT, Q_TIME);

END_TYPE;

TYPE IfcStateEnum = ENUMERATION OF (

| READWRITE, READONLY, LOCKED, READWRITELOCKED, READONLYLOCKED);

END_TYPE;

TYPE IfcSwitchingDeviceTypeEnum = ENUMERATION OF (

| CONTACTOR, DIMMERSWITCH, EMERGENCYSTOP, KEYPAD, MOMENTARYSWITCH, SELECTORSWITCH, STARTER, SWITCHDISCONNECTOR, TOGGLESWITCH, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcTaskTypeEnum = ENUMERATION OF (

| ATTENDANCE, CONSTRUCTION, DEMOLITION, DISMANTLE, DISPOSAL, INSTALLATION, LOGISTIC, MAINTENANCE, MOVE, OPERATION, REMOVAL, RENOVATION, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcTimeSeriesDataTypeEnum = ENUMERATION OF (

| CONTINUOUS, DISCRETE, DISCRETEBINARY, PIECEWISEBINARY, PIECEWISECONSTANT, PIECEWISECONTINUOUS, NOTDEFINED);

END_TYPE;

TYPE IfcTransportElementTypeEnum = ENUMERATION OF (

| ELEVATOR, ESCALATOR, MOVINGWALKWAY, CRANEWAY, LIFTINGGEAR, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcUnitEnum = ENUMERATION OF (

| ABSORBEDDOSEUNIT, AMOUNTOFSUBSTANCEUNIT, AREAUNIT, DOSEEQUIVALENTUNIT, ELECTRICCAPACITANCEUNIT, ELECTRICCHARGEUNIT, ELECTRICCONDUCTANCEUNIT, ELECTRICCURRENTUNIT, ELECTRICRESISTANCEUNIT, ELECTRICVOLTAGEUNIT, ENERGYUNIT, FORCEUNIT, FREQUENCYUNIT, ILLUMINANCEUNIT, INDUCTANCEUNIT, LENGTHUNIT, LUMINOUSFLUXUNIT, LUMINOUSINTENSITYUNIT, MAGNETICFLUXDENSITYUNIT, MAGNETICFLUXUNIT, MASSUNIT, PLANEANGLEUNIT, POWERUNIT, PRESSUREUNIT, RADIOACTIVITYUNIT, SOLIDANGLEUNIT, THERMODYNAMICTEMPERATUREUNIT, TIMEUNIT, VOLUMEUNIT, USERDEFINED);

END_TYPE;

TYPE IfcUnitaryControlElementTypeEnum = ENUMERATION OF (

| ALARMPANEL, CONTROLPANEL, GASDETECTIONPANEL, INDICATORPANEL, MIMICPANEL, HUMIDISTAT, THERMOSTAT, WEATHERSTATION, USERDEFINED, NOTDEFINED);

END_TYPE;

TYPE IfcActorSelect = SELECT (

| IfcOrganization, IfcPerson, IfcPersonAndOrganization);

END_TYPE;

TYPE IfcAxis2Placement = SELECT (

| IfcAxis2Placement3D);

END_TYPE;

TYPE IfcClassificationReferenceSelect = SELECT (

| IfcClassificationReference, IfcClassification);

END_TYPE;

TYPE IfcClassificationSelect = SELECT (

| IfcClassification, IfcClassificationReference);

END_TYPE;

TYPE IfcDefinitionSelect = SELECT (

| IfcObjectDefinition, IfcPropertyDefinition);

END_TYPE;

TYPE IfcLibrarySelect = SELECT (

| IfcLibraryInformation);

END_TYPE;

TYPE IfcMaterialSelect = SELECT (

| IfcMaterialUsageDefinition, IfcMaterialDefinition);

END_TYPE;

TYPE IfcMetricValueSelect = SELECT (

| IfcMeasureWithUnit, IfcTable, IfcTimeSeries, IfcValue, IfcReference);

END_TYPE;

TYPE IfcObjectReferenceSelect = SELECT (

| IfcMaterialDefinition, IfcPerson, IfcOrganization, IfcPersonAndOrganization, IfcExternalReference, IfcTimeSeries, IfcTable);

END_TYPE;

TYPE IfcProductSelect = SELECT (

| IfcProduct, IfcTypeProduct);

END_TYPE;

TYPE IfcPropertySetDefinitionSelect = SELECT (

| IfcPropertySetDefinition);

END_TYPE;

TYPE IfcUnit = SELECT (

| IfcNamedUnit);

END_TYPE;

TYPE IfcValue = SELECT (

END_TYPE;

ENTITY IfcActuator

| SUBTYPE OF IfcDistributionControlElement;

PredefinedType | : | OPTIONAL IfcActuatorTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcActuatorTypeEnum.USERDEFINED) OR ((PredefinedType = IfcActuatorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCBUILDINGCONTROLSDOMAIN.IFCACTUATORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcActuatorType

| SUBTYPE OF IfcDistributionControlElementType;

PredefinedType | : | IfcActuatorTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcActuatorTypeEnum.USERDEFINED) OR ((PredefinedType = IfcActuatorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcAlarm

| SUBTYPE OF IfcDistributionControlElement;

PredefinedType | : | OPTIONAL IfcAlarmTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcAlarmTypeEnum.USERDEFINED) OR ((PredefinedType = IfcAlarmTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCBUILDINGCONTROLSDOMAIN.IFCALARMTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcAlarmType

| SUBTYPE OF IfcDistributionControlElementType;

PredefinedType | : | IfcAlarmTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcAlarmTypeEnum.USERDEFINED) OR ((PredefinedType = IfcAlarmTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcApplication;

ApplicationDeveloper | : | IfcOrganization;
Version | : | IfcLabel;
ApplicationFullName | : | IfcLabel;
ApplicationIdentifier | : | IfcIdentifier;

| UNIQUE

UR1 | : | ApplicationIdentifier;
UR2 | : | ApplicationFullName, Version;

END_ENTITY;

ENTITY IfcApproval;

Identifier | : | OPTIONAL IfcIdentifier;
Name | : | OPTIONAL IfcLabel;
Description | : | OPTIONAL IfcText;
TimeOfApproval | : | OPTIONAL IfcDateTime;
Status | : | OPTIONAL IfcLabel;
Level | : | OPTIONAL IfcLabel;
Qualifier | : | OPTIONAL IfcText;
RequestingApproval | : | OPTIONAL IfcActorSelect;
GivingApproval | : | OPTIONAL IfcActorSelect;

| INVERSE

ApprovedObjects | : | SET OF IfcRelAssociatesApproval FOR RelatingApproval;

| WHERE

HasIdentifierOrName | : | EXISTS (Identifier) OR EXISTS (Name);

END_ENTITY;

ENTITY IfcAxis2Placement3D

| SUBTYPE OF IfcPlacement;

Axis | : | OPTIONAL IfcDirection;
RefDirection | : | OPTIONAL IfcDirection;

| DERIVE

P | : | LIST [3:3] OF IfcDirection := IfcBuildAxes(Axis, RefDirection);

| WHERE

LocationIs3D | : | SELF\IfcPlacement.Location.Dim = 3;
AxisIs3D | : | (NOT (EXISTS (Axis))) OR (Axis.Dim = 3);
RefDirIs3D | : | (NOT (EXISTS (RefDirection))) OR (RefDirection.Dim = 3);
AxisToRefDirPosition | : | (NOT (EXISTS (Axis))) OR (NOT (EXISTS (RefDirection))) OR (IfcCrossProduct(Axis,RefDirection).Magnitude > 0.0);
AxisAndRefDirProvision | : | NOT ((EXISTS (Axis)) XOR (EXISTS (RefDirection)));

END_ENTITY;

ENTITY IfcBuilding

| SUBTYPE OF IfcSpatialStructureElement;

ElevationOfRefHeight | : | OPTIONAL IfcLengthMeasure;
ElevationOfTerrain | : | OPTIONAL IfcLengthMeasure;
BuildingAddress | : | OPTIONAL IfcStrippedOptional;

END_ENTITY;

ENTITY IfcBuildingStorey

| SUBTYPE OF IfcSpatialStructureElement;

Elevation | : | OPTIONAL IfcLengthMeasure;

END_ENTITY;

ENTITY IfcCableSegment

| SUBTYPE OF IfcFlowSegment;

PredefinedType | : | OPTIONAL IfcCableSegmentTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcCableSegmentTypeEnum.USERDEFINED) OR ((PredefinedType = IfcCableSegmentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCELECTRICALDOMAIN.IFCCABLESEGMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcCableSegmentType

| SUBTYPE OF IfcFlowSegmentType;

PredefinedType | : | IfcCableSegmentTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcCableSegmentTypeEnum.USERDEFINED) OR ((PredefinedType = IfcCableSegmentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcCartesianPoint

| SUBTYPE OF IfcPoint;

Coordinates | : | LIST [1:3] OF IfcLengthMeasure;

| DERIVE

Dim | : | IfcDimensionCount := HIINDEX(Coordinates);

| WHERE

CP2Dor3D | : | HIINDEX(Coordinates) >= 2;

END_ENTITY;

ENTITY IfcClassification

| SUBTYPE OF IfcExternalInformation;

Source | : | OPTIONAL IfcLabel;
Edition | : | OPTIONAL IfcLabel;
EditionDate | : | OPTIONAL IfcDate;
Name | : | IfcLabel;
Description | : | OPTIONAL IfcText;
Location | : | OPTIONAL IfcURIReference;
ReferenceTokens | : | OPTIONAL LIST [1:?] OF IfcIdentifier;

| INVERSE

ClassificationForObjects | : | SET OF IfcRelAssociatesClassification FOR RelatingClassification;
HasReferences | : | SET OF IfcClassificationReference FOR ReferencedSource;

END_ENTITY;

ENTITY IfcClassificationReference

| SUBTYPE OF IfcExternalReference;

ReferencedSource | : | OPTIONAL IfcClassificationReferenceSelect;
Description | : | OPTIONAL IfcText;
Sort | : | OPTIONAL IfcIdentifier;

| INVERSE

ClassificationRefForObjects | : | SET [0:?] OF IfcRelAssociatesClassification FOR RelatingClassification;
HasReferences | : | SET [0:?] OF IfcClassificationReference FOR ReferencedSource;

END_ENTITY;

ENTITY IfcCommunicationsAppliance

| SUBTYPE OF IfcFlowTerminal;

PredefinedType | : | OPTIONAL IfcCommunicationsApplianceTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcCommunicationsApplianceTypeEnum.USERDEFINED) OR ((PredefinedType = IfcCommunicationsApplianceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCELECTRICALDOMAIN.IFCCOMMUNICATIONSAPPLIANCETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcCommunicationsApplianceType

| SUBTYPE OF IfcFlowTerminalType;

PredefinedType | : | IfcCommunicationsApplianceTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcCommunicationsApplianceTypeEnum.USERDEFINED) OR ((PredefinedType = IfcCommunicationsApplianceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcComplexPropertyTemplate

| SUBTYPE OF IfcPropertyTemplate;

UsageName | : | OPTIONAL IfcLabel;
TemplateType | : | OPTIONAL IfcStrippedOptional;
HasPropertyTemplates | : | OPTIONAL SET [1:?] OF IfcPropertyTemplate;

| WHERE

UniquePropertyNames | : | IfcUniquePropertyTemplateNames(HasPropertyTemplates);
NoSelfReference | : | SIZEOF(QUERY(temp <* HasPropertyTemplates | SELF :=: temp)) = 0;

END_ENTITY;

ENTITY IfcConstraint

| ABSTRACT SUPERTYPE OF(ONEOF(IfcMetric, IfcObjective));

Name | : | IfcLabel;
Description | : | OPTIONAL IfcText;
ConstraintGrade | : | IfcConstraintEnum;
ConstraintSource | : | OPTIONAL IfcLabel;
CreatingActor | : | OPTIONAL IfcActorSelect;
CreationTime | : | OPTIONAL IfcDateTime;
UserDefinedGrade | : | OPTIONAL IfcLabel;

| INVERSE

| WHERE

WR11 | : | (ConstraintGrade <> IfcConstraintEnum.USERDEFINED) OR ((ConstraintGrade = IfcConstraintEnum.USERDEFINED) AND EXISTS(SELF\IfcConstraint.UserDefinedGrade));

END_ENTITY;

ENTITY IfcContext

| ABSTRACT SUPERTYPE OF(ONEOF(IfcProject, IfcProjectLibrary))

| SUBTYPE OF IfcObjectDefinition;

ObjectType | : | OPTIONAL IfcLabel;
LongName | : | OPTIONAL IfcLabel;
Phase | : | OPTIONAL IfcLabel;
RepresentationContexts | : | OPTIONAL SET [1:?] OF IfcStrippedOptional;
UnitsInContext | : | OPTIONAL IfcUnitAssignment;

| INVERSE

IsDefinedBy | : | SET [0:?] OF IfcRelDefinesByProperties FOR RelatedObjects;
Declares | : | SET OF IfcRelDeclares FOR RelatingContext;

END_ENTITY;

ENTITY IfcContextDependentUnit

| SUBTYPE OF IfcNamedUnit;

Name | : | IfcLabel;

| INVERSE

END_ENTITY;

ENTITY IfcControl

| ABSTRACT SUPERTYPE OF(IfcPerformanceHistory)

| SUBTYPE OF IfcObject;

Identification | : | OPTIONAL IfcIdentifier;

| INVERSE

Controls | : | SET OF IfcRelAssignsToControl FOR RelatingControl;

END_ENTITY;

ENTITY IfcController

| SUBTYPE OF IfcDistributionControlElement;

PredefinedType | : | OPTIONAL IfcControllerTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcControllerTypeEnum.USERDEFINED) OR ((PredefinedType = IfcControllerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCBUILDINGCONTROLSDOMAIN.IFCCONTROLLERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcControllerType

| SUBTYPE OF IfcDistributionControlElementType;

PredefinedType | : | IfcControllerTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcControllerTypeEnum.USERDEFINED) OR ((PredefinedType = IfcControllerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcConversionBasedUnit

| SUPERTYPE OF(IfcConversionBasedUnitWithOffset)

| SUBTYPE OF IfcNamedUnit;

Name | : | IfcLabel;
ConversionFactor | : | IfcMeasureWithUnit;

| INVERSE

END_ENTITY;

ENTITY IfcConversionBasedUnitWithOffset

| SUBTYPE OF IfcConversionBasedUnit;

ConversionOffset | : | IfcReal;

END_ENTITY;

ENTITY IfcDimensionalExponents;

LengthExponent | : | INTEGER;
MassExponent | : | INTEGER;
TimeExponent | : | INTEGER;
ElectricCurrentExponent | : | INTEGER;
ThermodynamicTemperatureExponent | : | INTEGER;
AmountOfSubstanceExponent | : | INTEGER;
LuminousIntensityExponent | : | INTEGER;

END_ENTITY;

ENTITY IfcDirection

| SUBTYPE OF IfcGeometricRepresentationItem;

DirectionRatios | : | LIST [2:3] OF REAL;

| DERIVE

Dim | : | IfcDimensionCount := HIINDEX(DirectionRatios);

| WHERE

MagnitudeGreaterZero | : | SIZEOF(QUERY(Tmp <* DirectionRatios | Tmp <> 0.0)) > 0;

END_ENTITY;

ENTITY IfcDistributionControlElement

| SUPERTYPE OF(ONEOF(IfcActuator, IfcAlarm, IfcController, IfcFlowInstrument, IfcSensor, IfcUnitaryControlElement))

| SUBTYPE OF IfcDistributionElement;

| INVERSE

AssignedToFlowElement | : | SET [0:1] OF IfcRelFlowControlElements FOR RelatedControlElements;

END_ENTITY;

ENTITY IfcDistributionControlElementType

| ABSTRACT SUPERTYPE OF(ONEOF(IfcActuatorType, IfcAlarmType, IfcControllerType, IfcFlowInstrumentType, IfcSensorType, IfcUnitaryControlElementType))

| SUBTYPE OF IfcDistributionElementType;

END_ENTITY;

ENTITY IfcDistributionElement

| SUPERTYPE OF(ONEOF(IfcDistributionControlElement, IfcDistributionFlowElement))

| SUBTYPE OF IfcElement;

| INVERSE

END_ENTITY;

ENTITY IfcDistributionElementType

| SUPERTYPE OF(ONEOF(IfcDistributionControlElementType, IfcDistributionFlowElementType))

| SUBTYPE OF IfcElementType;

END_ENTITY;

ENTITY IfcDistributionFlowElement

| SUPERTYPE OF(ONEOF(IfcFlowController, IfcFlowSegment, IfcFlowTerminal))

| SUBTYPE OF IfcDistributionElement;

| INVERSE

HasControlElements | : | SET [0:1] OF IfcRelFlowControlElements FOR RelatingFlowElement;

END_ENTITY;

ENTITY IfcDistributionFlowElementType

| ABSTRACT SUPERTYPE OF(ONEOF(IfcFlowControllerType, IfcFlowSegmentType, IfcFlowTerminalType))

| SUBTYPE OF IfcDistributionElementType;

END_ENTITY;

ENTITY IfcDistributionPort

| SUBTYPE OF IfcPort;

FlowDirection | : | OPTIONAL IfcFlowDirectionEnum;
PredefinedType | : | OPTIONAL IfcDistributionPortTypeEnum;
SystemType | : | OPTIONAL IfcDistributionSystemEnum;

END_ENTITY;

ENTITY IfcDistributionSystem

| SUPERTYPE OF()

| SUBTYPE OF IfcSystem;

LongName | : | OPTIONAL IfcLabel;
PredefinedType | : | OPTIONAL IfcDistributionSystemEnum;

END_ENTITY;

ENTITY IfcElement

| ABSTRACT SUPERTYPE OF(ONEOF(IfcDistributionElement, IfcTransportElement))

| SUBTYPE OF IfcProduct;

Tag | : | OPTIONAL IfcIdentifier;

| INVERSE

ContainedInStructure | : | SET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements;

END_ENTITY;

ENTITY IfcElementType

| ABSTRACT SUPERTYPE OF(ONEOF(IfcDistributionElementType, IfcTransportElementType))

| SUBTYPE OF IfcTypeProduct;

ElementType | : | OPTIONAL IfcLabel;

END_ENTITY;

ENTITY IfcEvent

| SUBTYPE OF IfcProcess;

PredefinedType | : | OPTIONAL IfcEventTypeEnum;
EventTriggerType | : | OPTIONAL IfcEventTriggerTypeEnum;
UserDefinedEventTriggerType | : | OPTIONAL IfcLabel;
EventOccurenceTime | : | OPTIONAL IfcEventTime;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcEventTypeEnum.USERDEFINED) OR ((PredefinedType = IfcEventTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | NOT(EXISTS(EventTriggerType)) OR (EventTriggerType <> IfcEventTriggerTypeEnum.USERDEFINED) OR ((EventTriggerType = IfcEventTriggerTypeEnum.USERDEFINED) AND EXISTS(UserDefinedEventTriggerType));

END_ENTITY;

ENTITY IfcEventTime

| SUBTYPE OF IfcSchedulingTime;

ActualDate | : | OPTIONAL IfcDateTime;
EarlyDate | : | OPTIONAL IfcDateTime;
LateDate | : | OPTIONAL IfcDateTime;
ScheduleDate | : | OPTIONAL IfcDateTime;

END_ENTITY;

ENTITY IfcEventType

| SUBTYPE OF IfcTypeProcess;

PredefinedType | : | IfcEventTypeEnum;
EventTriggerType | : | IfcEventTriggerTypeEnum;
UserDefinedEventTriggerType | : | OPTIONAL IfcLabel;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcEventTypeEnum.USERDEFINED) OR ((PredefinedType = IfcEventTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeProcess.ProcessType)) ;
CorrectEventTriggerType | : | (EventTriggerType <> IfcEventTriggerTypeEnum.USERDEFINED) OR ((EventTriggerType = IfcEventTriggerTypeEnum.USERDEFINED) AND EXISTS(UserDefinedEventTriggerType)) ;

END_ENTITY;

ENTITY IfcExternalInformation

| ABSTRACT SUPERTYPE OF(ONEOF(IfcClassification, IfcLibraryInformation));

END_ENTITY;

ENTITY IfcExternalReference

| ABSTRACT SUPERTYPE OF(IfcClassificationReference);

Location | : | OPTIONAL IfcURIReference;
Identification | : | OPTIONAL IfcIdentifier;
Name | : | OPTIONAL IfcLabel;

| INVERSE

| WHERE

WR1 | : | EXISTS(Identification) OR EXISTS(Location) OR EXISTS(Name);

END_ENTITY;

ENTITY IfcFlowController

| SUPERTYPE OF(IfcSwitchingDevice)

| SUBTYPE OF IfcDistributionFlowElement;

END_ENTITY;

ENTITY IfcFlowControllerType

| ABSTRACT SUPERTYPE OF(IfcSwitchingDeviceType)

| SUBTYPE OF IfcDistributionFlowElementType;

END_ENTITY;

ENTITY IfcFlowInstrument

| SUBTYPE OF IfcDistributionControlElement;

PredefinedType | : | OPTIONAL IfcFlowInstrumentTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcFlowInstrumentTypeEnum.USERDEFINED) OR ((PredefinedType = IfcFlowInstrumentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCBUILDINGCONTROLSDOMAIN.IFCFLOWINSTRUMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcFlowInstrumentType

| SUBTYPE OF IfcDistributionControlElementType;

PredefinedType | : | IfcFlowInstrumentTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcFlowInstrumentTypeEnum.USERDEFINED) OR ((PredefinedType = IfcFlowInstrumentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcFlowSegment

| SUPERTYPE OF(IfcCableSegment)

| SUBTYPE OF IfcDistributionFlowElement;

END_ENTITY;

ENTITY IfcFlowSegmentType

| ABSTRACT SUPERTYPE OF(IfcCableSegmentType)

| SUBTYPE OF IfcDistributionFlowElementType;

END_ENTITY;

ENTITY IfcFlowTerminal

| SUPERTYPE OF(IfcCommunicationsAppliance)

| SUBTYPE OF IfcDistributionFlowElement;

END_ENTITY;

ENTITY IfcFlowTerminalType

| ABSTRACT SUPERTYPE OF(IfcCommunicationsApplianceType)

| SUBTYPE OF IfcDistributionFlowElementType;

END_ENTITY;

ENTITY IfcGeometricRepresentationItem

| ABSTRACT SUPERTYPE OF(ONEOF(IfcDirection, IfcPlacement, IfcPoint))

| SUBTYPE OF IfcRepresentationItem;

END_ENTITY;

ENTITY IfcGroup

| SUPERTYPE OF(IfcSystem)

| SUBTYPE OF IfcObject;

| INVERSE

IsGroupedBy | : | SET OF IfcRelAssignsToGroup FOR RelatingGroup;

END_ENTITY;

ENTITY IfcIrregularTimeSeries

| SUBTYPE OF IfcTimeSeries;

Values | : | LIST [1:?] OF IfcIrregularTimeSeriesValue;

END_ENTITY;

ENTITY IfcIrregularTimeSeriesValue;

TimeStamp | : | IfcDateTime;
ListValues | : | LIST [1:?] OF IfcValue;

END_ENTITY;

ENTITY IfcLibraryInformation

| SUBTYPE OF IfcExternalInformation;

Name | : | IfcLabel;
Version | : | OPTIONAL IfcLabel;
Publisher | : | OPTIONAL IfcActorSelect;
VersionDate | : | OPTIONAL IfcDateTime;
Location | : | OPTIONAL IfcURIReference;
Description | : | OPTIONAL IfcText;

| INVERSE

LibraryInfoForObjects | : | SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary;

END_ENTITY;

ENTITY IfcLocalPlacement

| SUBTYPE OF IfcObjectPlacement;

PlacementRelTo | : | OPTIONAL IfcObjectPlacement;
RelativePlacement | : | IfcAxis2Placement;

| WHERE

WR21 | : | IfcCorrectLocalPlacement(RelativePlacement, PlacementRelTo);

END_ENTITY;

ENTITY IfcMaterial

| SUBTYPE OF IfcMaterialDefinition;

Name | : | IfcLabel;
Description | : | OPTIONAL IfcText;
Category | : | OPTIONAL IfcLabel;

| INVERSE

END_ENTITY;

ENTITY IfcMaterialDefinition

| ABSTRACT SUPERTYPE OF(ONEOF(IfcMaterial, IfcMaterialProfile, IfcMaterialProfileSet));

| INVERSE

AssociatedTo | : | SET [0:?] OF IfcRelAssociatesMaterial FOR RelatingMaterial;

END_ENTITY;

ENTITY IfcMaterialProfile

| SUPERTYPE OF()

| SUBTYPE OF IfcMaterialDefinition;

Name | : | OPTIONAL IfcLabel;
Description | : | OPTIONAL IfcText;
Material | : | OPTIONAL IfcMaterial;
Profile | : | IfcProfileDef;
Priority | : | OPTIONAL IfcNormalisedRatioMeasure;
Category | : | OPTIONAL IfcLabel;

| INVERSE

ToMaterialProfileSet | : | IfcMaterialProfileSet FOR MaterialProfiles;

END_ENTITY;

ENTITY IfcMaterialProfileSet

| SUBTYPE OF IfcMaterialDefinition;

Name | : | OPTIONAL IfcLabel;
Description | : | OPTIONAL IfcText;
MaterialProfiles | : | LIST [1:?] OF IfcMaterialProfile;
CompositeProfile | : | OPTIONAL IfcStrippedOptional;

END_ENTITY;

ENTITY IfcMaterialProfileSetUsage

| SUPERTYPE OF()

| SUBTYPE OF IfcMaterialUsageDefinition;

ForProfileSet | : | IfcMaterialProfileSet;
CardinalPoint | : | OPTIONAL IfcStrippedOptional;
ReferenceExtent | : | OPTIONAL IfcPositiveLengthMeasure;

END_ENTITY;

ENTITY IfcMaterialUsageDefinition

| ABSTRACT SUPERTYPE OF(IfcMaterialProfileSetUsage);

| INVERSE

AssociatedTo | : | SET [1:?] OF IfcRelAssociatesMaterial FOR RelatingMaterial;

END_ENTITY;

ENTITY IfcMeasureWithUnit;

ValueComponent | : | IfcValue;
UnitComponent | : | IfcUnit;

END_ENTITY;

ENTITY IfcMetric

| SUBTYPE OF IfcConstraint;

Benchmark | : | IfcBenchmarkEnum;
ValueSource | : | OPTIONAL IfcLabel;
DataValue | : | IfcMetricValueSelect;
ReferencePath | : | OPTIONAL IfcReference;

END_ENTITY;

ENTITY IfcNamedUnit

| ABSTRACT SUPERTYPE OF(ONEOF(IfcContextDependentUnit, IfcConversionBasedUnit, IfcSIUnit));

Dimensions | : | IfcDimensionalExponents;
UnitType | : | IfcUnitEnum;

| WHERE

WR1 | : | IfcCorrectDimensions (SELF.UnitType, SELF.Dimensions);

END_ENTITY;

ENTITY IfcObject

| ABSTRACT SUPERTYPE OF(ONEOF(IfcControl, IfcGroup, IfcProcess, IfcProduct))

| SUBTYPE OF IfcObjectDefinition;

ObjectType | : | OPTIONAL IfcLabel;

| INVERSE

IsDeclaredBy | : | SET [0:1] OF IfcRelDefinesByObject FOR RelatedObjects;
Declares | : | SET OF IfcRelDefinesByObject FOR RelatingObject;
IsTypedBy | : | SET [0:1] OF IfcRelDefinesByType FOR RelatedObjects;
IsDefinedBy | : | SET OF IfcRelDefinesByProperties FOR RelatedObjects;

END_ENTITY;

ENTITY IfcObjectDefinition

| ABSTRACT SUPERTYPE OF(ONEOF(IfcContext, IfcObject, IfcTypeObject))

| SUBTYPE OF IfcRoot;

| INVERSE

HasAssignments | : | SET OF IfcRelAssigns FOR RelatedObjects;
Nests | : | SET [0:1] OF IfcRelNests FOR RelatedObjects;
IsNestedBy | : | SET OF IfcRelNests FOR RelatingObject;
HasContext | : | SET [0:1] OF IfcRelDeclares FOR RelatedDefinitions;
IsDecomposedBy | : | SET OF IfcRelAggregates FOR RelatingObject;
Decomposes | : | SET [0:1] OF IfcRelAggregates FOR RelatedObjects;
HasAssociations | : | SET OF IfcRelAssociates FOR RelatedObjects;

END_ENTITY;

ENTITY IfcObjectPlacement

| ABSTRACT SUPERTYPE OF(IfcLocalPlacement);

| INVERSE

PlacesObject | : | SET [0:?] OF IfcProduct FOR ObjectPlacement;
ReferencedByPlacements | : | SET OF IfcLocalPlacement FOR PlacementRelTo;

END_ENTITY;

ENTITY IfcObjective

| SUBTYPE OF IfcConstraint;

BenchmarkValues | : | OPTIONAL LIST [1:?] OF IfcConstraint;
LogicalAggregator | : | OPTIONAL IfcStrippedOptional;
ObjectiveQualifier | : | IfcObjectiveEnum;
UserDefinedQualifier | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | (ObjectiveQualifier <> IfcObjectiveEnum.USERDEFINED) OR ((ObjectiveQualifier = IfcObjectiveEnum.USERDEFINED) AND EXISTS(SELF\IfcObjective.UserDefinedQualifier));

END_ENTITY;

ENTITY IfcOrganization;

Identification | : | OPTIONAL IfcIdentifier;
Name | : | IfcLabel;
Description | : | OPTIONAL IfcText;
Roles | : | OPTIONAL LIST [1:?] OF IfcStrippedOptional;
Addresses | : | OPTIONAL LIST [1:?] OF IfcStrippedOptional;

| INVERSE

Engages | : | SET OF IfcPersonAndOrganization FOR TheOrganization;

END_ENTITY;

ENTITY IfcOwnerHistory;

OwningUser | : | IfcPersonAndOrganization;
OwningApplication | : | IfcApplication;
State | : | OPTIONAL IfcStateEnum;
ChangeAction | : | OPTIONAL IfcChangeActionEnum;
LastModifiedDate | : | OPTIONAL IfcTimeStamp;
LastModifyingUser | : | OPTIONAL IfcPersonAndOrganization;
LastModifyingApplication | : | OPTIONAL IfcApplication;
CreationDate | : | IfcTimeStamp;

| WHERE

CorrectChangeAction | : | (EXISTS(LastModifiedDate)) OR (NOT(EXISTS(LastModifiedDate)) AND NOT(EXISTS(ChangeAction))) OR (NOT(EXISTS(LastModifiedDate)) AND EXISTS(ChangeAction) AND ((ChangeAction = IfcChangeActionEnum.NOTDEFINED) OR (ChangeAction = IfcChangeActionEnum.NOCHANGE)));

END_ENTITY;

ENTITY IfcPerformanceHistory

| SUBTYPE OF IfcControl;

LifeCyclePhase | : | IfcLabel;
PredefinedType | : | OPTIONAL IfcStrippedOptional;

END_ENTITY;

ENTITY IfcPerson;

Identification | : | OPTIONAL IfcIdentifier;
FamilyName | : | OPTIONAL IfcLabel;
GivenName | : | OPTIONAL IfcLabel;
MiddleNames | : | OPTIONAL LIST [1:?] OF IfcLabel;
PrefixTitles | : | OPTIONAL LIST [1:?] OF IfcLabel;
SuffixTitles | : | OPTIONAL LIST [1:?] OF IfcLabel;
Roles | : | OPTIONAL LIST [1:?] OF IfcStrippedOptional;
Addresses | : | OPTIONAL LIST [1:?] OF IfcStrippedOptional;

| INVERSE

EngagedIn | : | SET OF IfcPersonAndOrganization FOR ThePerson;

| WHERE

IdentifiablePerson | : | EXISTS(Identification) OR EXISTS(FamilyName) OR EXISTS(GivenName);
ValidSetOfNames | : | NOT EXISTS(MiddleNames) OR EXISTS(FamilyName) OR EXISTS(GivenName);

END_ENTITY;

ENTITY IfcPersonAndOrganization;

ThePerson | : | IfcPerson;
TheOrganization | : | IfcOrganization;
Roles | : | OPTIONAL LIST [1:?] OF IfcStrippedOptional;

END_ENTITY;

ENTITY IfcPlacement

| ABSTRACT SUPERTYPE OF(IfcAxis2Placement3D)

| SUBTYPE OF IfcGeometricRepresentationItem;

Location | : | IfcCartesianPoint;

| DERIVE

Dim | : | IfcDimensionCount := Location.Dim;

END_ENTITY;

ENTITY IfcPoint

| ABSTRACT SUPERTYPE OF(IfcCartesianPoint)

| SUBTYPE OF IfcGeometricRepresentationItem;

END_ENTITY;

ENTITY IfcPort

| ABSTRACT SUPERTYPE OF(IfcDistributionPort)

| SUBTYPE OF IfcProduct;

| INVERSE

ConnectedFrom | : | SET [0:1] OF IfcRelConnectsPorts FOR RelatedPort;
ConnectedTo | : | SET [0:1] OF IfcRelConnectsPorts FOR RelatingPort;

END_ENTITY;

ENTITY IfcProcedure

| SUBTYPE OF IfcProcess;

PredefinedType | : | OPTIONAL IfcProcedureTypeEnum;

| WHERE

HasName | : | EXISTS(SELF\IfcRoot.Name);
CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcProcedureTypeEnum.USERDEFINED) OR ((PredefinedType = IfcProcedureTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType));

END_ENTITY;

ENTITY IfcProcedureType

| SUBTYPE OF IfcTypeProcess;

PredefinedType | : | IfcProcedureTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcProcedureTypeEnum.USERDEFINED) OR ((PredefinedType = IfcProcedureTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeProcess.ProcessType));

END_ENTITY;

ENTITY IfcProcess

| ABSTRACT SUPERTYPE OF(ONEOF(IfcEvent, IfcProcedure, IfcTask))

| SUBTYPE OF IfcObject;

Identification | : | OPTIONAL IfcIdentifier;
LongDescription | : | OPTIONAL IfcText;

| INVERSE

END_ENTITY;

ENTITY IfcProduct

| ABSTRACT SUPERTYPE OF(ONEOF(IfcElement, IfcPort, IfcSpatialElement))

| SUBTYPE OF IfcObject;

ObjectPlacement | : | OPTIONAL IfcObjectPlacement;
Representation | : | OPTIONAL IfcStrippedOptional;

| INVERSE

ReferencedBy | : | SET OF IfcRelAssignsToProduct FOR RelatingProduct;

| WHERE

PlacementForShapeRepresentation | : | (EXISTS(Representation) AND EXISTS(ObjectPlacement)) OR (EXISTS(Representation) AND (SIZEOF(QUERY(temp <* Representation.Representations | 'IFCREPRESENTATIONRESOURCE.IFCSHAPEREPRESENTATION' IN TYPEOF(temp))) = 0)) OR (NOT(EXISTS(Representation)));

END_ENTITY;

ENTITY IfcProfileDef

| SUPERTYPE OF();

ProfileType | : | IfcProfileTypeEnum;
ProfileName | : | OPTIONAL IfcLabel;

| INVERSE

END_ENTITY;

ENTITY IfcProject

| SUBTYPE OF IfcContext;

| WHERE

HasName | : | EXISTS(SELF\IfcRoot.Name);
CorrectContext | : | NOT(EXISTS(SELF\IfcContext.RepresentationContexts)) OR (SIZEOF(QUERY(Temp <* SELF\IfcContext.RepresentationContexts | 'IFCREPRESENTATIONRESOURCE.IFCGEOMETRICREPRESENTATIONSUBCONTEXT' IN TYPEOF(Temp) )) = 0);
NoDecomposition | : | SIZEOF(SELF\IfcObjectDefinition.Decomposes) = 0;
HasOwnerHistory | : | EXISTS(SELF\IfcRoot.OwnerHistory);

END_ENTITY;

ENTITY IfcProjectLibrary

| SUBTYPE OF IfcContext;

END_ENTITY;

ENTITY IfcProperty

| ABSTRACT SUPERTYPE OF(IfcSimpleProperty)

| SUBTYPE OF IfcPropertyAbstraction;

Name | : | IfcIdentifier;
Description | : | OPTIONAL IfcText;

| INVERSE

PartOfPset | : | SET OF IfcPropertySet FOR HasProperties;

END_ENTITY;

ENTITY IfcPropertyAbstraction

| ABSTRACT SUPERTYPE OF(ONEOF(IfcProperty, IfcPropertyEnumeration));

| INVERSE

END_ENTITY;

ENTITY IfcPropertyBoundedValue

| SUBTYPE OF IfcSimpleProperty;

UpperBoundValue | : | OPTIONAL IfcValue;
LowerBoundValue | : | OPTIONAL IfcValue;
Unit | : | OPTIONAL IfcUnit;
SetPointValue | : | OPTIONAL IfcValue;

| WHERE

SameUnitUpperLower | : | NOT(EXISTS(UpperBoundValue)) OR NOT(EXISTS(LowerBoundValue)) OR (TYPEOF(UpperBoundValue) = TYPEOF(LowerBoundValue));
SameUnitUpperSet | : | NOT(EXISTS(UpperBoundValue)) OR NOT(EXISTS(SetPointValue)) OR (TYPEOF(UpperBoundValue) = TYPEOF(SetPointValue));
SameUnitLowerSet | : | NOT(EXISTS(LowerBoundValue)) OR NOT(EXISTS(SetPointValue)) OR (TYPEOF(LowerBoundValue) = TYPEOF(SetPointValue));

END_ENTITY;

ENTITY IfcPropertyDefinition

| ABSTRACT SUPERTYPE OF(ONEOF(IfcPropertySetDefinition, IfcPropertyTemplateDefinition))

| SUBTYPE OF IfcRoot;

| INVERSE

HasContext | : | SET [0:1] OF IfcRelDeclares FOR RelatedDefinitions;
HasAssociations | : | SET OF IfcRelAssociates FOR RelatedObjects;

END_ENTITY;

ENTITY IfcPropertyEnumeratedValue

| SUBTYPE OF IfcSimpleProperty;

EnumerationValues | : | OPTIONAL LIST [1:?] OF IfcValue;
EnumerationReference | : | OPTIONAL IfcPropertyEnumeration;

| WHERE

WR21 | : | NOT(EXISTS(EnumerationReference)) OR NOT(EXISTS(EnumerationValues)) OR (SIZEOF(QUERY(temp <* EnumerationValues | temp IN EnumerationReference.EnumerationValues)) = SIZEOF(EnumerationValues));

END_ENTITY;

ENTITY IfcPropertyEnumeration

| SUBTYPE OF IfcPropertyAbstraction;

Name | : | IfcLabel;
EnumerationValues | : | LIST [1:?] OF UNIQUE IfcValue;
Unit | : | OPTIONAL IfcUnit;

| UNIQUE

UR1 | : | Name;

| WHERE

WR01 | : | SIZEOF(QUERY(temp <* SELF.EnumerationValues | NOT(TYPEOF(SELF.EnumerationValues[1]) = TYPEOF(temp)) )) = 0;

END_ENTITY;

ENTITY IfcPropertyListValue

| SUBTYPE OF IfcSimpleProperty;

ListValues | : | OPTIONAL LIST [1:?] OF IfcValue;
Unit | : | OPTIONAL IfcUnit;

| WHERE

WR31 | : | SIZEOF(QUERY(temp <* SELF.ListValues | NOT(TYPEOF(SELF.ListValues[1]) = TYPEOF(temp)) )) = 0;

END_ENTITY;

ENTITY IfcPropertyReferenceValue

| SUBTYPE OF IfcSimpleProperty;

UsageName | : | OPTIONAL IfcText;
PropertyReference | : | OPTIONAL IfcObjectReferenceSelect;

END_ENTITY;

ENTITY IfcPropertySet

| SUBTYPE OF IfcPropertySetDefinition;

HasProperties | : | SET [1:?] OF IfcProperty;

| WHERE

ExistsName | : | EXISTS(SELF\IfcRoot.Name);
UniquePropertyNames | : | IfcUniquePropertyName(HasProperties);

END_ENTITY;

ENTITY IfcPropertySetDefinition

| ABSTRACT SUPERTYPE OF(IfcPropertySet)

| SUBTYPE OF IfcPropertyDefinition;

| INVERSE

DefinesType | : | SET OF IfcTypeObject FOR HasPropertySets;
IsDefinedBy | : | SET OF IfcRelDefinesByTemplate FOR RelatedPropertySets;
DefinesOccurrence | : | SET [0:1] OF IfcRelDefinesByProperties FOR RelatingPropertyDefinition;

END_ENTITY;

ENTITY IfcPropertySetTemplate

| SUBTYPE OF IfcPropertyTemplateDefinition;

TemplateType | : | OPTIONAL IfcPropertySetTemplateTypeEnum;
ApplicableEntity | : | OPTIONAL IfcIdentifier;
HasPropertyTemplates | : | SET [1:?] OF IfcPropertyTemplate;

| INVERSE

Defines | : | SET OF IfcRelDefinesByTemplate FOR RelatingTemplate;

| WHERE

ExistsName | : | EXISTS(SELF\IfcRoot.Name);
UniquePropertyNames | : | IfcUniquePropertyTemplateNames(HasPropertyTemplates);

END_ENTITY;

ENTITY IfcPropertySingleValue

| SUBTYPE OF IfcSimpleProperty;

NominalValue | : | OPTIONAL IfcValue;
Unit | : | OPTIONAL IfcUnit;

END_ENTITY;

ENTITY IfcPropertyTableValue

| SUBTYPE OF IfcSimpleProperty;

DefiningValues | : | OPTIONAL LIST [1:?] OF UNIQUE IfcValue;
DefinedValues | : | OPTIONAL LIST [1:?] OF IfcValue;
Expression | : | OPTIONAL IfcText;
DefiningUnit | : | OPTIONAL IfcUnit;
DefinedUnit | : | OPTIONAL IfcUnit;
CurveInterpolation | : | OPTIONAL IfcStrippedOptional;

| WHERE

WR21 | : | (NOT(EXISTS(DefiningValues)) AND NOT(EXISTS(DefinedValues))) OR (SIZEOF(DefiningValues) = SIZEOF(DefinedValues));
WR22 | : | NOT(EXISTS(DefiningValues)) OR (SIZEOF(QUERY(temp <* SELF.DefiningValues | TYPEOF(temp) <> TYPEOF(SELF.DefiningValues[1]) )) = 0);
WR23 | : | NOT(EXISTS(DefinedValues)) OR (SIZEOF(QUERY(temp <* SELF.DefinedValues | TYPEOF(temp) <> TYPEOF(SELF.DefinedValues[1]) )) = 0);

END_ENTITY;

ENTITY IfcPropertyTemplate

| ABSTRACT SUPERTYPE OF(ONEOF(IfcComplexPropertyTemplate, IfcSimplePropertyTemplate))

| SUBTYPE OF IfcPropertyTemplateDefinition;

| INVERSE

PartOfComplexTemplate | : | SET OF IfcComplexPropertyTemplate FOR HasPropertyTemplates;
PartOfPsetTemplate | : | SET OF IfcPropertySetTemplate FOR HasPropertyTemplates;

END_ENTITY;

ENTITY IfcPropertyTemplateDefinition

| ABSTRACT SUPERTYPE OF(ONEOF(IfcPropertySetTemplate, IfcPropertyTemplate))

| SUBTYPE OF IfcPropertyDefinition;

END_ENTITY;

ENTITY IfcQuantityArea

| SUBTYPE OF IfcStrippedOptional;

AreaValue | : | IfcAreaMeasure;
Formula | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.AREAUNIT);
WR22 | : | AreaValue >= 0.;

END_ENTITY;

ENTITY IfcQuantityCount

| SUBTYPE OF IfcStrippedOptional;

CountValue | : | IfcCountMeasure;
Formula | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | CountValue >= 0.;

END_ENTITY;

ENTITY IfcQuantityLength

| SUBTYPE OF IfcStrippedOptional;

LengthValue | : | IfcLengthMeasure;
Formula | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.LENGTHUNIT);
WR22 | : | LengthValue >= 0.;

END_ENTITY;

ENTITY IfcQuantityTime

| SUBTYPE OF IfcStrippedOptional;

TimeValue | : | IfcTimeMeasure;
Formula | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.TIMEUNIT);
WR22 | : | TimeValue >= 0.;

END_ENTITY;

ENTITY IfcQuantityVolume

| SUBTYPE OF IfcStrippedOptional;

VolumeValue | : | IfcStrippedOptional;
Formula | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.VOLUMEUNIT);
WR22 | : | VolumeValue >= 0.;

END_ENTITY;

ENTITY IfcQuantityWeight

| SUBTYPE OF IfcStrippedOptional;

WeightValue | : | IfcMassMeasure;
Formula | : | OPTIONAL IfcLabel;

| WHERE

WR21 | : | NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.MASSUNIT);
WR22 | : | WeightValue >= 0.;

END_ENTITY;

ENTITY IfcRecurrencePattern;

RecurrenceType | : | IfcRecurrenceTypeEnum;
DayComponent | : | OPTIONAL SET [1:?] OF IfcDayInMonthNumber;
WeekdayComponent | : | OPTIONAL SET [1:?] OF IfcDayInWeekNumber;
MonthComponent | : | OPTIONAL SET [1:?] OF IfcMonthInYearNumber;
Position | : | OPTIONAL IfcInteger;
Interval | : | OPTIONAL IfcInteger;
Occurrences | : | OPTIONAL IfcInteger;
TimePeriods | : | OPTIONAL LIST [1:?] OF IfcTimePeriod;

END_ENTITY;

ENTITY IfcReference;

TypeIdentifier | : | OPTIONAL IfcIdentifier;
AttributeIdentifier | : | OPTIONAL IfcIdentifier;
InstanceName | : | OPTIONAL IfcLabel;
ListPositions | : | OPTIONAL LIST [1:?] OF INTEGER;
InnerReference | : | OPTIONAL IfcReference;

END_ENTITY;

ENTITY IfcRelAggregates

| SUBTYPE OF IfcRelDecomposes;

RelatingObject | : | IfcObjectDefinition;
RelatedObjects | : | SET [1:?] OF IfcObjectDefinition;

| WHERE

NoSelfReference | : | SIZEOF(QUERY(Temp <* RelatedObjects | RelatingObject :=: Temp)) = 0;

END_ENTITY;

ENTITY IfcRelAssigns

| ABSTRACT SUPERTYPE OF(ONEOF(IfcRelAssignsToControl, IfcRelAssignsToGroup, IfcRelAssignsToProduct))

| SUBTYPE OF IfcRelationship;

RelatedObjects | : | SET [1:?] OF IfcObjectDefinition;
RelatedObjectsType | : | OPTIONAL IfcStrippedOptional;

| WHERE

WR1 | : | IfcCorrectObjectAssignment(RelatedObjectsType, RelatedObjects);

END_ENTITY;

ENTITY IfcRelAssignsToControl

| SUBTYPE OF IfcRelAssigns;

RelatingControl | : | IfcControl;

| WHERE

NoSelfReference | : | SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingControl :=: Temp)) = 0;

END_ENTITY;

ENTITY IfcRelAssignsToGroup

| SUPERTYPE OF()

| SUBTYPE OF IfcRelAssigns;

RelatingGroup | : | IfcGroup;

| WHERE

NoSelfReference | : | SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingGroup :=: Temp)) = 0;

END_ENTITY;

ENTITY IfcRelAssignsToProduct

| SUBTYPE OF IfcRelAssigns;

RelatingProduct | : | IfcProductSelect;

| WHERE

NoSelfReference | : | SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingProduct :=: Temp)) = 0;

END_ENTITY;

ENTITY IfcRelAssociates

| ABSTRACT SUPERTYPE OF(ONEOF(IfcRelAssociatesApproval, IfcRelAssociatesClassification, IfcRelAssociatesConstraint, IfcRelAssociatesLibrary, IfcRelAssociatesMaterial))

| SUBTYPE OF IfcRelationship;

RelatedObjects | : | SET [1:?] OF IfcDefinitionSelect;

END_ENTITY;

ENTITY IfcRelAssociatesApproval

| SUBTYPE OF IfcRelAssociates;

RelatingApproval | : | IfcApproval;

END_ENTITY;

ENTITY IfcRelAssociatesClassification

| SUBTYPE OF IfcRelAssociates;

RelatingClassification | : | IfcClassificationSelect;

END_ENTITY;

ENTITY IfcRelAssociatesConstraint

| SUBTYPE OF IfcRelAssociates;

Intent | : | OPTIONAL IfcLabel;
RelatingConstraint | : | IfcConstraint;

END_ENTITY;

ENTITY IfcRelAssociatesLibrary

| SUBTYPE OF IfcRelAssociates;

RelatingLibrary | : | IfcLibrarySelect;

END_ENTITY;

ENTITY IfcRelAssociatesMaterial

| SUBTYPE OF IfcRelAssociates;

RelatingMaterial | : | IfcMaterialSelect;

| WHERE

NoVoidElement | : | SIZEOF(QUERY(temp <* SELF\IfcRelAssociates.RelatedObjects | ('IFCPRODUCTEXTENSION.IFCFEATUREELEMENTSUBTRACTION' IN TYPEOF(temp)) OR ('IFCPRODUCTEXTENSION.IFCVIRTUALELEMENT' IN TYPEOF(temp)) )) = 0;
AllowedElements | : | SIZEOF(QUERY(temp <* SELF\IfcRelAssociates.RelatedObjects | ( SIZEOF(TYPEOF(temp) * [ 'IFCPRODUCTEXTENSION.IFCELEMENT', 'IFCPRODUCTEXTENSION.IFCELEMENTTYPE', 'IFCSHAREDBLDGELEMENTS.IFCWINDOWSTYLE', 'IFCSHAREDBLDGELEMENTS.IFCDOORSTYLE', 'IFCSTRUCTURALANALYSISDOMAIN.IFCSTRUCTURALMEMBER', 'IFCPRODUCTEXTENSION.IFCPORT']) = 0) )) = 0;

END_ENTITY;

ENTITY IfcRelConnects

| ABSTRACT SUPERTYPE OF(ONEOF(IfcRelConnectsPorts, IfcRelContainedInSpatialStructure, IfcRelFlowControlElements))

| SUBTYPE OF IfcRelationship;

END_ENTITY;

ENTITY IfcRelConnectsPorts

| SUBTYPE OF IfcRelConnects;

RelatingPort | : | IfcPort;
RelatedPort | : | IfcPort;
RealizingElement | : | OPTIONAL IfcElement;

| WHERE

NoSelfReference | : | RelatingPort :<>: RelatedPort;

END_ENTITY;

ENTITY IfcRelContainedInSpatialStructure

| SUBTYPE OF IfcRelConnects;

RelatedElements | : | SET [1:?] OF IfcProduct;
RelatingStructure | : | IfcSpatialElement;

| WHERE

WR31 | : | SIZEOF(QUERY(temp <* RelatedElements | 'IFCPRODUCTEXTENSION.IFCSPATIALSTRUCTUREELEMENT' IN TYPEOF(temp))) = 0;

END_ENTITY;

ENTITY IfcRelDeclares

| SUBTYPE OF IfcRelationship;

RelatingContext | : | IfcContext;
RelatedDefinitions | : | SET [1:?] OF IfcDefinitionSelect;

| WHERE

NoSelfReference | : | SIZEOF(QUERY(Temp <* RelatedDefinitions | RelatingContext :=: Temp)) = 0;

END_ENTITY;

ENTITY IfcRelDecomposes

| ABSTRACT SUPERTYPE OF(ONEOF(IfcRelAggregates, IfcRelNests))

| SUBTYPE OF IfcRelationship;

END_ENTITY;

ENTITY IfcRelDefines

| ABSTRACT SUPERTYPE OF(ONEOF(IfcRelDefinesByObject, IfcRelDefinesByProperties, IfcRelDefinesByTemplate, IfcRelDefinesByType))

| SUBTYPE OF IfcRelationship;

END_ENTITY;

ENTITY IfcRelDefinesByObject

| SUBTYPE OF IfcRelDefines;

RelatedObjects | : | SET [1:?] OF IfcObject;
RelatingObject | : | IfcObject;

END_ENTITY;

ENTITY IfcRelDefinesByProperties

| SUBTYPE OF IfcRelDefines;

RelatedObjects | : | SET [1:1] OF IfcObjectDefinition;
RelatingPropertyDefinition | : | IfcPropertySetDefinitionSelect;

END_ENTITY;

ENTITY IfcRelDefinesByTemplate

| SUBTYPE OF IfcRelDefines;

RelatedPropertySets | : | SET [1:?] OF IfcPropertySetDefinition;
RelatingTemplate | : | IfcPropertySetTemplate;

END_ENTITY;

ENTITY IfcRelDefinesByType

| SUBTYPE OF IfcRelDefines;

RelatedObjects | : | SET [1:?] OF IfcObject;
RelatingType | : | IfcTypeObject;

END_ENTITY;

ENTITY IfcRelFlowControlElements

| SUBTYPE OF IfcRelConnects;

RelatedControlElements | : | SET [1:?] OF IfcDistributionControlElement;
RelatingFlowElement | : | IfcDistributionFlowElement;

END_ENTITY;

ENTITY IfcRelNests

| SUBTYPE OF IfcRelDecomposes;

RelatingObject | : | IfcObjectDefinition;
RelatedObjects | : | LIST [1:?] OF IfcObjectDefinition;

| WHERE

NoSelfReference | : | SIZEOF(QUERY(Temp <* RelatedObjects | RelatingObject :=: Temp)) = 0;

END_ENTITY;

ENTITY IfcRelationship

| ABSTRACT SUPERTYPE OF(ONEOF(IfcRelAssigns, IfcRelAssociates, IfcRelConnects, IfcRelDeclares, IfcRelDecomposes, IfcRelDefines))

| SUBTYPE OF IfcRoot;

END_ENTITY;

ENTITY IfcRepresentationItem

| ABSTRACT SUPERTYPE OF(IfcGeometricRepresentationItem);

| INVERSE

END_ENTITY;

ENTITY IfcRoot

| ABSTRACT SUPERTYPE OF(ONEOF(IfcObjectDefinition, IfcPropertyDefinition, IfcRelationship));

GlobalId | : | IfcGloballyUniqueId;
OwnerHistory | : | OPTIONAL IfcOwnerHistory;
Name | : | OPTIONAL IfcLabel;
Description | : | OPTIONAL IfcText;

| UNIQUE

UR1 | : | GlobalId;

END_ENTITY;

ENTITY IfcSIUnit

| SUBTYPE OF IfcNamedUnit;

Prefix | : | OPTIONAL IfcSIPrefix;
Name | : | IfcSIUnitName;

| DERIVE

SELF\IfcNamedUnit.Dimensions | : | IfcDimensionalExponents := IfcDimensionsForSiUnit (SELF.Name);

END_ENTITY;

ENTITY IfcSchedulingTime

| ABSTRACT SUPERTYPE OF(ONEOF(IfcEventTime, IfcTaskTime));

Name | : | OPTIONAL IfcLabel;
DataOrigin | : | OPTIONAL IfcDataOriginEnum;
UserDefinedDataOrigin | : | OPTIONAL IfcLabel;

END_ENTITY;

ENTITY IfcSensor

| SUBTYPE OF IfcDistributionControlElement;

PredefinedType | : | OPTIONAL IfcSensorTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcSensorTypeEnum.USERDEFINED) OR ((PredefinedType = IfcSensorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCBUILDINGCONTROLSDOMAIN.IFCSENSORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcSensorType

| SUBTYPE OF IfcDistributionControlElementType;

PredefinedType | : | IfcSensorTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcSensorTypeEnum.USERDEFINED) OR ((PredefinedType = IfcSensorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcSimpleProperty

| ABSTRACT SUPERTYPE OF(ONEOF(IfcPropertyBoundedValue, IfcPropertyEnumeratedValue, IfcPropertyListValue, IfcPropertyReferenceValue, IfcPropertySingleValue, IfcPropertyTableValue))

| SUBTYPE OF IfcProperty;

END_ENTITY;

ENTITY IfcSimplePropertyTemplate

| SUBTYPE OF IfcPropertyTemplate;

TemplateType | : | OPTIONAL IfcSimplePropertyTemplateTypeEnum;
PrimaryMeasureType | : | OPTIONAL IfcLabel;
SecondaryMeasureType | : | OPTIONAL IfcLabel;
Enumerators | : | OPTIONAL IfcPropertyEnumeration;
PrimaryUnit | : | OPTIONAL IfcUnit;
SecondaryUnit | : | OPTIONAL IfcUnit;
Expression | : | OPTIONAL IfcLabel;
AccessState | : | OPTIONAL IfcStateEnum;

END_ENTITY;

ENTITY IfcSite

| SUBTYPE OF IfcSpatialStructureElement;

RefLatitude | : | OPTIONAL IfcStrippedOptional;
RefLongitude | : | OPTIONAL IfcStrippedOptional;
RefElevation | : | OPTIONAL IfcLengthMeasure;
LandTitleNumber | : | OPTIONAL IfcLabel;
SiteAddress | : | OPTIONAL IfcStrippedOptional;

END_ENTITY;

ENTITY IfcSpace

| SUBTYPE OF IfcSpatialStructureElement;

PredefinedType | : | OPTIONAL IfcStrippedOptional;
ElevationWithFlooring | : | OPTIONAL IfcLengthMeasure;

| INVERSE

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcSpaceTypeEnum.USERDEFINED) OR ((PredefinedType = IfcSpaceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCPRODUCTEXTENSION.IFCSPACETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcSpatialElement

| ABSTRACT SUPERTYPE OF(IfcSpatialStructureElement)

| SUBTYPE OF IfcProduct;

LongName | : | OPTIONAL IfcLabel;

| INVERSE

ContainsElements | : | SET OF IfcRelContainedInSpatialStructure FOR RelatingStructure;

END_ENTITY;

ENTITY IfcSpatialStructureElement

| ABSTRACT SUPERTYPE OF(ONEOF(IfcBuilding, IfcBuildingStorey, IfcSite, IfcSpace))

| SUBTYPE OF IfcSpatialElement;

CompositionType | : | OPTIONAL IfcStrippedOptional;

| WHERE

WR41 | : | (HIINDEX(SELF\IfcObjectDefinition.Decomposes) = 1) AND ('IFCKERNEL.IFCRELAGGREGATES' IN TYPEOF(SELF\IfcObjectDefinition.Decomposes[1])) AND (('IFCKERNEL.IFCPROJECT' IN TYPEOF (SELF\IfcObjectDefinition.Decomposes[1].RelatingObject)) OR ('IFCPRODUCTEXTENSION.IFCSPATIALSTRUCTUREELEMENT' IN TYPEOF (SELF\IfcObjectDefinition.Decomposes[1].RelatingObject)) );

END_ENTITY;

ENTITY IfcSwitchingDevice

| SUBTYPE OF IfcFlowController;

PredefinedType | : | OPTIONAL IfcSwitchingDeviceTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcSwitchingDeviceTypeEnum.USERDEFINED) OR ((PredefinedType = IfcSwitchingDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCELECTRICALDOMAIN.IFCSWITCHINGDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcSwitchingDeviceType

| SUBTYPE OF IfcFlowControllerType;

PredefinedType | : | IfcSwitchingDeviceTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcSwitchingDeviceTypeEnum.USERDEFINED) OR ((PredefinedType = IfcSwitchingDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcSystem

| SUPERTYPE OF(ONEOF(IfcDistributionSystem, IfcZone))

| SUBTYPE OF IfcGroup;

| INVERSE

END_ENTITY;

ENTITY IfcTable;

Name | : | OPTIONAL IfcLabel;
Rows | : | OPTIONAL LIST [1:?] OF IfcStrippedOptional;
Columns | : | OPTIONAL LIST [1:?] OF IfcTableColumn;

| DERIVE

NumberOfCellsInRow | : | INTEGER := HIINDEX(Rows[1].RowCells);
NumberOfHeadings | : | INTEGER := SIZEOF(QUERY( Temp <* Rows | Temp.IsHeading));
NumberOfDataRows | : | INTEGER := SIZEOF(QUERY( Temp <* Rows | NOT(Temp.IsHeading)));

| WHERE

WR1 | : | SIZEOF(QUERY( Temp <* Rows | HIINDEX(Temp.RowCells) <> HIINDEX(Rows[1].RowCells))) = 0;
WR2 | : | { 0 <= NumberOfHeadings <= 1 };

END_ENTITY;

ENTITY IfcTableColumn;

Identifier | : | OPTIONAL IfcIdentifier;
Name | : | OPTIONAL IfcLabel;
Description | : | OPTIONAL IfcText;
Unit | : | OPTIONAL IfcUnit;
ReferencePath | : | OPTIONAL IfcReference;

END_ENTITY;

ENTITY IfcTask

| SUBTYPE OF IfcProcess;

Status | : | OPTIONAL IfcLabel;
WorkMethod | : | OPTIONAL IfcLabel;
IsMilestone | : | BOOLEAN;
Priority | : | OPTIONAL INTEGER;
TaskTime | : | OPTIONAL IfcTaskTime;
PredefinedType | : | OPTIONAL IfcTaskTypeEnum;

| WHERE

HasName | : | EXISTS(SELF\IfcRoot.Name);
CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcTaskTypeEnum.USERDEFINED) OR ((PredefinedType = IfcTaskTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType));

END_ENTITY;

ENTITY IfcTaskTime

| SUPERTYPE OF(IfcTaskTimeRecurring)

| SUBTYPE OF IfcSchedulingTime;

DurationType | : | OPTIONAL IfcStrippedOptional;
ScheduleDuration | : | OPTIONAL IfcDuration;
ScheduleStart | : | OPTIONAL IfcDateTime;
ScheduleFinish | : | OPTIONAL IfcDateTime;
EarlyStart | : | OPTIONAL IfcDateTime;
EarlyFinish | : | OPTIONAL IfcDateTime;
LateStart | : | OPTIONAL IfcDateTime;
LateFinish | : | OPTIONAL IfcDateTime;
FreeFloat | : | OPTIONAL IfcDuration;
TotalFloat | : | OPTIONAL IfcDuration;
IsCritical | : | OPTIONAL BOOLEAN;
StatusTime | : | OPTIONAL IfcDateTime;
ActualDuration | : | OPTIONAL IfcDuration;
ActualStart | : | OPTIONAL IfcDateTime;
ActualFinish | : | OPTIONAL IfcDateTime;
RemainingTime | : | OPTIONAL IfcDuration;
Completion | : | OPTIONAL IfcPositiveRatioMeasure;

END_ENTITY;

ENTITY IfcTaskTimeRecurring

| SUBTYPE OF IfcTaskTime;

Recurrance | : | IfcRecurrencePattern;

END_ENTITY;

ENTITY IfcTaskType

| SUBTYPE OF IfcTypeProcess;

PredefinedType | : | IfcTaskTypeEnum;
WorkMethod | : | OPTIONAL IfcLabel;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcTaskTypeEnum.USERDEFINED) OR ((PredefinedType = IfcTaskTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeProcess.ProcessType)) ;

END_ENTITY;

ENTITY IfcTimePeriod;

StartTime | : | IfcTime;
EndTime | : | IfcTime;

END_ENTITY;

ENTITY IfcTimeSeries

| ABSTRACT SUPERTYPE OF(IfcIrregularTimeSeries);

Name | : | IfcLabel;
Description | : | OPTIONAL IfcText;
StartTime | : | IfcDateTime;
EndTime | : | IfcDateTime;
TimeSeriesDataType | : | IfcTimeSeriesDataTypeEnum;
DataOrigin | : | IfcDataOriginEnum;
UserDefinedDataOrigin | : | OPTIONAL IfcLabel;
Unit | : | OPTIONAL IfcUnit;

| INVERSE

END_ENTITY;

ENTITY IfcTransportElement

| SUBTYPE OF IfcElement;

PredefinedType | : | OPTIONAL IfcTransportElementTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcTransportElementTypeEnum.USERDEFINED) OR ((PredefinedType = IfcTransportElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCPRODUCTEXTENSION.IFCTRANSPORTELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcTransportElementType

| SUBTYPE OF IfcElementType;

PredefinedType | : | IfcTransportElementTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcTransportElementTypeEnum.USERDEFINED) OR ((PredefinedType = IfcTransportElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcTypeObject

| SUPERTYPE OF(ONEOF(IfcTypeProcess, IfcTypeProduct))

| SUBTYPE OF IfcObjectDefinition;

ApplicableOccurrence | : | OPTIONAL IfcIdentifier;
HasPropertySets | : | OPTIONAL SET [1:?] OF IfcPropertySetDefinition;

| INVERSE

Types | : | SET [0:1] OF IfcRelDefinesByType FOR RelatingType;

| WHERE

WR1 | : | EXISTS(SELF\IfcRoot.Name);

END_ENTITY;

ENTITY IfcTypeProcess

| ABSTRACT SUPERTYPE OF(ONEOF(IfcEventType, IfcProcedureType, IfcTaskType))

| SUBTYPE OF IfcTypeObject;

Identification | : | OPTIONAL IfcIdentifier;
LongDescription | : | OPTIONAL IfcText;
ProcessType | : | OPTIONAL IfcLabel;

| INVERSE

END_ENTITY;

ENTITY IfcTypeProduct

| SUPERTYPE OF(IfcElementType)

| SUBTYPE OF IfcTypeObject;

RepresentationMaps | : | OPTIONAL LIST [1:?] OF UNIQUE IfcStrippedOptional;
Tag | : | OPTIONAL IfcLabel;

| INVERSE

ReferencedBy | : | SET OF IfcRelAssignsToProduct FOR RelatingProduct;

| WHERE

ApplicableOccurrence | : | NOT(EXISTS(SELF\IfcTypeObject.Types[1])) OR (SIZEOF(QUERY(temp <* SELF\IfcTypeObject.Types[1].RelatedObjects | NOT('IFCKERNEL.IFCPRODUCT' IN TYPEOF(temp))) ) = 0);

END_ENTITY;

ENTITY IfcUnitAssignment;

Units | : | SET [1:?] OF IfcUnit;

| WHERE

WR01 | : | IfcCorrectUnitAssignment(Units);

END_ENTITY;

ENTITY IfcUnitaryControlElement

| SUBTYPE OF IfcDistributionControlElement;

PredefinedType | : | OPTIONAL IfcUnitaryControlElementTypeEnum;

| WHERE

CorrectPredefinedType | : | NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcUnitaryControlElementTypeEnum.USERDEFINED) OR ((PredefinedType = IfcUnitaryControlElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType));
CorrectTypeAssigned | : | (SIZEOF(IsTypedBy) = 0) OR ('IFCBUILDINGCONTROLSDOMAIN.IFCUNITARYCONTROLELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

END_ENTITY;

ENTITY IfcUnitaryControlElementType

| SUBTYPE OF IfcDistributionControlElementType;

PredefinedType | : | IfcUnitaryControlElementTypeEnum;

| WHERE

CorrectPredefinedType | : | (PredefinedType <> IfcUnitaryControlElementTypeEnum.USERDEFINED) OR ((PredefinedType = IfcUnitaryControlElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType));

END_ENTITY;

ENTITY IfcZone

| SUBTYPE OF IfcSystem;

LongName | : | OPTIONAL IfcLabel;

| WHERE

WR1 | : | (SIZEOF(SELF\IfcGroup.IsGroupedBy) = 0) OR (SIZEOF (QUERY (temp <* SELF\IfcGroup.IsGroupedBy[1].RelatedObjects | NOT(('IFCPRODUCTEXTENSION.IFCZONE' IN TYPEOF(temp)) OR ('IFCPRODUCTEXTENSION.IFCSPACE' IN TYPEOF(temp)) OR ('IFCPRODUCTEXTENSION.IFCSPATIALZONE' IN TYPEOF(temp)) ))) = 0);

END_ENTITY;

RULE IfcSingleProjectInstance FOR ( IfcProject );
WHERE
WR1 : SIZEOF(IfcProject) <= 1
END_RULE;

END_SCHEMA;