BHoM / RDF_Prototypes

Research project of the Cluster of Excellence "Integrative Computational Design and Construction for Architecture" (IntCDC) https://www.intcdc.uni-stuttgart.de/ **Project Name**: Knowledge Representation for Multi-Disciplinary Co-Design of Buildings. https://www.intcdc.uni-stuttgart.de/research/research-projects/rp-20/
GNU Lesser General Public License v3.0
9 stars 4 forks source link

RDF_Engine: Remove duplicates from "FromTTL" method #83

Closed DiellzaElshani closed 1 year ago

DiellzaElshani commented 1 year ago

Description:

When uploading the graph to a graph database and running a reasoner, (in this case GraphDB) the graph includes also inferred knowledge in the graph and returns more facts than the initial fact. For example if an individual X is rdf:type :BH.oM.Architecture.Room, and :BH.oM.Architecture.Room is rdf:SubClassOf :BH.oM.Base.Object,

GrapDB returns a graph including a triple like: x rdf:type :BH.oM.Architecture.Room, :BH.oM.Base.Object. (which means X is type of both).

When converting this back to BHoM currently it is identified as two objects, although the properties are identical. Therefore, we need to have a mechanism to remove duplicates from "FromTTL" method.

Steps to reproduce:

Expected behaviour:

This is how the result should look like, even though there are multiple parent classes: image

Test file(s):