(*
Copyright by:
buildingSMART Alliance, 2013

Any technical documentation made available by buildingSMART Alliance
is the copyrighted work of buildingSMART Alliance and is owned by the 
buildingSMART Alliance. It may be photocopied, used in software development, 
or translated into another computer language without prior written consent from 
buildingSMART Alliance provided that full attribution is given. 
Prior written consent is required if changes are made to the technical specification.

This material is delivered to you as is and buildingSMART Alliance makes 
no warranty of any kind with regard to it, including, but not limited to, the implied 
warranties as to its accuracy or fitness for a particular purpose. Any use of the 
technical documentation or the information contained therein is at the risk of the user. 
Documentation may include technical or other inaccuracies or typographical errors. 
buildingSMART Alliance shall not be liable for errors contained therein or 
for incidental consequential damages in connection with the furnishing, performance or use 
of the material. The information contained in this document is subject to change without notice.

Issue date:
Monday, November 4, 2013

*)

SCHEMA COBie;

TYPE IfcStrippedOptional = BOOLEAN;
END_TYPE;

TYPE IfcAreaMeasure = REAL;
END_TYPE;

TYPE IfcDate = STRING;
END_TYPE;

TYPE IfcDateTime = STRING;
END_TYPE;

TYPE IfcDayInMonthNumber = INTEGER;
END_TYPE;

TYPE IfcDayInWeekNumber = INTEGER;
END_TYPE;

TYPE IfcDuration = STRING;
END_TYPE;

TYPE IfcGloballyUniqueId = STRING(22) FIXED;
END_TYPE;

TYPE IfcIdentifier = STRING(255);
END_TYPE;

TYPE IfcInteger = INTEGER;
END_TYPE;

TYPE IfcLabel = STRING(255);
END_TYPE;

TYPE IfcLengthMeasure = REAL;
END_TYPE;

TYPE IfcMonetaryMeasure = REAL;
END_TYPE;

TYPE IfcMonthInYearNumber = INTEGER;
END_TYPE;

TYPE IfcPositiveLengthMeasure = IfcLengthMeasure;
END_TYPE;

TYPE IfcReal = REAL;
END_TYPE;

TYPE IfcText = STRING;
END_TYPE;

TYPE IfcTime = STRING;
END_TYPE;

TYPE IfcTimeStamp = INTEGER;
END_TYPE;

TYPE IfcBenchmarkEnum = ENUMERATION OF
	(GREATERTHAN
	,GREATERTHANOREQUALTO
	,LESSTHAN
	,LESSTHANOREQUALTO
	,EQUALTO
	,NOTEQUALTO
	,INCLUDES
	,NOTINCLUDES
	,INCLUDEDIN
	,NOTINCLUDEDIN);
END_TYPE;

TYPE IfcChangeActionEnum = ENUMERATION OF
	(NOCHANGE
	,MODIFIED
	,ADDED
	,DELETED
	,NOTDEFINED);
END_TYPE;

TYPE IfcConstraintEnum = ENUMERATION OF
	(HARD
	,SOFT
	,ADVISORY
	,USERDEFINED
	,NOTDEFINED);
END_TYPE;

TYPE IfcConstructionProductResourceTypeEnum = ENUMERATION OF
	(ASSEMBLY
	,FORMWORK
	,USERDEFINED
	,NOTDEFINED);
END_TYPE;

TYPE IfcObjectiveEnum = ENUMERATION OF
	(CODECOMPLIANCE
	,CODEWAIVER
	,DESIGNINTENT
	,EXTERNAL
	,HEALTHANDSAFETY
	,MERGECONFLICT
	,MODELVIEW
	,PARAMETER
	,REQUIREMENT
	,SPECIFICATION
	,TRIGGERCONDITION
	,USERDEFINED
	,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 IfcStateEnum = ENUMERATION OF
	(READWRITE
	,READONLY
	,LOCKED
	,READWRITELOCKED
	,READONLYLOCKED);
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 IfcActorSelect = SELECT
	(IfcOrganization
	,IfcPerson
	,IfcPersonAndOrganization);
END_TYPE;

TYPE IfcClassificationReferenceSelect = SELECT
	(IfcClassification
	,IfcClassificationReference);
END_TYPE;

TYPE IfcClassificationSelect = SELECT
	(IfcClassification
	,IfcClassificationReference);
END_TYPE;

TYPE IfcDefinitionSelect = SELECT
	(IfcObjectDefinition
	,IfcPropertyDefinition);
END_TYPE;

TYPE IfcDocumentSelect = SELECT
);
END_TYPE;

