-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/jyrkioraskari/IFCtoLBD
- Loading branch information
Showing
21 changed files
with
808 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
49
IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_no_change.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_mapped.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} | ||
|
||
} |
49 changes: 49 additions & 0 deletions
49
IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_no_change.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.