splitting data for same ns

6 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Feb 21, 2018, 5:14:20 AM2/21/18
to topbrai...@googlegroups.com

Does anyone know a (standard) mechanism to split a large RDF dataset in smaller files (still belonging to the same name space!)?

We have a large national road registry that we want to split into a file/module per road (#30).

Those files have overlap (like a junction valid for multiple roads so we do not want to define 30 name spaces where we would have multiple IDs for the same junction)

 

Thx for any tip/idea,

Michel

 

 

 

 

 

Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

+31888663107
+31630381220
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

 

 

 

 

David Price

unread,
Feb 21, 2018, 7:51:53 AM2/21/18
to topbrai...@googlegroups.com
Hi Michel,

The namespace for the classes & properties in a graph are not necessarily related to the base URI of the graph containing them. Use the same namespace and local name  in various graphs for the same items (i.e. use exactly the same URI for the same junction everywhere) and when you combine data later the triples will be merged automatically. Simplest thing to do is just define a prefix for the namespace of the data and use the same prefix declaration in all your files regardless of the base URI of the graph containing the data.

Although this case is about data, just follow the same principle as when defining a class or property - separate the namespace from the base URI of the containing graph and always use the same URI for the same thing everywhere.

Cheers,
David
-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bohms, H.M. (Michel)

unread,
Feb 21, 2018, 8:29:29 AM2/21/18
to topbrai...@googlegroups.com

Hi David,

 

Sounds good!

Just checking if I understood ok..

 

Suppose I have a total network of 30 roads:

I get 30 basiURIs for the data

(nwb refers to the ontology).

 

https://w3id.org/nwb-data/R1

https://w3id.org/nwb-data/R2

..

https://w3id.org/nwb-data/R30

 

one example file:

 

# baseURI: https://w3id.org/nwb-data/R14

 

@prefix nwb: <https://w3id.org/nwb/hoofdwegennet#> .

@prefix nwb-data: <https://w3id.org/nwb/hoofdwegennet#> .

 

<https://w3id.org/nwb-data/R14>

  rdf:type owl:Ontology ;

  owl:imports <https://w3id.org/list> ;

  owl:versionInfo "Created with TopBraid Composer" ;

.

nwb-data:Road14 rdf:type nwb:Road ;

nwb:hasStart nwb-data:Junction83 .

 

nwb-data:Junction83 rdf:type nwb:Junction .

 

suppose same junction reuse for road 23 I get:

 

# baseURI: https://w3id.org/nwb-data/R23

 

@prefix nwb: <https://w3id.org/nwb/hoofdwegennet#> .

@prefix nwb-data: <https://w3id.org/nwb/hoofdwegennet#> .

 

<https://w3id.org/nwb-data/R23>

  rdf:type owl:Ontology ;

  owl:imports <https://w3id.org/list> ;

  owl:versionInfo "Created with TopBraid Composer" ;

.

nwb-data:Road23 rdf:type nwb:Road ;

nwb:hasEnd nwb-data:Junction83 .

 

nwb-data:Junction83 rdf:type nwb:Junction .

 

when merge clones of junction are combined.

 

Right?

Any link with the actual file name or can this again be anything (not necc. related to baseURI).

 

Thx Michel

David Price

unread,
Feb 21, 2018, 8:42:52 AM2/21/18
to topbrai...@googlegroups.com
On 21 Feb 2018, at 13:29, Bohms, H.M. (Michel) <michel...@tno.nl> wrote:

Hi David,
 
Sounds good!
Just checking if I understood ok..
 
Suppose I have a total network of 30 roads:
I get 30 basiURIs for the data
(nwb refers to the ontology).
 
..
 
one example file:
 
 

That seems to be two prefixes for the same namespace. That’s not the best practice. Usually, the namespace of the classes and properties is different from that of the data. Something like:


makes more sense.

 
  rdf:type owl:Ontology ;
  owl:imports <https://w3id.org/list> ;
  owl:versionInfo "Created with TopBraid Composer" ;
.
nwb-data:Road14 rdf:type nwb:Road ;
nwb:hasStart nwb-data:Junction83 .
 
nwb-data:Junction83 rdf:type nwb:Junction .
 
suppose same junction reuse for road 23 I get:
 
 
 
  rdf:type owl:Ontology ;
  owl:imports <https://w3id.org/list> ;
  owl:versionInfo "Created with TopBraid Composer" ;
.
nwb-data:Road23 rdf:type nwb:Road ;
nwb:hasEnd nwb-data:Junction83 .
 
nwb-data:Junction83 rdf:type nwb:Junction .
 
when merge clones of junction are combined.
 
Right?

Correct.

Any link with the actual file name or can this again be anything (not necc. related to baseURI).

Correct.

Bohms, H.M. (Michel)

unread,
Feb 21, 2018, 8:48:05 AM2/21/18
to topbrai...@googlegroups.com

David,

All clear, thx a lot! (indeed data uri should have been dif., stupid mistake)

michel

Reply all
Reply to author
Forward
0 new messages