TYPE IfcMetricValueSelect = SELECT
	(IfcMeasureWithUnit
	,IfcReference
	,IfcTable
	,IfcValue);
END_TYPE;

TYPE IfcPropertySetDefinitionSelect = SELECT
	(IfcPropertySetDefinition);
END_TYPE;

TYPE IfcUnit = SELECT
	(IfcNamedUnit);
END_TYPE;

TYPE IfcValue = SELECT
);
END_TYPE;

ENTITY IfcActionRequest
 SUBTYPE OF (IfcControl);
	PredefinedType : OPTIONAL IfcStrippedOptional;
	Status : OPTIONAL IfcStrippedOptional;
	LongDescription : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcActor
 SUBTYPE OF (IfcObject);
	TheActor : IfcActorSelect;
END_ENTITY;

ENTITY IfcAddress
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcPostalAddress
    ,IfcTelecomAddress));
	Purpose : OPTIONAL IfcStrippedOptional;
	Description : OPTIONAL IfcStrippedOptional;
	UserDefinedPurpose : OPTIONAL IfcStrippedOptional;
 INVERSE
	OfPerson : SET [0:?] OF IfcPerson FOR Addresses;
	OfOrganization : SET [0:?] OF IfcOrganization FOR Addresses;
END_ENTITY;

ENTITY IfcAnnotation
 SUBTYPE OF (IfcProduct);
 INVERSE
	ContainedInStructure : SET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements;
END_ENTITY;

ENTITY IfcApplication;
	ApplicationDeveloper : IfcOrganization;
	Version : IfcLabel;
	ApplicationFullName : IfcLabel;
	ApplicationIdentifier : IfcIdentifier;
END_ENTITY;

ENTITY IfcBuilding
 SUBTYPE OF (IfcSpatialStructureElement);
	ElevationOfRefHeight : OPTIONAL IfcStrippedOptional;
	ElevationOfTerrain : OPTIONAL IfcStrippedOptional;
	BuildingAddress : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcBuildingStorey
 SUBTYPE OF (IfcSpatialStructureElement);
	Elevation : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcClassification
 SUBTYPE OF (IfcExternalInformation);
	Source : OPTIONAL IfcLabel;
	Edition : OPTIONAL IfcStrippedOptional;
	EditionDate : OPTIONAL IfcStrippedOptional;
	Name : IfcLabel;
	Description : OPTIONAL IfcStrippedOptional;
	Location : OPTIONAL IfcStrippedOptional;
	ReferenceTokens : OPTIONAL LIST [1:?] OF IfcIdentifier;
 INVERSE
	ClassificationForObjects : SET [0:?] OF IfcRelAssociatesClassification FOR RelatingClassification;
	HasReferences : SET [0:?] OF IfcClassificationReference FOR ReferencedSource;
END_ENTITY;

ENTITY IfcClassificationReference
 SUBTYPE OF (IfcExternalReference);
	ReferencedSource : OPTIONAL IfcClassificationReferenceSelect;
	Description : OPTIONAL IfcStrippedOptional;
	Sort : OPTIONAL IfcStrippedOptional;
 INVERSE
	ClassificationRefForObjects : SET [0:?] OF IfcRelAssociatesClassification FOR RelatingClassification;
	HasReferences : SET [0:?] OF IfcClassificationReference FOR ReferencedSource;
END_ENTITY;

ENTITY IfcConstraint
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcMetric
    ,IfcObjective));
	Name : IfcLabel;
	Description : OPTIONAL IfcStrippedOptional;
	ConstraintGrade : IfcConstraintEnum;
	ConstraintSource : OPTIONAL IfcStrippedOptional;
	CreatingActor : OPTIONAL IfcStrippedOptional;
	CreationTime : OPTIONAL IfcStrippedOptional;
	UserDefinedGrade : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcConstructionProductResource
 SUBTYPE OF (IfcConstructionResource);
	PredefinedType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcConstructionProductResourceType
 SUBTYPE OF (IfcConstructionResourceType);
	PredefinedType : IfcConstructionProductResourceTypeEnum;
