The IFC model, the EMF model, the BIMserver.org Java classes and the BimQL Java classes are all related to each other. This page explains how they are related and simultaneously explains how BimQL was created.

IFC model and EXPRESS

The IFC (Industry Foundation Classes) data model is intended to describe building and construction industry data. IFC is the most widely used and most mature open standard for BIM models.

The IFC data model is written in EXPRESS. This is a modeling language for product data. A building still is a product. The next code snippet shows the IFC schema for the IfcDoor entity.

ENTITY IfcDoor
    SUPERTYPE OF (IfcDoorStandardCase)
    SUBTYPE OF (IfcBuildingElement);
    OverallHeight: OPTIONAL IfcPositiveLengthMeasure;
    OverallWidth : OPTIONAL IfcPositiveLengthMeasure;
END_ENTITY;

EMF model

The BIMserver.org software reads the IFC schema. This structure is placed in an EMF model. This EMF model is the core of the BIMserver.org software. It is used to generate the Java objects.

<eClassifiers xsi:type=”ecore:EClass” name=”IfcDoor” eSuperTypes=”#//IfcBuildingElement”>
    <eStructuralFeatures xsi:type=”ecore:EAttribute” name=”OverallHeight”/>
    <eStructuralFeatures xsi:type=”ecore:EAttribute” name=”OverallHeightAsString”/>
    <eStructuralFeatures xsi:type=”ecore:EAttribute” name=”OverallWidth”/>
    <eStructuralFeatures xsi:type=”ecore:EAttribute” name=”OverallWidthAsString”/>
</eClassifiers>

BIMserver.org Java classes

The BimServer.org Java classes are used to, among other things, store a BIM model to the database and manipulate objects already stored in the database. Each class contains ‘getters’ and ‘setters’, which are methods used to manipulate variables. The BimQL Java classes are based on those methods.

public class IfcDoorImpl extends IfcBuildingElementImpl implements IfcDoor {
    public double getOverallHeight() {
        return (Double) eGet(Ifc2x3Package.Literals.IFC_DOOR__OVERALL_HEIGHT, true);
    }
}

BimQL Java classes

The BimQL Java classes are based on the BIMserver.org Java classes and therefore they are also related to the EMF model and the IFC schema. The BimQL Java classes are ‘fired up’ by the architect or constructor using BimQL and address the BIMserver.org functionality.

public class GetAttributeSubIfcDoor {
    public void getAttribute() {
        …
        else if (string.equals(“OverallHeight”)) {
            resultList.add(((IfcDoor) object).getOverallHeight());
        }
    }
}