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

Add URI prefix to individual identifiers when cross referencing them #20

Closed DiellzaElshani closed 2 years ago

DiellzaElshani commented 2 years ago

Description:

When adding a new property which is also idividual to an indivusual (e.g. Room has location Point), we need to use the URI of the individuals to create triples, (not only the ID- basically the RDF identifier which is a URI).

Our current code looks like:


#################################################################
#    Individuals
#################################################################

### www.uni-stuttgart.de/9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0
<www.uni-stuttgart.de/9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0> rdf:type owl:NamedIndividual ,
        :BH.oM.Architecture.Elements.Room ;
        :BH.oM.Architecture.Elements.Room.Perimeter 38028790 ;
        :BH.oM.Architecture.Elements.Room.Location 206839 ;
        :BH.oM.Base.BHoMObject.BHoM_Guid "9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0"^^xsd:string;
        :BH.oM.Base.BHoMObject.Name "myRoom"^^xsd:string;

Expected behaviour:

It should look like:


#################################################################
#    Individuals
#################################################################

### www.uni-stuttgart.de/9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0
<www.uni-stuttgart.de/9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0> rdf:type owl:NamedIndividual ,
        :BH.oM.Architecture.Elements.Room ;
        :BH.oM.Architecture.Elements.Room.Perimeter <www.uni-stuttgart.de/38028790> ;
        :BH.oM.Architecture.Elements.Room.Location <www.uni-stuttgart.de/206839>;
        :BH.oM.Base.BHoMObject.BHoM_Guid "9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0"^^xsd:string;
        :BH.oM.Base.BHoMObject.Name "myRoom"^^xsd:string;

Test file(s):

DiellzaElshani commented 2 years ago

We can of course still introduce a prefix, but that would avoid the need for an URI. A triple consists of a Subject Predicate Object . In essence, when the object refers to a new individual, we need a URI to identify it.

If we define a new prefix at the beginning, like: @prefix example: <www.uni-stuttgart.de/> . we can use something like this: example:9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0 bhom:BH.oM.Architecture.Elements.Room.Perimeter example:38028790.

However, currently we follow a similar convection with the following, so I'd suggest to conitnute with it: <www.uni-stuttgart.de/9fe1f23b-26e9-46b9-b7de-552e3e3e8bd0> bhom:BH.oM.Architecture.Elements.Room.Perimeter <www.uni-stuttgart.de/38028790>