END_ENTITY;

ENTITY IfcConstructionResource
 ABSTRACT SUPERTYPE OF (IfcConstructionProductResource)
 SUBTYPE OF (IfcResource);
	Usage : OPTIONAL IfcStrippedOptional;
	BaseCosts : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	BaseQuantity : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcConstructionResourceType
 ABSTRACT SUPERTYPE OF (IfcConstructionProductResourceType)
 SUBTYPE OF (IfcTypeResource);
	BaseCosts : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	BaseQuantity : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcContext
 ABSTRACT SUPERTYPE OF (IfcProject)
 SUBTYPE OF (IfcObjectDefinition);
	ObjectType : OPTIONAL IfcStrippedOptional;
	LongName : OPTIONAL IfcStrippedOptional;
	Phase : OPTIONAL IfcStrippedOptional;
	RepresentationContexts : OPTIONAL SET [1:?] OF IfcStrippedOptional;
	UnitsInContext : OPTIONAL IfcUnitAssignment;
 INVERSE
	IsDefinedBy : SET [0:?] OF IfcRelDefinesByProperties FOR RelatedObjects;
	Declares : SET [0:?] OF IfcRelDeclares FOR RelatingContext;
END_ENTITY;

ENTITY IfcContextDependentUnit
 SUBTYPE OF (IfcNamedUnit);
	Name : IfcLabel;
END_ENTITY;

ENTITY IfcControl
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcActionRequest
    ,IfcWorkControl))
 SUBTYPE OF (IfcObject);
	Identification : OPTIONAL IfcStrippedOptional;
 INVERSE
	Controls : SET [0:?] OF IfcRelAssignsToControl FOR RelatingControl;
END_ENTITY;

ENTITY IfcConversionBasedUnit
 SUPERTYPE OF (IfcConversionBasedUnitWithOffset)
 SUBTYPE OF (IfcNamedUnit);
	Name : IfcLabel;
	ConversionFactor : IfcMeasureWithUnit;
END_ENTITY;

ENTITY IfcConversionBasedUnitWithOffset
 SUBTYPE OF (IfcConversionBasedUnit);
	ConversionOffset : IfcReal;
END_ENTITY;

ENTITY IfcDimensionalExponents;
	LengthExponent : IfcStrippedOptional;
	MassExponent : IfcStrippedOptional;
	TimeExponent : IfcStrippedOptional;
	ElectricCurrentExponent : IfcStrippedOptional;
	ThermodynamicTemperatureExponent : IfcStrippedOptional;
	AmountOfSubstanceExponent : IfcStrippedOptional;
	LuminousIntensityExponent : IfcStrippedOptional;
END_ENTITY;

ENTITY IfcElement
 ABSTRACT
 SUBTYPE OF (IfcProduct);
	Tag : OPTIONAL IfcStrippedOptional;
 INVERSE
	ConnectedTo : SET [0:?] OF IfcRelConnectsElements FOR RelatingElement;
	IsConnectionRealization : SET [0:?] OF IfcRelConnectsWithRealizingElements FOR RealizingElements;
	ConnectedFrom : SET [0:?] OF IfcRelConnectsElements FOR RelatedElement;
	ContainedInStructure : SET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements;
END_ENTITY;

ENTITY IfcElementQuantity
 SUBTYPE OF (IfcQuantitySet);
	MethodOfMeasurement : OPTIONAL IfcStrippedOptional;
	Quantities : SET [1:?] OF IfcPhysicalQuantity;
END_ENTITY;

ENTITY IfcElementType
 ABSTRACT
 SUBTYPE OF (IfcTypeProduct);
	ElementType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcExternalInformation
 ABSTRACT SUPERTYPE OF (IfcClassification);
END_ENTITY;

