Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrkioraskari committed May 14, 2024
1 parent 6d3e7fc commit 4afe975
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 21 deletions.
42 changes: 31 additions & 11 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 @@ -41,7 +42,8 @@


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






Expand Down Expand Up @@ -83,7 +85,8 @@


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






Expand Down Expand Up @@ -125,7 +128,8 @@


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






Expand Down Expand Up @@ -167,7 +171,8 @@


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






Expand Down Expand Up @@ -209,7 +214,8 @@


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






Expand All @@ -220,16 +226,26 @@


<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-resources/gwt"/>

<dependent-module archiveName="ifc-to-lbd-2.43.5.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.43.5.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.3.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/IFC2RDF/IFC2RDF">

<dependency-type>uses</dependency-type>

</dependent-module>






Expand Down Expand Up @@ -271,7 +287,8 @@


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






Expand Down Expand Up @@ -313,7 +330,8 @@


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






Expand Down Expand Up @@ -347,7 +365,8 @@


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






Expand Down Expand Up @@ -389,7 +408,8 @@


</wb-module>






Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jaxrs" version="2.1"/>
<installed facet="java" version="17"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="jst.web" version="3.1"/>
</faceted-project>
2 changes: 1 addition & 1 deletion IFCtoLBD/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
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 @@ -56,5 +56,5 @@
# Please fill the missing licenses for dependencies :
#
#
#Wed Mar 13 21:16:37 CET 2024
#Tue May 14 10:32:05 CEST 2024
gnu.getopt--java-getopt--1.0.13=
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ protected void conversion(String target_file, boolean hasBuildingElements, boole
String target_trig = target_file.replaceAll(".ttl", ".trig");
if (this.uriBase.isPresent() && this.lbd_dataset != null) {
this.lbd_dataset.getDefaultModel().add(this.lbd_general_output_model);
this.lbd_dataset.addNamedModel(this.uriBase + "product", this.lbd_product_output_model);
this.lbd_dataset.addNamedModel(this.uriBase + "property", this.lbd_property_output_model);
this.lbd_dataset.addNamedModel(this.uriBase.get() + "product", this.lbd_product_output_model);
this.lbd_dataset.addNamedModel(this.uriBase.get() + "property", this.lbd_property_output_model);
}

RDFUtils.writeDataset(this.lbd_dataset, target_trig, this.eventBus);
Expand Down Expand Up @@ -404,14 +404,17 @@ private void addGeometry(Resource lbd_resource, String guid) {

Resource sp_geometry = this.lbd_general_output_model
.createResource(lbd_resource.getURI() + "_geometry");

sp_geometry.addProperty(RDF.type, GEO.Geometry);
if (bb != null && obj != null)
lbd_resource.addProperty(OMG.hasGeometry, sp_geometry);
// lbd_resource.addProperty(GEO.hasGeometry, sp_geometry);
else
System.err.println("The elemenet has no geometry: " + lbd_resource.getURI());
if (bb != null) {
if (this.hasBoundingBoxWKT) {
sp_geometry.addLiteral(GEO.asWKT, bb.toString());
Literal wktLiteral=this.lbd_general_output_model.createTypedLiteral(bb.toString(),GEO.wktLiteral);
sp_geometry.addLiteral(GEO.asWKT, wktLiteral);
} else {
Resource sp_bb = this.lbd_general_output_model
.createResource(lbd_resource.getURI() + "_geometry_bb");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.linkedbuildingdata.ifc2lbd.application_messaging.events.IFCtoLBD_SystemStatusEvent;
import org.linkedbuildingdata.ifc2lbd.core.utils.IfcOWLUtils;
import org.linkedbuildingdata.ifc2lbd.core.utils.LBD_RDF_Utils;
import org.linkedbuildingdata.ifc2lbd.namespace.GEO;
import org.linkedbuildingdata.ifc2lbd.namespace.IfcOWL;

import com.google.common.eventbus.EventBus;
Expand Down Expand Up @@ -62,6 +63,7 @@ public static void addGeolocation2BOT(Model ifcowl_model,IfcOWL ifcOWL_ns,Model

// Create a resource <urn:bot:geom:pt:guid>
Resource rr = lbd_general_output_model.createResource(uncompressed_wktLiteralID);
rr.addProperty(RDF.type, GEO.Geometry);
sio.addProperty(geo_hasGeometry, rr);

// Create a property asWKT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;

//http://linkedbuildingdata.net/ldac2019/files/LDAC2019_Joseph_ODonovan.pdf
public final class GEO extends abstract_NS{
public static final String ns = "https://www.opengis.net/ont/geosparql#";
public static final Resource Geometry =resource(ns,"Geometry");
public static final Property hasGeometry =property(ns,"hasGeometry");
public static final Property asWKT =property(ns,"asWKT");
public static final String wktLiteral =ns+"wktLiteral";
public static void addNameSpace(Model model)
{
model.setNsPrefix("geo", ns);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1184,9 +1184,9 @@ public void testSimplifiedAttributes() {
hasGeolocation, local_hasGeometry, exportIfcOWL, hasUnits, local_hasGeometry, true);

ImmutableList<Resource> subjectList1 = ImmutableList.copyOf(model_level1.listSubjects());
if (subjectList1.size() != 833) {
System.out.println("Converted subject count should not be 833. Was: " + subjectList1.size());
fail("Converted subject count should not be 833. Was: " + subjectList1.size());
if (subjectList1.size() != 842) {
System.out.println("Converted subject count should not be 842. Was: " + subjectList1.size());
fail("Converted subject count should not be 842. Was: " + subjectList1.size());
}

final Set<String> properties = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ public Point3d getMax() {
public String toString() {
return "MULTIPOINT Z((" + min.x + " " + min.y + " " + min.z + "), (" + max.x + " " + max.y + " " + max.z + "))";
}

public String toLiteral() {
return "MULTIPOINT Z((" + min.x + " " + min.y + " " + min.z + "), (" + max.x + " " + max.y + " " + max.z + "))";
}
}
2 changes: 1 addition & 1 deletion maven_demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<repositories>
<repository>
<id>github</id>
<url>https://jyrkioraskari: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@maven.pkg.github.com/jyrkioraskari/IFCtoLBD</url>
<url>https://jyrkioraskari:<AUTHENTICATIONCODE>@maven.pkg.github.com/jyrkioraskari/IFCtoLBD</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
Expand Down
41 changes: 41 additions & 0 deletions maven_demo/pom.xml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.aachen.rwth.ip.lbd</groupId>
<artifactId>maven_demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Maven example</name>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>github</id>
<url>https://jyrkioraskari:<SECURITYCODE>@maven.pkg.github.com/jyrkioraskari/IFCtoLBD</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>io.github.jyrkioraskari</groupId>
<artifactId>ifc2rdf</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>io.github.jyrkioraskari</groupId>
<artifactId>ifc-to-lbd</artifactId>
<version>2.43.5</version>
</dependency>
<dependency>
<groupId>de.rwth-aachen.lbd</groupId>
<artifactId>idc_to_lbd_geometry</artifactId>
<version>2.43.4</version>
</dependency>
</dependencies>
</project>

0 comments on commit 4afe975

Please sign in to comment.