Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrkioraskari committed Sep 19, 2024
2 parents bff3812 + a9fa1f9 commit 1594ea1
Show file tree
Hide file tree
Showing 21 changed files with 808 additions and 85 deletions.
40 changes: 21 additions & 19 deletions IFCProps2ExcelOnline/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">






Expand Down Expand Up @@ -44,7 +45,8 @@


<wb-module deploy-name="IFCProps2ExcelOnline-2.44.0">






Expand Down Expand Up @@ -89,7 +91,8 @@


<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>






Expand Down Expand Up @@ -134,7 +137,8 @@


<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>






Expand Down Expand Up @@ -179,7 +183,8 @@


<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>






Expand Down Expand Up @@ -224,17 +229,10 @@


<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>

<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-resources/gwt"/>
<dependent-module archiveName="ifc-to-lbd-2.44.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/IFCtoLBD/IFCtoLBD">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ifc_to_lbd_geometry-2.44.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/IFCtoLBD_Geometry/IFCtoLBD_Geometry">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="ifc2rdf-1.4.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/IFC2RDF/IFC2RDF">
<dependency-type>uses</dependency-type>
</dependent-module>






Expand Down Expand Up @@ -279,7 +277,8 @@


<property name="java-output-path" value="/mvdXMLOnlineChecker/target/classes"/>






Expand Down Expand Up @@ -324,7 +323,8 @@


<property name="component.exclusion.patterns" value="WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**"/>






Expand Down Expand Up @@ -361,7 +361,8 @@


<property name="context-root" value="IFCProps2ExcelOnline"/>






Expand Down Expand Up @@ -406,7 +407,8 @@


</wb-module>






Expand Down
2 changes: 1 addition & 1 deletion IFCtoLBD/src/license/THIRD-PARTY.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
# Please fill the missing licenses for dependencies :
#
#
#Mon Sep 02 11:05:05 CEST 2024
#Wed Sep 18 18:43:14 CEST 2024
gnu.getopt--java-getopt--1.0.13=
4 changes: 2 additions & 2 deletions IFCtoLBD/src/main/java/examples/Example5.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void main(String[] args) {
try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) {
// Perform the initial conversion phase
converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost,
exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits);
exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,false);

// Filter only wall elements
Set<String> types = new HashSet<>();
Expand All @@ -53,7 +53,7 @@ public static void main(String[] args) {
// Perform the LBD conversion phase with specified options
Model m = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel,
hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL,
hasUnits, hasBoundingBoxWKT, true);
hasUnits, hasBoundingBoxWKT, true,false);

if (m != null) {
// Create a SPARQL query to select all elements of type bot:Element
Expand Down
55 changes: 55 additions & 0 deletions IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_maped.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package examples;

import java.io.File;
import java.net.URL;

import org.apache.jena.rdf.model.Model;
import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter;

public class IPE240Tekla_L3_maped {
static final private int props_level = 3;
static final private boolean hasBuildingElements = true;
static final private boolean hasBuildingProperties = true;

static final boolean hasSeparateBuildingElementsModel = false;
static final boolean hasPropertiesBlankNodes = false;
static final boolean hasSeparatePropertiesModel = false;

static final boolean hasGeolocation = false;

static final boolean hasGeometry = false;
static final boolean exportIfcOWL = false;
static final boolean hasUnits = false;

static final boolean hasPerformanceBoost = false;
static final boolean hasBoundingBoxWKT = true;

public static void main(String[] args) {
URL ifc_file_url = ClassLoader.getSystemResource("IPE240Tekla.ifc");
try {
File ifc_file = new File(ifc_file_url.toURI());

try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes,
props_level);) {

converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost,
exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits);
String map="""
{
"http://lbd.arch.rwth-aachen.de/props#grossWeight": "http://lbd.arch.rwth-aachen.de/props#elementWeight"
}
""";
converter.setProperty_replace_map(map);
Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel,
hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL,
hasUnits, hasBoundingBoxWKT, true);

m.write(System.out,"TTL");
}
} catch (Exception e) {
e.printStackTrace();
}

}

}
49 changes: 49 additions & 0 deletions IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_no_change.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package examples;

import java.io.File;
import java.net.URL;

import org.apache.jena.rdf.model.Model;
import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter;

public class IPE240Tekla_L3_no_change {
static final private int props_level = 3;
static final private boolean hasBuildingElements = true;
static final private boolean hasBuildingProperties = true;

static final boolean hasSeparateBuildingElementsModel = false;
static final boolean hasPropertiesBlankNodes = false;
static final boolean hasSeparatePropertiesModel = false;

static final boolean hasGeolocation = false;

static final boolean hasGeometry = false;
static final boolean exportIfcOWL = false;
static final boolean hasUnits = false;

static final boolean hasPerformanceBoost = false;
static final boolean hasBoundingBoxWKT = true;

public static void main(String[] args) {
URL ifc_file_url = ClassLoader.getSystemResource("IPE240Tekla.ifc");
try {
File ifc_file = new File(ifc_file_url.toURI());

try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes,
props_level);) {
converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost,
exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits);

Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel,
hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL,
hasUnits, hasBoundingBoxWKT, true);

m.write(System.out,"TTL");
}
} catch (Exception e) {
e.printStackTrace();
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package examples;

import java.io.File;
import java.net.URL;

import org.apache.jena.rdf.model.Model;
import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter;

public class IPE240_Custom_Revit_02_L3_mapped {
static final private int props_level = 3;
static final private boolean hasBuildingElements = true;
static final private boolean hasBuildingProperties = true;

static final boolean hasSeparateBuildingElementsModel = false;
static final boolean hasPropertiesBlankNodes = false;
static final boolean hasSeparatePropertiesModel = false;

static final boolean hasGeolocation = false;

static final boolean hasGeometry = false;
static final boolean exportIfcOWL = false;
static final boolean hasUnits = false;

static final boolean hasPerformanceBoost = false;
static final boolean hasBoundingBoxWKT = true;

public static void main(String[] args) {
URL ifc_file_url = ClassLoader.getSystemResource("IPE240_Custom_Revit_02.ifc");
try {
File ifc_file = new File(ifc_file_url.toURI());

try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes,
props_level);) {
converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost,
exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits);

// No mapping needed
Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel,
hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL,
hasUnits, hasBoundingBoxWKT, true);

m.write(System.out,"TTL");
}
} catch (Exception e) {
e.printStackTrace();
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package examples;

import java.io.File;
import java.net.URL;

import org.apache.jena.rdf.model.Model;
import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter;

public class IPE240_Custom_Revit_02_L3_no_change {
static final private int props_level = 3;
static final private boolean hasBuildingElements = true;
static final private boolean hasBuildingProperties = true;

static final boolean hasSeparateBuildingElementsModel = false;
static final boolean hasPropertiesBlankNodes = false;
static final boolean hasSeparatePropertiesModel = false;

static final boolean hasGeolocation = false;

static final boolean hasGeometry = false;
static final boolean exportIfcOWL = false;
static final boolean hasUnits = false;

static final boolean hasPerformanceBoost = false;
static final boolean hasBoundingBoxWKT = true;

public static void main(String[] args) {
URL ifc_file_url = ClassLoader.getSystemResource("IPE240_Custom_Revit_02.ifc");
try {
File ifc_file = new File(ifc_file_url.toURI());

try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes,
props_level);) {
converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost,
exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits);

Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel,
hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL,
hasUnits, hasBoundingBoxWKT, true);

m.write(System.out,"TTL");
}
} catch (Exception e) {
e.printStackTrace();
}

}

}
Loading

0 comments on commit 1594ea1

Please sign in to comment.