ENTITY IfcExternalReference
 ABSTRACT SUPERTYPE OF (IfcClassificationReference);
	Location : OPTIONAL IfcStrippedOptional;
	Identification : OPTIONAL IfcIdentifier;
	Name : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcGroup
 SUPERTYPE OF (IfcSystem)
 SUBTYPE OF (IfcObject);
 INVERSE
	IsGroupedBy : SET [0:?] OF IfcRelAssignsToGroup FOR RelatingGroup;
END_ENTITY;

ENTITY IfcMeasureWithUnit;
	ValueComponent : IfcValue;
	UnitComponent : IfcUnit;
END_ENTITY;

ENTITY IfcMetric
 SUBTYPE OF (IfcConstraint);
	Benchmark : IfcBenchmarkEnum;
	ValueSource : OPTIONAL IfcStrippedOptional;
	DataValue : IfcMetricValueSelect;
	ReferencePath : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcNamedUnit
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcContextDependentUnit
    ,IfcConversionBasedUnit
    ,IfcSIUnit));
	Dimensions : IfcDimensionalExponents;
	UnitType : IfcUnitEnum;
END_ENTITY;

ENTITY IfcObject
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcActor
    ,IfcControl
    ,IfcGroup
    ,IfcProcess
    ,IfcProduct
    ,IfcResource))
 SUBTYPE OF (IfcObjectDefinition);
	ObjectType : OPTIONAL IfcStrippedOptional;
 INVERSE
	IsTypedBy : SET [0:1] OF IfcRelDefinesByType FOR RelatedObjects;
	IsDefinedBy : SET [0:?] OF IfcRelDefinesByProperties FOR RelatedObjects;
END_ENTITY;

ENTITY IfcObjectDefinition
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcContext
    ,IfcObject
    ,IfcTypeObject))
 SUBTYPE OF (IfcRoot);
 INVERSE
	HasAssignments : SET [0:?] OF IfcRelAssigns FOR RelatedObjects;
	HasContext : SET [0:1] OF IfcRelDeclares FOR RelatedDefinitions;
	IsDecomposedBy : SET [0:?] OF IfcRelAggregates FOR RelatingObject;
	Decomposes : SET [0:1] OF IfcRelAggregates FOR RelatedObjects;
	HasAssociations : SET [0:?] OF IfcRelAssociates FOR RelatedObjects;
END_ENTITY;

ENTITY IfcObjective
 SUBTYPE OF (IfcConstraint);
	BenchmarkValues : OPTIONAL LIST [1:?] OF IfcConstraint;
	LogicalAggregator : OPTIONAL IfcStrippedOptional;
	ObjectiveQualifier : IfcObjectiveEnum;
	UserDefinedQualifier : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcOrganization;
	Identification : OPTIONAL IfcStrippedOptional;
	Name : IfcLabel;
	Description : OPTIONAL IfcText;
	Roles : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	Addresses : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
 INVERSE
	Engages : SET [0:?] OF IfcPersonAndOrganization FOR TheOrganization;
END_ENTITY;

ENTITY IfcOwnerHistory;
	OwningUser : IfcPersonAndOrganization;
	OwningApplication : IfcApplication;
	State : OPTIONAL IfcStateEnum;
	ChangeAction : OPTIONAL IfcChangeActionEnum;
	LastModifiedDate : OPTIONAL IfcStrippedOptional;
	LastModifyingUser : OPTIONAL IfcStrippedOptional;
	LastModifyingApplication : OPTIONAL IfcStrippedOptional;
	CreationDate : IfcTimeStamp;
END_ENTITY;

ENTITY IfcPerson;
	Identification : OPTIONAL IfcStrippedOptional;
	FamilyName : OPTIONAL IfcStrippedOptional;
	GivenName : OPTIONAL IfcStrippedOptional;
	MiddleNames : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	PrefixTitles : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	SuffixTitles : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	Roles : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	Addresses : OPTIONAL LIST [1:?] OF IfcAddress;
 INVERSE
	EngagedIn : SET [0:?] OF IfcPersonAndOrganization FOR ThePerson;
END_ENTITY;

ENTITY IfcPersonAndOrganization;
	ThePerson : IfcPerson;
	TheOrganization : IfcOrganization;
	Roles : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
END_ENTITY;

ENTITY IfcPhysicalQuantity
 ABSTRACT SUPERTYPE OF (IfcPhysicalSimpleQuantity);
	Name : IfcLabel;
	Description : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcPhysicalSimpleQuantity
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcQuantityArea
    ,IfcQuantityLength))
 SUBTYPE OF (IfcPhysicalQuantity);
	Unit : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcPort
 ABSTRACT
 SUBTYPE OF (IfcProduct);
 INVERSE
	ConnectedFrom : SET [0:1] OF IfcRelConnectsPorts FOR RelatedPort;
	ConnectedTo : SET [0:1] OF IfcRelConnectsPorts FOR RelatingPort;
END_ENTITY;

ENTITY IfcPostalAddress
 SUBTYPE OF (IfcAddress);
	InternalLocation : OPTIONAL IfcStrippedOptional;
	AddressLines : OPTIONAL LIST [1:?] OF IfcLabel;
	PostalBox : OPTIONAL IfcLabel;
	Town : OPTIONAL IfcLabel;
	Region : OPTIONAL IfcLabel;
	PostalCode : OPTIONAL IfcLabel;
	Country : OPTIONAL IfcLabel;
END_ENTITY;

ENTITY IfcProcess
 ABSTRACT SUPERTYPE OF (IfcTask)
 SUBTYPE OF (IfcObject);
	Identification : OPTIONAL IfcStrippedOptional;
	LongDescription : OPTIONAL IfcStrippedOptional;
 INVERSE
	IsPredecessorTo : SET [0:?] OF IfcRelSequence FOR RelatingProcess;
	IsSuccessorFrom : SET [0:?] OF IfcRelSequence FOR RelatedProcess;
END_ENTITY;

ENTITY IfcProduct
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcAnnotation
    ,IfcElement
    ,IfcPort
    ,IfcSpatialElement))
 SUBTYPE OF (IfcObject);
	ObjectPlacement : OPTIONAL IfcStrippedOptional;
	Representation : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcProject
 SUBTYPE OF (IfcContext);
END_ENTITY;

ENTITY IfcProperty
 ABSTRACT SUPERTYPE OF (IfcSimpleProperty)
 SUBTYPE OF (IfcPropertyAbstraction);
	Name : IfcIdentifier;
	Description : OPTIONAL IfcStrippedOptional;
 INVERSE
	PartOfPset : SET [0:?] OF IfcPropertySet FOR HasProperties;
END_ENTITY;

ENTITY IfcPropertyAbstraction
 ABSTRACT SUPERTYPE OF (IfcProperty);
END_ENTITY;

ENTITY IfcPropertyDefinition
 ABSTRACT SUPERTYPE OF (IfcPropertySetDefinition)
 SUBTYPE OF (IfcRoot);
 INVERSE
	HasContext : SET [0:1] OF IfcRelDeclares FOR RelatedDefinitions;
	HasAssociations : SET [0:?] OF IfcRelAssociates FOR RelatedObjects;
END_ENTITY;

ENTITY IfcPropertyEnumeratedValue
 SUBTYPE OF (IfcSimpleProperty);
	EnumerationValues : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	EnumerationReference : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcPropertyReferenceValue
 SUBTYPE OF (IfcSimpleProperty);
	UsageName : OPTIONAL IfcStrippedOptional;
	PropertyReference : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcPropertySet
 SUBTYPE OF (IfcPropertySetDefinition);
	HasProperties : SET [1:?] OF IfcProperty;
END_ENTITY;

ENTITY IfcPropertySetDefinition
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcPropertySet
    ,IfcQuantitySet))
 SUBTYPE OF (IfcPropertyDefinition);
 INVERSE
	DefinesType : SET [0:?] OF IfcTypeObject FOR HasPropertySets;
	DefinesOccurrence : SET [0:1] OF IfcRelDefinesByProperties FOR RelatingPropertyDefinition;
END_ENTITY;

