Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rdf namespace #5

Closed
s0301132 opened this issue Jul 30, 2021 · 6 comments
Closed

Missing rdf namespace #5

s0301132 opened this issue Jul 30, 2021 · 6 comments

Comments

@s0301132
Copy link

Hi @gtfierro, when I use make.py to convert, the ttl file are missing rdf namespace even I put it in template txt, the output ttl file only have brick and building namespace.

@gtfierro
Copy link
Member

The RDFlib serialization I believe will skip any namespaces that aren't used in the output. Statements like bldg:x a brick:Sensor technically use the rdf namespace (a is an alias for rdf:type), but this gets factored out during the export process. Does this match what you are seeing, or are there triples with rdf:**** in the output TTL file?

@s0301132
Copy link
Author

@gtfierro yes, the output ttl file use something like bldg:x a brick:Sensor instead of rdf:type, in my template.txt I use rdf like wkgo:$3 rdf:type brick:Main_Header_Pipe but the output still missing rdf namespace.

@gtfierro
Copy link
Member

Sounds like this is the RDFlib serialization implementation; the a token is part of the Turtle spec so this is technically valid output. Any compliant turtle file parser should be able to parse the output file correctly and recognize a as rdf:type

@s0301132
Copy link
Author

s0301132 commented Aug 2, 2021

That's OK since the builder can convert rdf:type to a, may be I need to add the rdf namespace in GraphDB.

@gtfierro
Copy link
Member

gtfierro commented Aug 3, 2021

I think adding the rdf namespace to GraphDB is a good idea. However, to be clear, a is equivalent to rdf:type (no conversion is performed), and this is done by RDFlib, not by brick-builder. Are you running into any issues with the TTL files produced by brick-builder?

@s0301132
Copy link
Author

s0301132 commented Aug 4, 2021

Thanks @gtfierro, there are no issue whille converting, knowing the rdf namespace is not a issue by brick-builder and everything is fine. Thanks!

@s0301132 s0301132 closed this as completed Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants