Add Brick → bSDD dictionary export - #797
Open
gtfierro wants to merge 5 commits into
Open
Conversation
Generates the buildingSMART Data Dictionary import file from the built ontology. bSDD only accepts a dictionary as a single JSON document, so the whole thing is derived on every run rather than hand-edited. - tools/bsdd/generate_bsdd.py: reads Brick+imports.ttl (not Brick.ttl, which has no live location classes) and emits bsdd/brick-bsdd.json plus a report of everything dropped, merged or left incomplete - tools/bsdd/fetch_ifc_dictionary.py and mappings/: IFC entity and unit correspondences, refreshable from the bSDD API - make bsdd target, kept out of the default build since it is only needed when publishing - tests/test_bsdd_export.py: validates the generated dictionary
bSDD's UseOwnUri requires every owned URI to begin with the dictionary's own DictionaryUri, so the imported REC location classes could only be published under brickschema.org identifiers with their w3id.org/rec IRIs demoted to a HasReference relation. That is republishing another vocabulary's content under Brick's name, which the bSDD guidelines warn against, and it is RealEstateCore's to publish rather than Brick's. The dictionary is now 1,274 classes, all in the Brick namespace, and carries no buildings, levels, rooms, spaces or zones. The seven Brick classes that subclass rec:Collection -- System, Loop, PV_Array, Point_Collection, Automation_Collection and the two EV charging hubs -- are still exported, but as roots with no ParentClassCode; the report lists them in a new section. Drops the six ifc.csv rows that mapped location terms. test_only_brick_terms_are_published keeps foreign URIs and relations out.
|
The latest build of the Brick ontology on this PR is available here. |
|
The latest build of the Brick ontology on this PR is available here. |
Member
Author
|
Here is the current JSON export |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an offline export of Brick as a buildingSMART Data Dictionary import document.
The exporter reads the built
Brick+imports.ttland writes one generated JSONdictionary. The output is never hand-edited.
The default Brick build is unchanged;
make bsddremains a separate target andthe generated
bsdd/directory is ignored.Mapping scope
built graph. bSDD permits one
ParentClassCode; the most-specific Brickparent is used in the tree and additional parents are emitted as
IsChildOfrelations.
derived from QUDT and translated through the checked-in bSDD unit map. Brick
quantities that explicitly reference a QUDT quantity kind use that quantity
kind as their canonical property.
entityProperty<Code>Properties, keeping themdistinct from physical quantity kinds. For example,
brick:volumemaps toentityPropertyVolume, while the physical quantity isVolume.ComplexProperties whose scalarchildren use
parent.fieldcodes, such asentityPropertyCoordinates.latitude.brick:hasQuantity,brick:hasSubstance, and EntityProperty SHACL attachments.tools/bsdd/mappings/ifc.csv. Each rowmaps one exact Brick class code to
RelatedIfcEntityNamesList; mappings donot inherit through the class hierarchy.
Deliberate boundaries
including RealEstateCore location classes, are not republished under Brick
URIs.
mappings/units.csvandifc.csvarechecked-in, reviewed inputs.
feeds,hasPoint, orcontrols, because they do not have an equivalent bSDD classrelation.
they are not bSDD materials.
The dictionary is emitted with
Status: Preview. Publishing and activation aredeliberate manual steps outside this PR.