ENTITY IfcPropertySingleValue
 SUBTYPE OF (IfcSimpleProperty);
	NominalValue : OPTIONAL IfcStrippedOptional;
	Unit : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcQuantityArea
 SUBTYPE OF (IfcPhysicalSimpleQuantity);
	AreaValue : IfcAreaMeasure;
	Formula : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcQuantityLength
 SUBTYPE OF (IfcPhysicalSimpleQuantity);
	LengthValue : IfcLengthMeasure;
	Formula : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcQuantitySet
 ABSTRACT SUPERTYPE OF (IfcElementQuantity)
 SUBTYPE OF (IfcPropertySetDefinition);
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 IfcStrippedOptional;
	AttributeIdentifier : OPTIONAL IfcStrippedOptional;
	InstanceName : OPTIONAL IfcStrippedOptional;
	ListPositions : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	InnerReference : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcRelAggregates
 SUBTYPE OF (IfcRelDecomposes);
	RelatingObject : IfcObjectDefinition;
	RelatedObjects : SET [1:?] OF IfcObjectDefinition;
END_ENTITY;

ENTITY IfcRelAssigns
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcRelAssignsToControl
    ,IfcRelAssignsToGroup))
 SUBTYPE OF (IfcRelationship);
	RelatedObjects : SET [1:?] OF IfcObjectDefinition;
	RelatedObjectsType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcRelAssignsToControl
 SUBTYPE OF (IfcRelAssigns);
	RelatingControl : IfcControl;
END_ENTITY;

ENTITY IfcRelAssignsToGroup
 SUBTYPE OF (IfcRelAssigns);
	RelatingGroup : IfcGroup;
END_ENTITY;

ENTITY IfcRelAssociates
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcRelAssociatesClassification
    ,IfcRelAssociatesConstraint
    ,IfcRelAssociatesDocument))
 SUBTYPE OF (IfcRelationship);
	RelatedObjects : SET [1:?] OF IfcDefinitionSelect;
END_ENTITY;

ENTITY IfcRelAssociatesClassification
 SUBTYPE OF (IfcRelAssociates);
	RelatingClassification : IfcClassificationSelect;
END_ENTITY;

ENTITY IfcRelAssociatesConstraint
 SUBTYPE OF (IfcRelAssociates);
	Intent : OPTIONAL IfcStrippedOptional;
	RelatingConstraint : IfcConstraint;
END_ENTITY;

ENTITY IfcRelAssociatesDocument
 SUBTYPE OF (IfcRelAssociates);
	RelatingDocument : IfcDocumentSelect;
END_ENTITY;

ENTITY IfcRelConnects
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcRelConnectsElements
    ,IfcRelConnectsPorts
    ,IfcRelContainedInSpatialStructure
    ,IfcRelSequence))
 SUBTYPE OF (IfcRelationship);
END_ENTITY;

ENTITY IfcRelConnectsElements
 SUPERTYPE OF (IfcRelConnectsWithRealizingElements)
 SUBTYPE OF (IfcRelConnects);
	ConnectionGeometry : OPTIONAL IfcStrippedOptional;
	RelatingElement : IfcElement;
	RelatedElement : IfcElement;
END_ENTITY;

ENTITY IfcRelConnectsPorts
 SUBTYPE OF (IfcRelConnects);
	RelatingPort : IfcPort;
	RelatedPort : IfcPort;
	RealizingElement : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcRelConnectsWithRealizingElements
 SUBTYPE OF (IfcRelConnectsElements);
	RealizingElements : SET [1:?] OF IfcElement;
	ConnectionType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcRelContainedInSpatialStructure
 SUBTYPE OF (IfcRelConnects);
	RelatedElements : SET [1:?] OF IfcProduct;
	RelatingStructure : IfcSpatialElement;
END_ENTITY;

ENTITY IfcRelDeclares
 SUBTYPE OF (IfcRelationship);
	RelatingContext : IfcContext;
	RelatedDefinitions : SET [1:?] OF IfcDefinitionSelect;
END_ENTITY;

ENTITY IfcRelDecomposes
 ABSTRACT SUPERTYPE OF (IfcRelAggregates)
 SUBTYPE OF (IfcRelationship);
END_ENTITY;

ENTITY IfcRelDefines
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcRelDefinesByProperties
    ,IfcRelDefinesByType))
 SUBTYPE OF (IfcRelationship);
