Skip to content

Commit

Permalink
Upgraded IFC4 -> IFC4_ADD2, schema name stays the same though because
Browse files Browse the repository at this point in the history
it's unchanged in the standard as well.

#689
  • Loading branch information
Ruben de Laat authored and Ruben de Laat committed Mar 2, 2018
1 parent 4aa0a96 commit a2864d1
Show file tree
Hide file tree
Showing 207 changed files with 50,215 additions and 18,645 deletions.
12,401 changes: 12,401 additions & 0 deletions BimServer/deploy/IFC4_ADD2.exp

Large diffs are not rendered by default.

10,318 changes: 5,159 additions & 5,159 deletions BimServer/generated/org/bimserver/interfaces/SConverter.java

Large diffs are not rendered by default.

372 changes: 277 additions & 95 deletions BimServer/models/models.ecore

Large diffs are not rendered by default.

10,236 changes: 10,236 additions & 0 deletions BimServer/src/org/bimserver/database/migrations/steps/IFC4_ADD2.ecore

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Step0013 extends Migration {

@Override
public void migrate(Schema schema, DatabaseSession databaseSession) {
schema.loadEcore("ifc4.ecore", getClass().getResourceAsStream("IFC4.ecore"));
schema.loadEcore("ifc4.ecore", getClass().getResourceAsStream("IFC4_ADD2.ecore"));
EClass project = schema.getEClass("store", "Project");
schema.createEAttribute(project, "schema", EcorePackage.eINSTANCE.getEString());
EClass revisionSummaryType = schema.getEClass("store", "RevisionSummaryType");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public void migrate(Schema schema, DatabaseSession databaseSession) {

@Override
public String getDescription() {
return "Initial IFC4 model";
return "Added more server settings";
}
}
17 changes: 14 additions & 3 deletions BimServer/src/org/bimserver/schemaconverter/Express2EMF.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ private void addInverseAttribute(Attribute attrib, EClass cls) {
reference.setEOpposite(eRef);
eRef.setEOpposite(reference);
} else {
LOGGER.info("Inverse mismatch");
LOGGER.info(classifier.getName() + "." + reference.getName() + " => " + cls.getName() + "." + eRef.getName());
System.out.println("Inverse mismatch");
System.out.println(classifier.getName() + "." + reference.getName() + " => " + cls.getName() + "." + eRef.getName());
}
cls.getEStructuralFeatures().add(eRef);
}
Expand All @@ -394,6 +394,9 @@ private void addAttributes() {
}

private void processAttribute(EntityDefinition ent, Attribute attrib) {
if (attrib.getName().equals("RasterCode")) {
System.out.println();
}
ExplicitAttribute expAttrib = (ExplicitAttribute) attrib;
BaseType domain = expAttrib.getDomain();
if (ent.getName().equals("IfcRelConnectsPathElements") && (attrib.getName().equals("RelatingPriorities") || attrib.getName().equals("RelatedPriorities"))) {
Expand Down Expand Up @@ -573,7 +576,7 @@ private void processAttribute(EntityDefinition ent, Attribute attrib) {
eAttribute.setEType(EcorePackage.eINSTANCE.getEByteArray());
cls.getEStructuralFeatures().add(eAttribute);
} else if (bt == null) {
// These are the new 2-dimensional arrays in IFC4, there are 10 of them
// These are the new 2-dimensional arrays in IFC4, there are 10 of them (more in add2)
addTwoDimensionalArray(ent.getName(), attrib.getName());
}
if (domain instanceof ArrayType) {
Expand Down Expand Up @@ -654,6 +657,12 @@ private void addTwoDimensionalArray(String entityName, String attribName) {
finalType = schemaPack.getEClassifier("IfcParameterValue");
} else if (entityName.equals("IfcTriangulatedFaceSet") && attribName.equals("CoordIndex")) {
finalType = EcorePackage.eINSTANCE.getELong();
} else if (entityName.equals("IfcCartesianPointList2D") && attribName.equals("CoordList")) {
finalType = schemaPack.getEClassifier("IfcCartesianPoint");
} else if (entityName.equals("IfcIndexedPolygonalFaceWithVoids") && attribName.equals("InnerCoordIndices")) {
finalType = EcorePackage.eINSTANCE.getELong();
} else if (entityName.equals("IfcTriangulatedFaceSet") && attribName.equals("Normals")) {
finalType = schemaPack.getEClassifier("IfcParameterValue");
} else if (entityName.equals("IfcTriangulatedFaceSet") && attribName.equals("NormalIndex")) {
finalType = EcorePackage.eINSTANCE.getELong();
} else {
Expand Down Expand Up @@ -813,6 +822,8 @@ private EAttribute x(DefinedType type, EClass testType) {
wrapperAttrib.setEType(schemaPack.getEClassifier("Tristate"));
} else if (type.getDomain() instanceof NumberType) {
wrapperAttrib.setEType(ePackage.getEDouble());
} else if (type.getDomain() instanceof BinaryType) {
wrapperAttrib.setEType(ePackage.getEByteArray());
} else if (type.getDomain() instanceof LogicalType) {
wrapperAttrib.setEType(schemaPack.getEClassifier("Tristate"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

import java.io.File;

public class Ifc4 {
public class Ifc4Add2 {
public static void main(String[] args) {
Express2EMF express2emf = new Express2EMF(new File("deploy/IFC4.exp"), "ifc4", "http://buildingsmart.ifc4.ecore");
express2emf.writeEMF("../BimServer/src/org/bimserver/database/migrations/steps/" + "IFC4.ecore");
Express2EMF express2emf = new Express2EMF(new File("deploy/IFC4_ADD2.exp"), "ifc4", "http://buildingsmart.ifc4.ecore");
express2emf.writeEMF("../BimServer/src/org/bimserver/database/migrations/steps/" + "IFC4_ADD2.ecore");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SCheckinRevision.class, SStoreExtendedData.class})
@XmlSeeAlso(value={SStoreExtendedData.class, SCheckinRevision.class})
public class SAction implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SObjectModified.class, SObjectRemoved.class, SObjectAdded.class})
@XmlSeeAlso(value={SObjectRemoved.class, SObjectModified.class, SObjectAdded.class})
public class SCompareItem implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SReferenceDataValue.class, SListDataValue.class, SSimpleDataValue.class})
@XmlSeeAlso(value={SSimpleDataValue.class, SReferenceDataValue.class, SListDataValue.class})
public class SDataValue implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


@XmlRootElement
@XmlSeeAlso(value={SCheckoutRelated.class, SRevisionBranched.class, SExtendedDataAddedToProject.class, SNewObjectIDMUploaded.class, SDatabaseCreated.class, SServerStarted.class, SUserRelated.class, SExtendedDataAddedToRevision.class, SProjectRelated.class, SRemoteServiceCalled.class, SSettingsSaved.class, SDownload.class, SRevisionRelated.class, SGeoTagUpdated.class})
@XmlSeeAlso(value={SRevisionRelated.class, SProjectRelated.class, SRemoteServiceCalled.class, SGeoTagUpdated.class, SUserRelated.class, SDownload.class, SDatabaseCreated.class, SNewObjectIDMUploaded.class, SServerStarted.class, SCheckoutRelated.class, SSettingsSaved.class, SExtendedDataAddedToProject.class, SRevisionBranched.class, SExtendedDataAddedToRevision.class})
public class SLogAction implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SInternalServicePluginConfiguration.class, SModelMergerPluginConfiguration.class, SDeserializerPluginConfiguration.class, SWebModulePluginConfiguration.class, SRenderEnginePluginConfiguration.class, SQueryEnginePluginConfiguration.class, SObjectIDMPluginConfiguration.class, SModelComparePluginConfiguration.class, SSerializerPluginConfiguration.class})
@XmlSeeAlso(value={SModelMergerPluginConfiguration.class, SQueryEnginePluginConfiguration.class, SModelComparePluginConfiguration.class, SDeserializerPluginConfiguration.class, SRenderEnginePluginConfiguration.class, SWebModulePluginConfiguration.class, SObjectIDMPluginConfiguration.class, SSerializerPluginConfiguration.class, SInternalServicePluginConfiguration.class})
public class SPluginConfiguration implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SLongType.class, SDoubleType.class, SBooleanType.class, SByteArrayType.class, SStringType.class})
@XmlSeeAlso(value={SByteArrayType.class, SStringType.class, SDoubleType.class, SLongType.class, SBooleanType.class})
public class SPrimitiveType extends SType implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


@XmlRootElement
@XmlSeeAlso(value={SProjectUndeleted.class, SProjectUpdated.class, SProjectDeleted.class, SNewProjectAdded.class})
@XmlSeeAlso(value={SProjectDeleted.class, SNewProjectAdded.class, SProjectUndeleted.class, SProjectUpdated.class})
public class SProjectRelated extends SLogAction implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SObjectType.class, SPrimitiveType.class, SArrayType.class})
@XmlSeeAlso(value={SObjectType.class, SArrayType.class, SPrimitiveType.class})
public class SType implements SDataBase
{
private long oid = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


@XmlRootElement
@XmlSeeAlso(value={SPrimitiveDefinition.class, SArrayDefinition.class, SObjectDefinition.class})
@XmlSeeAlso(value={SObjectDefinition.class, SPrimitiveDefinition.class, SArrayDefinition.class})
public class STypeDefinition implements SBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


@XmlRootElement
@XmlSeeAlso(value={SPasswordChanged.class, SUserDeleted.class, SUserUndeleted.class, SUserAddedToProject.class, SPasswordReset.class, SUserRemovedFromProject.class, SNewUserAdded.class, SUserChanged.class})
@XmlSeeAlso(value={SPasswordReset.class, SUserAddedToProject.class, SUserUndeleted.class, SUserChanged.class, SUserRemovedFromProject.class, SUserDeleted.class, SPasswordChanged.class, SNewUserAdded.class})
public class SUserRelated extends SLogAction implements SDataBase
{
private long oid = -1;
Expand Down
117 changes: 117 additions & 0 deletions PluginBase/generated/org/bimserver/models/ifc4/Ifc4Factory.java
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcCartesianPointList createIfcCartesianPointList();

/**
* Returns a new object of class '<em>Ifc Cartesian Point List2 D</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Cartesian Point List2 D</em>'.
* @generated
*/
IfcCartesianPointList2D createIfcCartesianPointList2D();

/**
* Returns a new object of class '<em>Ifc Cartesian Point List3 D</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -2888,6 +2897,33 @@ public interface Ifc4Factory extends EFactory {
*/
IfcIndexedColourMap createIfcIndexedColourMap();

/**
* Returns a new object of class '<em>Ifc Indexed Poly Curve</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Indexed Poly Curve</em>'.
* @generated
*/
IfcIndexedPolyCurve createIfcIndexedPolyCurve();

/**
* Returns a new object of class '<em>Ifc Indexed Polygonal Face</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Indexed Polygonal Face</em>'.
* @generated
*/
IfcIndexedPolygonalFace createIfcIndexedPolygonalFace();

/**
* Returns a new object of class '<em>Ifc Indexed Polygonal Face With Voids</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Indexed Polygonal Face With Voids</em>'.
* @generated
*/
IfcIndexedPolygonalFaceWithVoids createIfcIndexedPolygonalFaceWithVoids();

/**
* Returns a new object of class '<em>Ifc Indexed Texture Map</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -2924,6 +2960,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcInterceptorType createIfcInterceptorType();

/**
* Returns a new object of class '<em>Ifc Intersection Curve</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Intersection Curve</em>'.
* @generated
*/
IfcIntersectionCurve createIfcIntersectionCurve();

/**
* Returns a new object of class '<em>Ifc Inventory</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -3905,6 +3950,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcPolygonalBoundedHalfSpace createIfcPolygonalBoundedHalfSpace();

/**
* Returns a new object of class '<em>Ifc Polygonal Face Set</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Polygonal Face Set</em>'.
* @generated
*/
IfcPolygonalFaceSet createIfcPolygonalFaceSet();

/**
* Returns a new object of class '<em>Ifc Polyline</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -5255,6 +5309,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcSchedulingTime createIfcSchedulingTime();

/**
* Returns a new object of class '<em>Ifc Seam Curve</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Seam Curve</em>'.
* @generated
*/
IfcSeamCurve createIfcSeamCurve();

/**
* Returns a new object of class '<em>Ifc Section Properties</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -5552,6 +5615,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcSphere createIfcSphere();

/**
* Returns a new object of class '<em>Ifc Spherical Surface</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Spherical Surface</em>'.
* @generated
*/
IfcSphericalSurface createIfcSphericalSurface();

/**
* Returns a new object of class '<em>Ifc Stack Terminal</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -6002,6 +6074,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcSurface createIfcSurface();

/**
* Returns a new object of class '<em>Ifc Surface Curve</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Surface Curve</em>'.
* @generated
*/
IfcSurfaceCurve createIfcSurfaceCurve();

/**
* Returns a new object of class '<em>Ifc Surface Curve Swept Area Solid</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -6488,6 +6569,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcTopologyRepresentation createIfcTopologyRepresentation();

/**
* Returns a new object of class '<em>Ifc Toroidal Surface</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Toroidal Surface</em>'.
* @generated
*/
IfcToroidalSurface createIfcToroidalSurface();

/**
* Returns a new object of class '<em>Ifc Transformer</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -6929,6 +7019,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcZone createIfcZone();

/**
* Returns a new object of class '<em>Ifc Stripped Optional</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Stripped Optional</em>'.
* @generated
*/
IfcStrippedOptional createIfcStrippedOptional();

/**
* Returns a new object of class '<em>Ifc Absorbed Dose Measure</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -6983,6 +7082,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcAreaMeasure createIfcAreaMeasure();

/**
* Returns a new object of class '<em>Ifc Binary</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Binary</em>'.
* @generated
*/
IfcBinary createIfcBinary();

/**
* Returns a new object of class '<em>Ifc Boolean</em>'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -8018,6 +8126,15 @@ public interface Ifc4Factory extends EFactory {
*/
IfcNormalisedRatioMeasure createIfcNormalisedRatioMeasure();

/**
* Returns a new object of class '<em>Ifc Positive Integer</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Ifc Positive Integer</em>'.
* @generated
*/
IfcPositiveInteger createIfcPositiveInteger();

/**
* Returns a new object of class '<em>Ifc Positive Length Measure</em>'.
* <!-- begin-user-doc -->
Expand Down
Loading

0 comments on commit a2864d1

Please sign in to comment.