END_ENTITY;

ENTITY IfcRelDefinesByProperties
 SUBTYPE OF (IfcRelDefines);
	RelatedObjects : SET [1:1] OF IfcObjectDefinition;
	RelatingPropertyDefinition : IfcPropertySetDefinitionSelect;
END_ENTITY;

ENTITY IfcRelDefinesByType
 SUBTYPE OF (IfcRelDefines);
	RelatedObjects : SET [1:?] OF IfcObject;
	RelatingType : IfcTypeObject;
END_ENTITY;

ENTITY IfcRelSequence
 SUBTYPE OF (IfcRelConnects);
	RelatingProcess : IfcProcess;
	RelatedProcess : IfcProcess;
	TimeLag : OPTIONAL IfcStrippedOptional;
	SequenceType : OPTIONAL IfcStrippedOptional;
	UserDefinedSequenceType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcRelationship
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcRelAssigns
    ,IfcRelAssociates
    ,IfcRelConnects
    ,IfcRelDeclares
    ,IfcRelDecomposes
    ,IfcRelDefines))
 SUBTYPE OF (IfcRoot);
END_ENTITY;

ENTITY IfcResource
 ABSTRACT SUPERTYPE OF (IfcConstructionResource)
 SUBTYPE OF (IfcObject);
	Identification : OPTIONAL IfcStrippedOptional;
	LongDescription : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcRoot
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcObjectDefinition
    ,IfcPropertyDefinition
    ,IfcRelationship));
	GlobalId : IfcGloballyUniqueId;
	OwnerHistory : OPTIONAL IfcOwnerHistory;
	Name : OPTIONAL IfcLabel;
	Description : OPTIONAL IfcText;
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 (IfcTaskTime);
	Name : OPTIONAL IfcStrippedOptional;
	DataOrigin : OPTIONAL IfcStrippedOptional;
	UserDefinedDataOrigin : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcSimpleProperty
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcPropertyEnumeratedValue
    ,IfcPropertyReferenceValue
    ,IfcPropertySingleValue))
 SUBTYPE OF (IfcProperty);
END_ENTITY;

ENTITY IfcSite
 SUBTYPE OF (IfcSpatialStructureElement);
	RefLatitude : OPTIONAL IfcStrippedOptional;
	RefLongitude : OPTIONAL IfcStrippedOptional;
	RefElevation : OPTIONAL IfcStrippedOptional;
	LandTitleNumber : OPTIONAL IfcStrippedOptional;
	SiteAddress : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcSpace
 SUBTYPE OF (IfcSpatialStructureElement);
	PredefinedType : OPTIONAL IfcStrippedOptional;
	ElevationWithFlooring : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcSpatialElement
 ABSTRACT SUPERTYPE OF (IfcSpatialStructureElement)
 SUBTYPE OF (IfcProduct);
	LongName : OPTIONAL IfcStrippedOptional;
 INVERSE
	ContainsElements : SET [0:?] OF IfcRelContainedInSpatialStructure FOR RelatingStructure;
END_ENTITY;

ENTITY IfcSpatialStructureElement
 ABSTRACT SUPERTYPE OF (ONEOF
    (IfcBuilding
    ,IfcBuildingStorey
    ,IfcSite
    ,IfcSpace))
 SUBTYPE OF (IfcSpatialElement);
	CompositionType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcSystem
 SUPERTYPE OF (IfcZone)
 SUBTYPE OF (IfcGroup);
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)));
END_ENTITY;

ENTITY IfcTableColumn;
	Identifier : OPTIONAL IfcStrippedOptional;
	Name : OPTIONAL IfcLabel;
	Description : OPTIONAL IfcText;
	Unit : OPTIONAL IfcUnit;
	ReferencePath : OPTIONAL IfcReference;
END_ENTITY;

ENTITY IfcTask
 SUBTYPE OF (IfcProcess);
	Status : OPTIONAL IfcStrippedOptional;
	WorkMethod : OPTIONAL IfcStrippedOptional;
	IsMilestone : IfcStrippedOptional;
	Priority : OPTIONAL IfcStrippedOptional;
	TaskTime : OPTIONAL IfcTaskTime;
	PredefinedType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcTaskTime
 SUPERTYPE OF (IfcTaskTimeRecurring)
 SUBTYPE OF (IfcSchedulingTime);
	DurationType : OPTIONAL IfcStrippedOptional;
	ScheduleDuration : OPTIONAL IfcDuration;
	ScheduleStart : OPTIONAL IfcDateTime;
	ScheduleFinish : OPTIONAL IfcDateTime;
	EarlyStart : OPTIONAL IfcStrippedOptional;
	EarlyFinish : OPTIONAL IfcStrippedOptional;
	LateStart : OPTIONAL IfcStrippedOptional;
	LateFinish : OPTIONAL IfcStrippedOptional;
	FreeFloat : OPTIONAL IfcStrippedOptional;
	TotalFloat : OPTIONAL IfcStrippedOptional;
	IsCritical : OPTIONAL IfcStrippedOptional;
	StatusTime : OPTIONAL IfcStrippedOptional;
	ActualDuration : OPTIONAL IfcStrippedOptional;
	ActualStart : OPTIONAL IfcStrippedOptional;
	ActualFinish : OPTIONAL IfcStrippedOptional;
	RemainingTime : OPTIONAL IfcStrippedOptional;
	Completion : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcTaskTimeRecurring
 SUBTYPE OF (IfcTaskTime);
	Recurrance : IfcRecurrencePattern;
END_ENTITY;

ENTITY IfcTelecomAddress
 SUBTYPE OF (IfcAddress);
	TelephoneNumbers : OPTIONAL LIST [1:?] OF IfcLabel;
	FacsimileNumbers : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	PagerNumber : OPTIONAL IfcStrippedOptional;
	ElectronicMailAddresses : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
	WWWHomePageURL : OPTIONAL IfcStrippedOptional;
	MessagingIDs : OPTIONAL LIST [1:?] OF IfcStrippedOptional;
END_ENTITY;

ENTITY IfcTimePeriod;
	StartTime : IfcTime;
	EndTime : IfcTime;
END_ENTITY;

ENTITY IfcTypeObject
 SUPERTYPE OF (ONEOF
    (IfcTypeProduct
    ,IfcTypeResource))
 SUBTYPE OF (IfcObjectDefinition);
	ApplicableOccurrence : OPTIONAL IfcStrippedOptional;
	HasPropertySets : OPTIONAL SET [1:?] OF IfcPropertySetDefinition;
 INVERSE
	Types : SET [0:1] OF IfcRelDefinesByType FOR RelatingType;
END_ENTITY;

ENTITY IfcTypeProduct
 SUPERTYPE OF (IfcElementType)
 SUBTYPE OF (IfcTypeObject);
	RepresentationMaps : OPTIONAL LIST [1:?] OF UNIQUE IfcStrippedOptional;
	Tag : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcTypeResource
 ABSTRACT SUPERTYPE OF (IfcConstructionResourceType)
 SUBTYPE OF (IfcTypeObject);
	Identification : OPTIONAL IfcStrippedOptional;
	LongDescription : OPTIONAL IfcStrippedOptional;
	ResourceType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcUnitAssignment;
	Units : SET [1:?] OF IfcUnit;
END_ENTITY;

ENTITY IfcWorkControl
 ABSTRACT SUPERTYPE OF (IfcWorkSchedule)
 SUBTYPE OF (IfcControl);
	CreationDate : IfcDateTime;
	Creators : OPTIONAL SET [1:?] OF IfcStrippedOptional;
	Purpose : OPTIONAL IfcStrippedOptional;
	Duration : OPTIONAL IfcStrippedOptional;
	TotalFloat : OPTIONAL IfcStrippedOptional;
	StartTime : IfcDateTime;
	FinishTime : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcWorkSchedule
 SUBTYPE OF (IfcWorkControl);
	PredefinedType : OPTIONAL IfcStrippedOptional;
END_ENTITY;

ENTITY IfcZone
 SUBTYPE OF (IfcSystem);
	LongName : OPTIONAL IfcStrippedOptional;
END_ENTITY;

RULE IfcSingleProjectInstance FOR
	(IfcProject);

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

END_SCHEMA;
