├── .github
├── FUNDING.yml
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .gitignore
├── DataFiles
├── countries.txt
├── languages.txt
├── reference-documents.csv
├── unit-mapping.csv
└── units.csv
├── Documentation
├── API version history.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── RDF.md
├── bSDD API.md
├── bSDD JSON import model.md
├── bSDD OpenAPI.yaml
├── bSDD and GraphQL.md
├── bSDD import tutorial.md
├── bSDD private content.md
├── bSDD verification procedure.md
├── bSDD-IFC documentation.md
├── bSDD-ISO_mapping.md
└── graphics
│ ├── ClassProp_instantiation.jpg
│ ├── Class_inheritance.jpg
│ ├── Content_lifecycle_workflow.jpg
│ ├── HowToGetOutputInTurtleFormat.PNG
│ ├── Screenshot_03_signupsignin.png
│ ├── bSDD management portal.png
│ ├── bSDD_data_example.png
│ ├── bSDD_data_model.png
│ ├── bSDD_logo.png
│ ├── bs-signupsignin.png
│ ├── latest_example.jpg
│ ├── swagger-authorize2.png
│ └── unused
│ ├── Screenshot_01_swagger.png
│ ├── Screenshot_02_authorize.png
│ ├── Screenshot_04_authorization_confirmed.png
│ ├── Screenshot_05_upload_1.png
│ ├── Screenshot_06_upload_2.png
│ ├── Screenshot_07_upload_result.png
│ ├── bSDD database diagram.png
│ ├── bSDD_data_example - v1.png
│ ├── bSDD_data_model - v1.png
│ ├── sketchup-plugin-1.png
│ ├── sketchup-plugin-2.png
│ ├── sketchup-plugin-3.png
│ ├── sketchup-plugin-4.png
│ ├── sketchup-plugin-5.png
│ └── swagger-authorize.png
├── LICENSE
├── Meetings
├── 2021 Content workshop
│ ├── 210519 FGR bSDD Workshop final.pdf
│ ├── CCI_bSDD experiences_20210519.pdf
│ ├── bSDD Workshop presentation Wolfgang Wilkes.pdf
│ └── readme.md
├── 2021 Hackathon
│ ├── 20210303_bSDD_overview.pdf
│ ├── 21-03-03 bSDD Standards_Compliance.pdf
│ ├── Challenge results
│ │ ├── Bernhard_Simon_Bock_20220304_bSDD_Hackathon.pdf
│ │ ├── Tim_Lemoine_20210304_bsddHackathon.zip
│ │ └── readme.md
│ ├── GraphQL bSDD.pdf
│ ├── Hackathon Date Templates Future in bSDD Wolfgang Wilkes.pdf
│ └── tutorial.md
└── README.md
├── Model
├── Exports
│ ├── ExportDomain.xsd
│ ├── copy-all-to-json.xslt
│ ├── copy-all.xslt
│ └── export-example.xslt
└── Import Model
│ ├── README.md
│ ├── bsdd-import-model.json
│ ├── examples
│ ├── bs-agri-machines-example.json
│ ├── bsdd-minimum-import-file.json
│ ├── fruit_and_vegetables
│ │ ├── bs-agri-veg-example-nl-NL.json
│ │ └── bs-agri-veg-example.json
│ └── molio
│ │ ├── cciconstruction-1.0.json
│ │ └── readme.md
│ └── spreadsheet-import
│ ├── Excel2bSDD_converter.py
│ ├── Excel2bSDD_template.xlsx
│ └── README.md
├── RDF
├── README.md
├── preview-bsdd-rdfs-0.3.ttl
└── preview-bsdd-rdfs-0.4.ttl
├── README.md
├── Source code examples
├── CSharp-Client-Console-Demo-NET8
│ └── ConsoleDemo
│ │ ├── ConsoleDemo.csproj
│ │ ├── ConsoleDemo.sln
│ │ ├── ConsoleDemo.sln.DotSettings.user
│ │ └── Program.cs
├── CSharp-Client-Console-Demo
│ ├── .gitattributes
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── bSDD.DemoClientConsole.B2C.sln
│ └── console-app
│ │ ├── ApiHelper
│ │ ├── BsddSenderBase.cs
│ │ ├── IApiSettings.cs
│ │ ├── SimpleBsddClient.cs
│ │ └── Uploader.cs
│ │ ├── App.config
│ │ ├── Contract
│ │ ├── ClassificationSearchResultContract.cs
│ │ ├── DomainSearchResultContract.cs
│ │ └── SearchResultContract.cs
│ │ ├── Helpers.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── TokenCacheHelper.cs
│ │ ├── bSDD.DemoClientConsole.B2C.csproj
│ │ └── packages.config
├── Python-Client-Console-Demo
│ ├── LICENSE
│ ├── Readme.md
│ ├── bSDDV5_Classes.py
│ └── bSDDV5_Main.py
├── Python_demo_-_ETIM_API_integration
│ └── Mapping.md
├── README.md
└── javascript
│ └── simple-example-accessing-open-bsdd-api.html
└── appveyor.yml
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12 | polar: # Replace with a single Polar username
13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14 | custom: ['https://www.buildingsmart.org/about/strategic-projects/'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 |
5 | ---
6 |
7 | **Describe the bug**
8 | A clear and concise description of what the bug is.
9 |
10 | **To Reproduce**
11 | Steps to reproduce the behavior:
12 | 1. Go to '...'
13 | 2. Click on '....'
14 | 3. Scroll down to '....'
15 | 4. See error
16 |
17 | **Expected behavior**
18 | A clear and concise description of what you expected to happen.
19 |
20 | **Screenshots**
21 | If applicable, add screenshots to help explain your problem.
22 |
23 | **Desktop (please complete the following information):**
24 | - OS: [e.g. iOS]
25 | - Browser [e.g. chrome, safari]
26 | - Version [e.g. 22]
27 |
28 | **Smartphone (please complete the following information):**
29 | - Device: [e.g. iPhone6]
30 | - OS: [e.g. iOS8.1]
31 | - Browser [e.g. stock browser, safari]
32 | - Version [e.g. 22]
33 |
34 | **Additional context**
35 | Add any other context about the problem here.
36 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 |
5 | ---
6 |
7 | **Is your feature request related to a problem? Please describe.**
8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9 |
10 | **Describe the solution you'd like**
11 | A clear and concise description of what you want to happen.
12 |
13 | **Describe alternatives you've considered**
14 | A clear and concise description of any alternative solutions or features you've considered.
15 |
16 | **Additional context**
17 | Add any other context or screenshots about the feature request here.
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/*.csproj.user
2 | **/obj
3 | **/bin
4 | **/packages
5 | **/.vs
6 | **/ignore
7 | .DS_Store
8 | *.pyc
9 | Model/Import Model/spreadsheet-import/bSDD_Excel_Example*.xlsx
10 |
--------------------------------------------------------------------------------
/DataFiles/countries.txt:
--------------------------------------------------------------------------------
1 | Name,CodeAlpha2,CodeAlpha3,CodeNumeric,CodeISO3166-2
2 | Afghanistan,AF,AFG,004,ISO 3166-2:AF
3 | Åland Islands,AX,ALA,248,ISO 3166-2:AX
4 | Albania,AL,ALB,008,ISO 3166-2:AL
5 | Algeria,DZ,DZA,012,ISO 3166-2:DZ
6 | American Samoa,AS,ASM,016,ISO 3166-2:AS
7 | Andorra,AD,AND,020,ISO 3166-2:AD
8 | Angola,AO,AGO,024,ISO 3166-2:AO
9 | Anguilla,AI,AIA,660,ISO 3166-2:AI
10 | Antarctica,AQ,ATA,010,ISO 3166-2:AQ
11 | Antigua and Barbuda,AG,ATG,028,ISO 3166-2:AG
12 | Argentina,AR,ARG,032,ISO 3166-2:AR
13 | Armenia,AM,ARM,051,ISO 3166-2:AM
14 | Aruba,AW,ABW,533,ISO 3166-2:AW
15 | Australia,AU,AUS,036,ISO 3166-2:AU
16 | Austria,AT,AUT,040,ISO 3166-2:AT
17 | Azerbaijan,AZ,AZE,031,ISO 3166-2:AZ
18 | Bahamas,BS,BHS,044,ISO 3166-2:BS
19 | Bahrain,BH,BHR,048,ISO 3166-2:BH
20 | Bangladesh,BD,BGD,050,ISO 3166-2:BD
21 | Barbados,BB,BRB,052,ISO 3166-2:BB
22 | Belarus,BY,BLR,112,ISO 3166-2:BY
23 | Belgium,BE,BEL,056,ISO 3166-2:BE
24 | Belize,BZ,BLZ,084,ISO 3166-2:BZ
25 | Benin,BJ,BEN,204,ISO 3166-2:BJ
26 | Bermuda,BM,BMU,060,ISO 3166-2:BM
27 | Bhutan,BT,BTN,064,ISO 3166-2:BT
28 | "Bolivia, Plurinational State of",BO,BOL,068,ISO 3166-2:BO
29 | Bosnia and Herzegovina,BA,BIH,070,ISO 3166-2:BA
30 | Botswana,BW,BWA,072,ISO 3166-2:BW
31 | Bouvet Island,BV,BVT,074,ISO 3166-2:BV
32 | Brazil,BR,BRA,076,ISO 3166-2:BR
33 | British Indian Ocean Territory,IO,IOT,086,ISO 3166-2:IO
34 | Brunei Darussalam,BN,BRN,096,ISO 3166-2:BN
35 | Bulgaria,BG,BGR,100,ISO 3166-2:BG
36 | Burkina Faso,BF,BFA,854,ISO 3166-2:BF
37 | Burundi,BI,BDI,108,ISO 3166-2:BI
38 | Cambodia,KH,KHM,116,ISO 3166-2:KH
39 | Cameroon,CM,CMR,120,ISO 3166-2:CM
40 | Canada,CA,CAN,124,ISO 3166-2:CA
41 | Cape Verde,CV,CPV,132,ISO 3166-2:CV
42 | Cayman Islands,KY,CYM,136,ISO 3166-2:KY
43 | Central African Republic,CF,CAF,140,ISO 3166-2:CF
44 | Chad,TD,TCD,148,ISO 3166-2:TD
45 | Chile,CL,CHL,152,ISO 3166-2:CL
46 | China,CN,CHN,156,ISO 3166-2:CN
47 | Christmas Island,CX,CXR,162,ISO 3166-2:CX
48 | Cocos (Keeling) Islands,CC,CCK,166,ISO 3166-2:CC
49 | Colombia,CO,COL,170,ISO 3166-2:CO
50 | Comoros,KM,COM,174,ISO 3166-2:KM
51 | Congo,CG,COG,178,ISO 3166-2:CG
52 | "Congo, the Democratic Republic of the",CD,COD,180,ISO 3166-2:CD
53 | Cook Islands,CK,COK,184,ISO 3166-2:CK
54 | Costa Rica,CR,CRI,188,ISO 3166-2:CR
55 | Côte d'Ivoire,CI,CIV,384,ISO 3166-2:CI
56 | Croatia,HR,HRV,191,ISO 3166-2:HR
57 | Cuba,CU,CUB,192,ISO 3166-2:CU
58 | Cyprus,CY,CYP,196,ISO 3166-2:CY
59 | Czech Republic,CZ,CZE,203,ISO 3166-2:CZ
60 | Denmark,DK,DNK,208,ISO 3166-2:DK
61 | Djibouti,DJ,DJI,262,ISO 3166-2:DJ
62 | Dominica,DM,DMA,212,ISO 3166-2:DM
63 | Dominican Republic,DO,DOM,214,ISO 3166-2:DO
64 | Ecuador,EC,ECU,218,ISO 3166-2:EC
65 | Egypt,EG,EGY,818,ISO 3166-2:EG
66 | El Salvador,SV,SLV,222,ISO 3166-2:SV
67 | Equatorial Guinea,GQ,GNQ,226,ISO 3166-2:GQ
68 | Eritrea,ER,ERI,232,ISO 3166-2:ER
69 | Estonia,EE,EST,233,ISO 3166-2:EE
70 | Ethiopia,ET,ETH,231,ISO 3166-2:ET
71 | European Union,EU,EUR,0,ISO 3166-2:EU
72 | Falkland Islands (Malvinas),FK,FLK,238,ISO 3166-2:FK
73 | Faroe Islands,FO,FRO,234,ISO 3166-2:FO
74 | Fiji,FJ,FJI,242,ISO 3166-2:FJ
75 | Finland,FI,FIN,246,ISO 3166-2:FI
76 | France,FR,FRA,250,ISO 3166-2:FR
77 | French Guiana,GF,GUF,254,ISO 3166-2:GF
78 | French Polynesia,PF,PYF,258,ISO 3166-2:PF
79 | French Southern Territories,TF,ATF,260,ISO 3166-2:TF
80 | Gabon,GA,GAB,266,ISO 3166-2:GA
81 | Gambia,GM,GMB,270,ISO 3166-2:GM
82 | Georgia,GE,GEO,268,ISO 3166-2:GE
83 | Germany,DE,DEU,276,ISO 3166-2:DE
84 | Ghana,GH,GHA,288,ISO 3166-2:GH
85 | Gibraltar,GI,GIB,292,ISO 3166-2:GI
86 | Greece,GR,GRC,300,ISO 3166-2:GR
87 | Greenland,GL,GRL,304,ISO 3166-2:GL
88 | Grenada,GD,GRD,308,ISO 3166-2:GD
89 | Guadeloupe,GP,GLP,312,ISO 3166-2:GP
90 | Guam,GU,GUM,316,ISO 3166-2:GU
91 | Guatemala,GT,GTM,320,ISO 3166-2:GT
92 | Guernsey,GG,GGY,831,ISO 3166-2:GG
93 | Guinea,GN,GIN,324,ISO 3166-2:GN
94 | Guinea-Bissau,GW,GNB,624,ISO 3166-2:GW
95 | Guyana,GY,GUY,328,ISO 3166-2:GY
96 | Haiti,HT,HTI,332,ISO 3166-2:HT
97 | Heard Island and McDonald Islands,HM,HMD,334,ISO 3166-2:HM
98 | Holy See (Vatican City State),VA,VAT,336,ISO 3166-2:VA
99 | Honduras,HN,HND,340,ISO 3166-2:HN
100 | Hong Kong,HK,HKG,344,ISO 3166-2:HK
101 | Hungary,HU,HUN,348,ISO 3166-2:HU
102 | Iceland,IS,ISL,352,ISO 3166-2:IS
103 | India,IN,IND,356,ISO 3166-2:IN
104 | Indonesia,ID,IDN,360,ISO 3166-2:ID
105 | "Iran, Islamic Republic of",IR,IRN,364,ISO 3166-2:IR
106 | Iraq,IQ,IRQ,368,ISO 3166-2:IQ
107 | Ireland,IE,IRL,372,ISO 3166-2:IE
108 | Isle of Man,IM,IMN,833,ISO 3166-2:IM
109 | Israel,IL,ISR,376,ISO 3166-2:IL
110 | Italy,IT,ITA,380,ISO 3166-2:IT
111 | Jamaica,JM,JAM,388,ISO 3166-2:JM
112 | Japan,JP,JPN,392,ISO 3166-2:JP
113 | Jersey,JE,JEY,832,ISO 3166-2:JE
114 | Jordan,JO,JOR,400,ISO 3166-2:JO
115 | Kazakhstan,KZ,KAZ,398,ISO 3166-2:KZ
116 | Kenya,KE,KEN,404,ISO 3166-2:KE
117 | Kiribati,KI,KIR,296,ISO 3166-2:KI
118 | "Korea, Democratic People's Republic of",KP,PRK,408,ISO 3166-2:KP
119 | "Korea, Republic of",KR,KOR,410,ISO 3166-2:KR
120 | Kuwait,KW,KWT,414,ISO 3166-2:KW
121 | Kyrgyzstan,KG,KGZ,417,ISO 3166-2:KG
122 | Lao People's Democratic Republic,LA,LAO,418,ISO 3166-2:LA
123 | Latvia,LV,LVA,428,ISO 3166-2:LV
124 | Lebanon,LB,LBN,422,ISO 3166-2:LB
125 | Lesotho,LS,LSO,426,ISO 3166-2:LS
126 | Liberia,LR,LBR,430,ISO 3166-2:LR
127 | Libyan Arab Jamahiriya,LY,LBY,434,ISO 3166-2:LY
128 | Liechtenstein,LI,LIE,438,ISO 3166-2:LI
129 | Lithuania,LT,LTU,440,ISO 3166-2:LT
130 | Luxembourg,LU,LUX,442,ISO 3166-2:LU
131 | Macao,MO,MAC,446,ISO 3166-2:MO
132 | "Macedonia, the former Yugoslav Republic of",MK,MKD,807,ISO 3166-2:MK
133 | Madagascar,MG,MDG,450,ISO 3166-2:MG
134 | Malawi,MW,MWI,454,ISO 3166-2:MW
135 | Malaysia,MY,MYS,458,ISO 3166-2:MY
136 | Maldives,MV,MDV,462,ISO 3166-2:MV
137 | Mali,ML,MLI,466,ISO 3166-2:ML
138 | Malta,MT,MLT,470,ISO 3166-2:MT
139 | Marshall Islands,MH,MHL,584,ISO 3166-2:MH
140 | Martinique,MQ,MTQ,474,ISO 3166-2:MQ
141 | Mauritania,MR,MRT,478,ISO 3166-2:MR
142 | Mauritius,MU,MUS,480,ISO 3166-2:MU
143 | Mayotte,YT,MYT,175,ISO 3166-2:YT
144 | Mexico,MX,MEX,484,ISO 3166-2:MX
145 | "Micronesia, Federated States of",FM,FSM,583,ISO 3166-2:FM
146 | "Moldova, Republic of",MD,MDA,498,ISO 3166-2:MD
147 | Monaco,MC,MCO,492,ISO 3166-2:MC
148 | Mongolia,MN,MNG,496,ISO 3166-2:MN
149 | Montenegro,ME,MNE,499,ISO 3166-2:ME
150 | Montserrat,MS,MSR,500,ISO 3166-2:MS
151 | Morocco,MA,MAR,504,ISO 3166-2:MA
152 | Mozambique,MZ,MOZ,508,ISO 3166-2:MZ
153 | Myanmar,MM,MMR,104,ISO 3166-2:MM
154 | Namibia,NA,NAM,516,ISO 3166-2:NA
155 | Nauru,NR,NRU,520,ISO 3166-2:NR
156 | Nepal,NP,NPL,524,ISO 3166-2:NP
157 | Netherlands,NL,NLD,528,ISO 3166-2:NL
158 | Netherlands Antilles,AN,ANT,530,ISO 3166-2:AN
159 | New Caledonia,NC,NCL,540,ISO 3166-2:NC
160 | New Zealand,NZ,NZL,554,ISO 3166-2:NZ
161 | Nicaragua,NI,NIC,558,ISO 3166-2:NI
162 | Niger,NE,NER,562,ISO 3166-2:NE
163 | Nigeria,NG,NGA,566,ISO 3166-2:NG
164 | Niue,NU,NIU,570,ISO 3166-2:NU
165 | Norfolk Island,NF,NFK,574,ISO 3166-2:NF
166 | Northern Mariana Islands,MP,MNP,580,ISO 3166-2:MP
167 | Norway,NO,NOR,578,ISO 3166-2:NO
168 | Oman,OM,OMN,512,ISO 3166-2:OM
169 | Pakistan,PK,PAK,586,ISO 3166-2:PK
170 | Palau,PW,PLW,585,ISO 3166-2:PW
171 | "Palestinian Territory, Occupied",PS,PSE,275,ISO 3166-2:PS
172 | Panama,PA,PAN,591,ISO 3166-2:PA
173 | Papua New Guinea,PG,PNG,598,ISO 3166-2:PG
174 | Paraguay,PY,PRY,600,ISO 3166-2:PY
175 | Peru,PE,PER,604,ISO 3166-2:PE
176 | Philippines,PH,PHL,608,ISO 3166-2:PH
177 | Pitcairn,PN,PCN,612,ISO 3166-2:PN
178 | Poland,PL,POL,616,ISO 3166-2:PL
179 | Portugal,PT,PRT,620,ISO 3166-2:PT
180 | Puerto Rico,PR,PRI,630,ISO 3166-2:PR
181 | Qatar,QA,QAT,634,ISO 3166-2:QA
182 | Réunion,RE,REU,638,ISO 3166-2:RE
183 | Romania,RO,ROU,642,ISO 3166-2:RO
184 | Russian Federation,RU,RUS,643,ISO 3166-2:RU
185 | Rwanda,RW,RWA,646,ISO 3166-2:RW
186 | Saint Barthélemy,BL,BLM,652,ISO 3166-2:BL
187 | "Saint Helena, Ascension and Tristan da Cunha",SH,SHN,654,ISO 3166-2:SH
188 | Saint Kitts and Nevis,KN,KNA,659,ISO 3166-2:KN
189 | Saint Lucia,LC,LCA,662,ISO 3166-2:LC
190 | Saint Martin (French part),MF,MAF,663,ISO 3166-2:MF
191 | Saint Pierre and Miquelon,PM,SPM,666,ISO 3166-2:PM
192 | Saint Vincent and the Grenadines,VC,VCT,670,ISO 3166-2:VC
193 | Samoa,WS,WSM,882,ISO 3166-2:WS
194 | San Marino,SM,SMR,674,ISO 3166-2:SM
195 | Sao Tome and Principe,ST,STP,678,ISO 3166-2:ST
196 | Saudi Arabia,SA,SAU,682,ISO 3166-2:SA
197 | Senegal,SN,SEN,686,ISO 3166-2:SN
198 | Serbia,RS,SRB,688,ISO 3166-2:RS
199 | Seychelles,SC,SYC,690,ISO 3166-2:SC
200 | Sierra Leone,SL,SLE,694,ISO 3166-2:SL
201 | Singapore,SG,SGP,702,ISO 3166-2:SG
202 | Slovakia,SK,SVK,703,ISO 3166-2:SK
203 | Slovenia,SI,SVN,705,ISO 3166-2:SI
204 | Solomon Islands,SB,SLB,090,ISO 3166-2:SB
205 | Somalia,SO,SOM,706,ISO 3166-2:SO
206 | South Africa,ZA,ZAF,710,ISO 3166-2:ZA
207 | South Georgia and the South Sandwich Islands,GS,SGS,239,ISO 3166-2:GS
208 | Spain,ES,ESP,724,ISO 3166-2:ES
209 | Sri Lanka,LK,LKA,144,ISO 3166-2:LK
210 | Sudan,SD,SDN,736,ISO 3166-2:SD
211 | Suriname,SR,SUR,740,ISO 3166-2:SR
212 | Svalbard and Jan Mayen,SJ,SJM,744,ISO 3166-2:SJ
213 | Swaziland,SZ,SWZ,748,ISO 3166-2:SZ
214 | Sweden,SE,SWE,752,ISO 3166-2:SE
215 | Switzerland,CH,CHE,756,ISO 3166-2:CH
216 | Syrian Arab Republic,SY,SYR,760,ISO 3166-2:SY
217 | "Taiwan, Province of China",TW,TWN,158,ISO 3166-2:TW
218 | Tajikistan,TJ,TJK,762,ISO 3166-2:TJ
219 | "Tanzania, United Republic of",TZ,TZA,834,ISO 3166-2:TZ
220 | Thailand,TH,THA,764,ISO 3166-2:TH
221 | Timor-Leste,TL,TLS,626,ISO 3166-2:TL
222 | Togo,TG,TGO,768,ISO 3166-2:TG
223 | Tokelau,TK,TKL,772,ISO 3166-2:TK
224 | Tonga,TO,TON,776,ISO 3166-2:TO
225 | Trinidad and Tobago,TT,TTO,780,ISO 3166-2:TT
226 | Tunisia,TN,TUN,788,ISO 3166-2:TN
227 | Turkey,TR,TUR,792,ISO 3166-2:TR
228 | Turkmenistan,TM,TKM,795,ISO 3166-2:TM
229 | Turks and Caicos Islands,TC,TCA,796,ISO 3166-2:TC
230 | Tuvalu,TV,TUV,798,ISO 3166-2:TV
231 | Uganda,UG,UGA,800,ISO 3166-2:UG
232 | Ukraine,UA,UKR,804,ISO 3166-2:UA
233 | United Arab Emirates,AE,ARE,784,ISO 3166-2:AE
234 | United Kingdom,GB,GBR,826,ISO 3166-2:GB
235 | United States,US,USA,840,ISO 3166-2:US
236 | United States Minor Outlying Islands,UM,UMI,581,ISO 3166-2:UM
237 | Uruguay,UY,URY,858,ISO 3166-2:UY
238 | Uzbekistan,UZ,UZB,860,ISO 3166-2:UZ
239 | Vanuatu,VU,VUT,548,ISO 3166-2:VU
240 | "Venezuela, Bolivarian Republic of",VE,VEN,862,ISO 3166-2:VE
241 | Viet Nam,VN,VNM,704,ISO 3166-2:VN
242 | "Virgin Islands, British",VG,VGB,092,ISO 3166-2:VG
243 | "Virgin Islands, U.S.",VI,VIR,850,ISO 3166-2:VI
244 | Wallis and Futuna,WF,WLF,876,ISO 3166-2:WF
245 | Western Sahara,EH,ESH,732,ISO 3166-2:EH
246 | Yemen,YE,YEM,887,ISO 3166-2:YE
247 | Zambia,ZM,ZMB,894,ISO 3166-2:ZM
248 | Zimbabwe,ZW,ZWE,716,ISO 3166-2:ZW
--------------------------------------------------------------------------------
/DataFiles/languages.txt:
--------------------------------------------------------------------------------
1 | external id;language code;language name;language name native;language code 2;fallback language code
2 | 1;en-AU;English (AU);AU English;;en,en-US,en-GB
3 | 2;fa-IR;Persian;فارسی;fa;
4 | 3;pl-PL;Polish;Polski;pl;
5 | 4;lv-LV;Latvian;Latviešu;lv;
6 | 6;en-NZ;English (NZ);NZ English;;en,en-US,en-GB
7 | 7;sr-SP;Serbian;српски језик;sr;
8 | 8;zh-CN;Chinese;中文;zh;
9 | 9;it-IT;Italian;Italiano;it;
10 | 10;ru-RU;Russian;Русско;ru;
11 | 11;vi-VN;Vietnamese;Tiếng Việt;vi;
12 | 12;bg-BG;Bulgarian;български език;bg;
13 | 13;kr-KR;Korean;한국어;kr;
14 | 14;ar-SA;Arabic;العربي;ar;
15 | 15;el-GR;Greek;ελληνικά;el;
16 | 16;es-ES;Spanish;Español;es;
17 | 17;de-AT;German;Deutsch, Österreich;;de-DE
18 | 18;mn-MN;Mongolean;Монгол хэл;mn;
19 | 19;en-GB;English;British English;en-UK;en,en-US
20 | 20;en-CA;English (CA);Canadian English;;en,en-US,en-GB
21 | 21;lt-LT;Lithuanian;Lietuvos;lt;
22 | 22;da-DK;Danish;Dansk;da;
23 | 23;de-CH;German (CH);Deutsch, Schweiz;;de-DE
24 | 24;et-EE;Estonian;Eesti;et;
25 | 25;cs-CZ;Czech;čeština;cs;
26 | 26;nb-NO;Norwegian (Bokmål);Norsk Bokmål;;no-NO
27 | 28;nn-NO;Norwegian (Nynorsk);Norsk Nynorsk;;no-NO
28 | 29;en;English;International English;;en-US,en-GB
29 | 30;de-DE;German;Deutsch, Deutschland;de;
30 | 31;nl-NL;Dutch;Nederlands;nl;
31 | 32;fr-FR;French;Français;fr;
32 | 33;sv-SE;Swedish;Svenska;sv;
33 | 34;en-US;English (US);US English;;en, en-GB
34 | 35;pt-BR;Portuguese (BR);Português do Brasil;;pt-PT
35 | 36;fi-FI;Finnish;Suomi;fi;
36 | 37;ja-JP;Japanese;日本語;ja;
37 | 38;no-NO;Norwegian;Norsk;no;
38 | 39;pt-PT;Portuguese;Português;pt;
39 | 40;nl-BE;Dutch (BE);Belgian Dutch;;nl-NL
40 | 41;fr-BE;French (BE);Belgian French;;fr-FR
--------------------------------------------------------------------------------
/DataFiles/unit-mapping.csv:
--------------------------------------------------------------------------------
1 | "Ω", "Ohm"
2 | "Ωm", "Ohm·m"
3 | "/h", "1/h"
4 | "/K", "1/K"
5 | "/m", "1/m"
6 | "/m²", "1/m²"
7 | "/min", "1/min"
8 | "/s", "1/s"
9 | "Bit", "bit"
10 | "cm2", "cm²"
11 | "cm3", "cm³"
12 | "cm4", "cm⁴"
13 | "Days", "day"
14 | "dBmW", "dBm"
15 | "ftlbs/sec", "ft·lbs/sec"
16 | "GJ/year", "GJ/yr"
17 | "g/m2", "g/m²"
18 | "g/m3", "g/m³"
19 | "gon", "°"
20 | "grad", "°"
21 | "Grad", "°"
22 | "inch", "in"
23 | "J/(kg·K)", "J/kg·K"
24 | "kΩ", "kOhm"
25 | "kg CO2eq", "kg CO₂ eq"
26 | "kg CO2eq.", "kg CO₂ eq"
27 | "kg CO2 eq.", "kg CO₂ eq"
28 | "kg CO2 eq", "kg CO₂ eq"
29 | "kg PO43- eq", "kg PO₄³⁻ eq"
30 | "kg (PO4)3- eq", "kg PO₄³⁻ eq"
31 | "kg (PO4)3- eq.", "kg PO₄³⁻ eq"
32 | "kg (PO4)^(3-) equiv.", "kg PO₄³⁻ eq"
33 | "kg (PO4)^(3-) eq", "kg PO₄³⁻ eq"
34 | "kg/(m.s.Pa)", "kg/m/s/Pa"
35 | "kg/m2", "kg/m²"
36 | "kg/m3", "kg/m³"
37 | "kg/100 m", "kg/100m"
38 | "KN", "kN"
39 | "KN/m2", "kN/m²"
40 | "KN/m3", "kN/m³"
41 | "kvar", "kVAR"
42 | "kW/ton", "kW/tonne"
43 | "L", "l"
44 | "L/h", "l/h"
45 | "L/min", "l/min"
46 | "L/s", "l/s"
47 | "m2", "m²"
48 | "m3", "m³"
49 | "m3/h", "m³/h"
50 | "m3/h/m2 @ 50Pa", "m³/(h·m²) @ 50Pa"
51 | "m3/hr/m2 @ 50Pa", "m³/(h·m²) @ 50Pa"
52 | "mg/m2/h", "mg/m²/h"
53 | "m3/m2 s Pa", "m³/m²sPa"
54 | "mg/m3", "mg/m³"
55 | "Milligram", "mg"
56 | "m²K/W", "m²·K/W"
57 | "mL", "ml"
58 | "mm2", "mm²"
59 | "mm3", "mm³"
60 | "mm4", "mm⁴"
61 | "mm/(m.K)", "mm/(m·K)"
62 | "mm/(m⋅K)", "mm/(m·K)"
63 | "mNHN", "?"
64 | "MN/m2", "MN/m²"
65 | "m/Nm²", "m/(N·m²)"
66 | "MN/m3", "MN/m³"
67 | "(m².K)/W", "m²·K/W"
68 | "(m²·K)/W", "m²·K/W"
69 | "N/mm2", "N/mm²"
70 | "ohm", "Ohm"
71 | "Ohm-m", "Ohm·m"
72 | "Ohm⋅m", "Ohm·m"
73 | "Pa-s", "Pa·s"
74 | "Pa⋅s", "Pa·s"
75 | "psi (lbf/in²)", "psi"
76 | "sec", "s"
77 | "ton", "tonne"
78 | "ton/h", "tonne/h"
79 | "W/m°K", "W/(m·K)"
80 | "W/mK", "W/(m·K)"
81 | "W/m²K", "W/(m²·K)"
82 | "W/m²K²", "W/(m²·K²)"
83 | "W/(m.K)", "W/(m·K)"
84 | "W/(m².K)", "W/(m²·K)"
85 | "W/(m².K²)", "W/(m²·K²)"
86 | "Year", "yr"
--------------------------------------------------------------------------------
/Documentation/API version history.md:
--------------------------------------------------------------------------------
1 | # bSDD API version history
2 |
3 | This is the version history of the API at https://api.bsdd.buildingsmart.org.
4 |
5 | New APIs and updates will always first be published to the bSDD test environment: https://test.bsdd.buildingsmart.org
6 |
7 | For planned updates and other tech discussions, see [bSDD tech updates forum](https://forums.buildingsmart.org/t/bsdd-tech-updates/4889).
8 |
9 | #
10 | # Versioning strategy
11 | A new version will only be created if it 'breaks' the current version. For example, adding a new field to the output of an API does NOT (or should not) break your app. Removing an output field on the other hand is a breaking change and will result in a new version of that API.
12 |
13 | If there is a new version of an API the previous version will be supported for at least 6 months after releasing the new version.
14 |
15 | ## 2024-09-23
16 |
17 | Changed API methods:
18 | * api/Dictionary/v1/Classes:
19 | - Option "RelatedIfcEntity" added
20 | * api/TextSearch/v2:
21 | - Field "code" added to output of the Dictionaries list
22 |
23 |
24 | ## 2024-08-16
25 |
26 | New API methods:
27 | * api/Class/Relations/v1: Get class relations or reverse relations (paginated)
28 | * api/Class/Properties/v1: Get class properties (paginated)
29 | * api/UploadImportFile/v2: Supports upload of large files. Validation will be done asynchronously and results will be sent by email
30 | * api/Dictionary/Popular/v1: Get short list of most popular dictionaries
31 | * api/Property/Relations/v1: Get property relations or reverse relations (paginated)
32 | * api/Property/Classes/v1: Get list of classes that uses the property (paginated)
33 | * api/TextSearch/v2: new filter options and some changes in output
34 |
35 | Changed API methods:
36 | * api/Dictionary/v1/Classes:
37 | - Option "SearchText" added
38 | * api/Dictionary/v1/Properties:
39 | - Option "SearchText" added
40 | * api/DictionaryDownload/sketchup/v1:
41 | - now downloads ".skc" file instead of ".xsd"
42 |
43 |
44 | ## 2024-03-01
45 |
46 | - On uploading a dictionary user can now indicate that it is for testing purposes.
47 |
48 | Changend APIs:
49 | * api/Class/v1:
50 | - Option IncludeReverseRelations added
51 | * api/Dictionary/v1:
52 | - Option IncludeTestDictionaries added
53 | * api/UploadImportFile/v1:
54 | - Option IsTest added
55 | * api/TextSearch/v1:
56 | - Text search with multiple word(parts) now also finds results if first word partly ('startswith') matches. Previously it would find only exact matches on first word(s)
57 |
58 |
59 | ## 2023-11-08
60 |
61 | Name changes:
62 | * Classification ==> Class
63 | * Domain ==> Dictionary
64 | * NamespaceUri ==> Uri
65 | * IncludeChilds ==> IncludeChildren
66 |
67 | This involves all APIs either with one of these names in the API name itself, in the input contract or in the output contract. For all these APIs new versions, some with new names, have been created. Existing APIs will remain for at least 6 months after go live but we advise you to use the new APIs.
68 |
69 | Other changes:
70 | * "Materials" are not treated separately anymore, they are just Classes with type being Material.
71 | * Import field ClassificationProperty.ExternalPropertyUri has been removed completely. The field PropertyNamespaceUri (which is now called PropertyUri) already replaced it.
72 | * Search APIs now support pagination
73 |
74 | Changed APIs:
75 | * api/Class/v1: new, replaces api/Classification/v4
76 | - Option includeClassProperties added. If true, classProperties will be fetched. Default is false.
77 | - Option includeClassRelations added. If true, classRelations will be fetched. Default is false.
78 | - New output field: Class.Description
79 | * api/Class/Search/v1: new, replaces api/ClassificationSearchOpen/v1.
80 | - Return contract now contains just one dictionary instead of a list of dictionaries which always contains one item.
81 | - Supports pagination
82 | * api/Dictionary/v1: new, replaces api/Domain/v3
83 | - Supports pagination
84 | * api/Dictionary/v1/Classes: new, replaces api/Domain/v3/Classifications.
85 | - Materials are not separately listed anymore
86 | - Supports pagination
87 | - Optional filter on ClassType
88 | * api/Dictionary/v1/Properties: new
89 | - Supports pagination
90 | * api/Dictionary/v1 PUT, DELETE: new, replaces api/Domain/v1
91 | * api/DictionaryDownload/sketchup/v1: new, replaces api/RequestExportFile/preview
92 | * api/Material has been replaced by api/Class
93 | * api/Property/v4: new, replaces api/Property/v3
94 | * api/SearchInDictionary/v1: new, replaces api/SearchList(Open)/v2
95 | - Supports pagination
96 | * api/TextSearch/v1: new, replaces api/TextSearchListOpen/v6
97 | - Supports pagination
98 | * api/UploadImportFile/v1: updated, it accepts both old and new import json. Support for old import json will become deprecated.
99 |
100 | All replaced APIs still work for now but are marked as obsolete, as can be seen on the swagger page https://test.bsdd.buildingsmart.org/swagger.
101 |
102 | ## 2023-08-10
103 |
104 | * Added: api/Domain/v3/{organizationCode}/{code}/{version} - put: to update the status of a domain version
105 | * Added: api/Domain/v3/{organizationCode}/{code}/{version} - delete: to delete a domain version
106 | * Added: api/Domain/v3/{organizationCode}/{code} - delete: to delete a domain
107 | * Change: api/Classification/v4: now includes "namespaceUri" in result contracts of the classification property and classification relation
108 | * Change: api/Property/v3: now includes "namespaceUri" in result contract of the property relation
109 |
110 | ## 2023-05-10
111 |
112 | * Change: api/Domain/v3: now includes "OrganizationCodeOwner" in result contract
113 | * Fix: the swagger documentation for api/Classification/v4 has been corrected
114 |
115 | ## 2022-12-29
116 |
117 | * New version: api/Domain/v3: is same as v2
118 | * New version: api/Domain/v3/Classifications: output contract has changed - materials are now returned in a separate list
119 | * New version: api/TestSearchListOpen/v6: output contract has changed - materials are now returned in a separate list; input contract now also accepts "Materials" in TypeFilter; TypeFilter values are now case insensitive
120 | * Change: api/TestSearchListOpen/v5: TypeFilter values are now case insensitive
121 |
122 | Previous versions of new APIs will remain available until at least September 2023.
123 |
124 | ## 2022-10-23
125 |
126 | * New version: api/Classification/v4: attribute PossibleValues has been renamed into AllowedValues (is now consistent with import attribute name)
127 | * New version: api/Material/v2: attribute PossibleValues has been renamed into AllowedValues (is now consistent with import attribute name)
128 | * New version: api/Property/v3: attribute PossibleValues has been renamed into AllowedValues (is now consistent with import attribute name); supports returning RDF format
129 |
130 | Previous versions of new APIs will remain available until at least July 2023.
131 |
132 | ## 2022-09-08
133 |
134 | ATTENTION: for accessing secured API's you must use **https://authentication.buildingsmart.org** instead of https://buildingsmartservices.b2clogin.com !
135 |
136 | ## 2022-09-05
137 |
138 | * New: api/ClassificationSearchOpen/v1, optimized API for searching for classifications
139 | * Update: api/Domain/v2 and api/Domain/v2/Classifications returns LastUpdatedUtc with date and time the data in bSDD was last updated
140 | * Update: "http://idenfitier..." has been replaced by "https://identifier...". Searching for "http://identifier..." is for the time being auto-matched with "https://idenfitier..."
141 |
142 | ## 2022-08-23
143 |
144 | * Update: api/Domain/v2/Classifications now supports Accept-Language header
145 | * Update: api/Domain/v2 and api/Domain/v2/Classifications output fields ReleaseDate, MoreInfoUrl and Status added
146 | * Update: api/Classification/v3 output field Fraction added (in type ClassificationRelation)
147 |
148 | ## 2022-07-01
149 | * Update: api/Classification/v3 now supports the Accept-Language header to request data in a different language
150 | * Update: api/Property/v2 now supports the Accept-Language header to request data in a different language
151 | * Update: api/Property/v2 and api/Classification/v3 now also returns the QUDT code(s) for units, if available
152 | * Update: api/RequestExportfile/preview, SketchUp output files are now cached
153 |
154 | ## 2022-04-30
155 | * New: api/Material/v1 for getting Material details
156 | * New: api/Material/SearchOpen/preview for searching Materials
157 | * Update: api/Classification/v3 can now return data in RDF-XML, Turtle or Html format:
158 |
159 | | Accept header | Output format |
160 | |--|--|
161 | | [default] | json |
162 | | application/rdf+xml | RDF XML |
163 | | application/x-turtle | turtle |
164 | | text/html | html |
165 | | text/turtle | turtle |
166 |
167 | ## 2021-11-01
168 | * New: api/Domain/v2/Classifications for getting the list of classifications for a domain
169 |
170 | ## 2021-09-01
171 | * Official first release
172 |
--------------------------------------------------------------------------------
/Documentation/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | Project maintainers act according to the processes of buildingSMART International and the Room in which this project is maintained and owned.
32 |
33 | ## Scope
34 |
35 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
36 |
37 | ## Enforcement
38 |
39 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at websupport@buildingsmart.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
40 |
41 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
42 |
43 | ## Attribution
44 |
45 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
46 |
47 | [homepage]: http://contributor-covenant.org
48 | [version]: http://contributor-covenant.org/version/1/4/
49 |
--------------------------------------------------------------------------------
/Documentation/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to contribute
2 |
3 | I'm really glad you're reading this, because we need contributors to help this project come to fruition. We want you working on things you're excited about.
4 |
5 | This repository at GitHub is, where the creators and implementers of Open Standards of buildingSMART and other people work together. GitHub was usually a platform for IT oriented people. Now it is getting more and more also accessible for non-technical people. So, do not hesitate and learn the workflow.
6 |
7 | Here are some important resources:
8 |
9 | * [Information about buildingSMART](https://www.buildingsmart.org/) tells you who we are,
10 | * [This website](http://www.buildingsmart-tech.org/) is the publishing platform for our latest standards
11 | * Our day to day exchange and discussions are on [our Discourse](https://forums.buildingsmart.org)
12 | * Bugs? Yes they exist, we would like to know them, so [Github](https://github.com/buildingSMART/bSDD/issues) is where to report them
13 | * Features? Again Yes, we need you ideas and comments. Feel free to share them with us [here]((https://github.com/buildingSMART/bSDD/issues))
14 |
15 | ## Submitting changes
16 |
17 | Please send a [GitHub Pull Request](https://github.com/buildingSMART/bSDD/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). When you send a pull request, we will love you forever if you include examples. We can always use more test coverage. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit).
18 |
19 | Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
20 |
21 | $ git commit -m "A brief summary of the commit
22 | >
23 | > A paragraph describing what changed and its impact."
24 |
25 | Thanks,
26 | bSI Digital Infrastructure Team and all other people that work hard to bring Open BIM to work
27 |
--------------------------------------------------------------------------------
/Documentation/RDF.md:
--------------------------------------------------------------------------------
1 | # RDF
2 |
3 | Resource Description Framework (RDF) is a standard model for data interchange on the Web. Read more: https://www.w3.org/RDF/
4 |
5 | The bSDD has a feature that returns data in RDF format, but it's currently in PREVIEW status.
6 |
7 | The following API's support returning data in RDF:
8 |
9 | - /api/Classification/v3
10 |
11 | You can request output in RDF-xml format by adding an HTTP header with key "Accept" and value "application/rdf+xml".
12 |
13 | You can request output in turtle format by adding an HTTP header with key "Accept" and value "text/turtle" of "application/x-turtle".
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Documentation/bSDD API.md:
--------------------------------------------------------------------------------
1 | ## The bSDD API
2 | The bSDD API offers methods to retrieve `Class` and `Property` information of many dictionaries (standards) like IFC and ETIM. An example flow is:
3 | * User opens screen to search for a Class and its Properties
4 | * After opening screen the app calls the “Dictionary”-method of the API to retrieve a list of available Dictionaries. This list can then be presented to the user to make a selection.
5 | * The user selects a Dictionary and enters some text to find the required Class
6 | * The user presses Search, and the app sends the request to the bSDD API (“SearchList”-method)
7 | * The result is a list of Classes
8 | * The user can pick the one needed
9 | * The app sends a request for Class details and Properties to the bSDD API (“Class”-method)
10 | * The API returns Class details and Properties, which the app shows to the user
11 |
12 | A typical use case is demonstrated in SketchUp. A video of the SketchUp use-case and bSDD plugin is available at https://vimeo.com/446417661/ff8b6605d3
13 |
14 | **The bSDD API is regularly updated.** If there are breaking changes to the API, we create a new version and support both versions for 6 months after the change occurred. Additions to an existing API usually don't mean a breaking change and can be introduced to the same version.
15 |
16 | ## API contracts and testing the API
17 | You can get the API contract information at [bSDD API contract, official release](https://app.swaggerhub.com/apis/buildingSMART/Dictionaries/v1) or [bSDD API contract, test](https://test.bsdd.buildingsmart.org/swagger). This information is available without the need for you to log in. You can also test the API methods. Secured methods are marked with a lock. To access secured methods, you need to log in via the UI by using the Authorize button:
18 |
19 |
20 |
21 | Don’t forget to check the “read” scope!
22 |
23 | ## Using https://identifier.buildingsmart.org
24 | You can access the data of the `Class` or `Property` also directly via the URI of the `Class` or `Property`. For example, you can navigate in the browser to https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcWall, and then you will see a visual representation of the data of that Class. If you would like the output in JSON format, then sending an "Accept" header with "application/JSON" will give you a result in JSON. The content of this JSON result differs from the HTML result!
25 |
26 | IMPORTANT: Do not use these identifier URIs for system-to-system communication! First of all, it introduces an extra 'hop' from server to server. Second, you do not have control over the version of the API it's using. The result may differ after a new release of bSDD has been published with the result from before the release.
27 |
28 | > Note: Getting the data in JSON format by directly calling the https://identifier.buildingsmart.org URL is now DEPRECATED. Use api/Class/vX or api/Property/vX instead.
29 |
30 | ## bSDD test environment
31 |
32 | The bSDD has a TEST environment for testing new developments of the bSDD. Although meant for internal use, developers wanting to use the bSDD APIs are welcome to use the TEST environment for development purposes. We do not have an SLA for that environment and we don't recommend showing its content to users. If you're a Dictionary owner and want to check your data or test the upload process, please use the official bSDD.
33 |
34 | ## GraphQL
35 | The data can also be accessed via GraphQL. You can try it out here:
36 | [GraphiQL TEST playground](https://test.bsdd.buildingsmart.org/graphiql).
37 |
38 |
39 | The URL to send GraphQL requests to is:
40 | - official release: https://api.bsdd.buildingsmart.org/graphqls (secured, note the "s" at the end)
41 | - test version: https://test.bsdd.buildingsmart.org/graphql (not secured)
42 | - test version: https://test.bsdd.buildingsmart.org/graphqls (secured)
43 | Note: those URLs are not hyperlinks and do not work in a browser. You need to send a POST request with the query data (the GET request does not work).
44 |
45 | Here you can find an example code for accessing a secured bSDD API: [bSDD GraphQL examples](https://github.com/buildingSMART/bSDD/blob/master/Documentation/bSDD%20and%20GraphQL.md). Contact us if you need assistance implementing this.
46 |
47 | ## For client developers
48 |
49 | ### Http header "(X-)User-Agent"
50 | Please include your application's name and version in the HTTP header "User-Agent" (or "X-User-Agent") for each HTTP call. This will allow us to better track bSDD usage and provide you with some statistics regarding your application using the bSDD API. The preferred format is "application/version," e.g., "Autodesk.Revit/2024.".
51 |
52 | ### Secure APIs
53 | If you are going to build a client that uses secured APIs, you must request a Client ID. You can do so by sending us an email and give:
54 | - the name of the client application
55 | - type of application:
56 | - Web application
57 | - Single-page application
58 | - iOS / macOS, Objective-C, Swift, Xamarin
59 | - Android - Java, Kotlin, Xamarin
60 | - Mobile/Desktop
61 | - which language are you using? (sometimes the redirectUri to be configured depends on the used library)
62 | - if it is a website or SPA, specify the return URL (the login page will redirect to this URL after the user has logged in)
63 |
64 | If you don't use the secured APIs but want to call the other APIs from your website or SPA, we need your website's URL to allow CORS.
65 | If you're creating a desktop client that only calls the non-secured APIs, you're ready to go.
66 |
67 | ### Authentication
68 | For authentication, we use Azure Active Directory B2C.
69 | At this moment, you need to authenticate only a few methods. This might change.
70 |
71 | If you’re developing a Javascript, Java, Angular, React, Python, or .NET application, connecting with the buildingSMART Data Dictionary API is easiest if you use the Microsoft Authentication Library (MSAL).
72 | See [Active directory B2C code samples](https://docs.microsoft.com/en-us/azure/active-directory-b2c/code-samples) for ready-to-use examples on how to use the MSAL. You can find the bSDD API-specific settings in one of the next sections of this document. Make sure you have the settings in an easy-to-update settings file.
73 | You can find the code for a small .NET console application that accesses the bSDD API (authenticated) in this repository: [.NET console example](https://github.com/buildingSMART/bSDD/tree/master/Source%20code%20examples/CSharp-Client-Console-Demo).
74 |
75 | React: https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-react
76 | https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/blob/main/1-Authentication/2-sign-in-b2c/README.md
77 | Angular: https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-angular-auth-code
78 | Java: https://docs.microsoft.com/en-us/samples/azure-samples/ms-identity-java-webapp/ms-identity-java-webapp/
79 | Python: https://docs.microsoft.com/en-us/python/api/overview/azure/active-directory
80 |
81 | If you're developing using other languages, you can still connect to the bSDD API as the API is according to the standards OpenAPI, OAuth2, and OpenID Connect.
82 |
83 | To access a secured API, a user must first register themself. When you’re using MSAL, there’s nothing special you need to do for this. The user will be prompted to log in via a browser window. If the user does not have a buildingSMART API account, he can sign up:
84 |
85 |
86 |
87 | The user will be registered in the buildingSMART Azure B2C Active Directory.
88 | Currently there’s no further authorization required to be able to use the API.
89 |
90 | ### Settings
91 | These are the settings you can use for demonstration purposes for a Dekstop client app :
92 | * Tenant: "buildingsmartservices.onmicrosoft.com"
93 | * AzureAdB2Chostname: "authentication.buildingsmart.org"
94 | * ClientId: "4aba821f-d4ff-498b-a462-c2837dbbba70"
95 | * RedirectUri: "com.onmicrosoft.bsddprototypeb2c.democonsoleapp://oauth/redirect"
96 | * PolicySignUpSignIn: "b2c_1a_signupsignin_c"
97 | * PolicyEditProfile: "b2c_1a_profileedit_c"
98 | * PolicyResetPassword: "b2c_1a_passwordreset_c"
99 |
100 | * ApiScope : "https://buildingsmartservices.onmicrosoft.com/api/read"
101 | * BsddApiUrl: "https://test.bsdd.buildingsmart.org"
102 |
103 | The full B2C authority URL is: https://authentication.buildingsmart.org/tfp/buildingsmartservices.onmicrosoft.com/b2c_1a_signupsignin_c (note the "tfp" part!).
104 |
105 | For using the official release, you should use the settings as above except:
106 | * ClientId: request a Client ID using [CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h)
107 | * RedirectUri: let us know what kind of app you are making and with which technology
108 | * ApiScope : "https://buildingsmartservices.onmicrosoft.com/bsddapi/read"
109 | * BsddApiUrl: "https://api.bsdd.buildingsmart.org"
110 |
111 |
112 | If you are developing a Web App that’s going to use the bSDD API, let us know ([CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h)). The RedirectURI needs to be configured in Azure AD.
113 |
114 | ### Additional information
115 | Language-independent description of the authorization flow: [Authorization code flow](https://docs.microsoft.com/en-us/azure/active-directory-b2c/authorization-code-flow)
116 |
117 | High-level descriptions of the various authentication flows: [AD B2C application types](https://docs.microsoft.com/en-us/azure/active-directory-b2c/application-types)
118 |
119 | Oauth2 and OpenId protocol descriptions: [AD B2C protocols overview](https://docs.microsoft.com/en-us/azure/active-directory-b2c/protocols-overview)
120 |
121 |
--------------------------------------------------------------------------------
/Documentation/bSDD and GraphQL.md:
--------------------------------------------------------------------------------
1 | # bSDD and GraphQL
2 |
3 | ## Notification
4 |
5 | We've applied several changes in naming:
6 |
7 | 1. "Domain" --> "Dictionary"
8 | 2. "Classification" --> "Class"
9 | 3. "NamespaceUri" --> "Uri"
10 | 4. "IncludeChilds" --> "IncludeChildren"
11 |
12 | To be consistent, names in our GraphQL API have also been changed.
13 | But we do support the old naming until at least April 2024.
14 |
15 | ## Short intro on GraphQL
16 |
17 | A 'regular' API is quite static: you do a request and it returns a predefined set of data. If you need some more info you probably need to do another API call. And then maybe another call until you have got all the data you want. GraphQL is designed to overcome that issue: it is a query language with which you can specify the data you need.
18 |
19 | For more info on GraphQL have a look at, for example:
20 | - https://dev.to/davinc/graphql-for-beginners-3f1a
21 | - https://www.freecodecamp.org/news/a-beginners-guide-to-graphql-60e43b0a41f5/
22 |
23 | For some scenario's using GraphQL can be more efficient, but there are still lots of scenario's where a regular API is the most efficient solution.
24 |
25 | ## bSDD GraphQL endpoints
26 |
27 | The bSDD API also provides a GraphQL endpoint and the test environment also has a playground:
28 |
29 | Playground: https://test.bsdd.buildingsmart.org/graphiql/
30 | Test GraphQL endpoint: https://test.bsdd.buildingsmart.org/graphql/
31 | Test GraphQL secured endpoint: https://test.bsdd.buildingsmart.org/graphqls/
32 |
33 | Production GraphQL secured endpoint: https://api.bsdd.buildingsmart.org/graphqls/
34 |
35 | See document https://github.com/buildingSMART/bSDD/blob/master/Documentation/bSDD%20API.md for info how to access secured APIs. For accessing the secured GraphQL endpoint it is the same.
36 |
37 | ## Example data queries
38 |
39 | -- get the list of available languages:
40 | ```
41 | {
42 | languages {
43 | isocode
44 | }
45 | }
46 | ```
47 | ----
48 |
49 | -- get list of country codes:
50 | ```
51 | {
52 | countries {
53 | code
54 | }
55 | }
56 | ```
57 | ----
58 |
59 | You can combine those queries into one:
60 | ```
61 | {
62 | languages {
63 | isocode
64 | }
65 |
66 | countries {
67 | code
68 | }
69 | }
70 | ```
71 | ----
72 |
73 | -- search for classes within a dictionary:
74 | ```
75 | {
76 | dictionary(uri : "https://identifier.buildingsmart.org/uri/sbe/swedishmaterials/1") {
77 | uri
78 | copyrightNotice
79 | languageCode
80 | classSearch(searchText: "asfaltbetong", languageCode: "sv-SE") {
81 | name
82 | uri
83 | synonyms
84 | relatedIfcEntityNames
85 | properties {
86 | name
87 | isRequired
88 | pattern
89 | }
90 | }
91 | }
92 | }
93 | ```
94 | ----
95 |
96 | -- get all classes with their properties of a dictionary:
97 |
98 | ATTENTION: this query will take a long time to execute for dictionaries with many classes
99 | ```
100 | {
101 | dictionary(uri : "https://identifier.buildingsmart.org/uri/bs-agri/fruitvegs/1.0") {
102 | name
103 | version
104 | uri
105 | copyrightNotice
106 | languageCode
107 | status
108 | releaseDate
109 | license
110 | licenseUrl
111 | moreInfoUrl
112 |
113 | classSearch {
114 | code
115 | name
116 | uri
117 | definition
118 | documentReference
119 | synonyms
120 | relatedIfcEntityNames
121 | properties {
122 | code
123 | name
124 | uri
125 | description
126 | definition
127 | documentReference
128 | isRequired
129 | dataType
130 | example
131 | dimension
132 | physicalQuantity
133 | pattern
134 | allowedValues {
135 | code
136 | value
137 | }
138 | units
139 | }
140 | }
141 | }
142 | }
143 | ```
144 | ----
145 |
146 | -- get details for a class, using variables:
147 | ```
148 | query ($dictionaryUri: String!, $uri: String!) {
149 | dictionary(uri: $dictionaryUri) {
150 | name
151 | uri
152 | class(uri: $uri, includeChildren: true) {
153 | activationDateUtc
154 | childs {
155 | name
156 | uri
157 | }
158 | classType
159 | code
160 | countriesOfUse
161 | countryOfOrigin
162 | creatorLanguageCode
163 | deActivationDateUtc
164 | definition
165 | deprecationExplanation
166 | documentReference
167 | name
168 | uri
169 | properties {
170 | name
171 | uri
172 | }
173 | relatedIfcEntityNames
174 | relations {
175 | relatedClassName
176 | relatedClassUri
177 | relationType
178 | }
179 | replacedObjectCodes
180 | replacingObjectCodes
181 | revisionDateUtc
182 | status
183 | subdivisionsOfUse
184 | synonyms
185 | uid
186 | versionDateUtc
187 | versionNumber
188 | visualRepresentationUri
189 | }
190 | }
191 | }
192 | ```
193 | The query variable section defines the variables:
194 | ```
195 | {
196 | "dictionaryUri": "https://identifier.buildingsmart.org/uri/sbe/swedishmaterials/1",
197 | "uri": "https://identifier.buildingsmart.org/uri/sbe/swedishmaterials/1/class/ACDE"
198 | }
199 | ```
200 | ## Example meta data queries
201 |
202 | In GraphQL you can also execute queries on the GraphQL schema (also known as "Introspection"). You can use that to get, for example, the available fields or queries:
203 | ```
204 | {
205 | __schema {
206 | types {
207 | name
208 | fields {
209 | name
210 | description
211 | }
212 | }
213 | }
214 | }
215 |
216 | query availableQueries {
217 | __schema {
218 | queryType {
219 | fields {
220 | name
221 | description
222 | type {
223 | kind
224 | name
225 | fields {
226 | name
227 | description
228 | }
229 | }
230 | }
231 | }
232 | }
233 | }
234 | ```
235 | More examples of Introspection can be found at: https://graphql.org/learn/introspection/
--------------------------------------------------------------------------------
/Documentation/bSDD import tutorial.md:
--------------------------------------------------------------------------------
1 | In this tutorial, we explain how to publish and manage bSDD content using [the bSDD Manage portal](https://manage.bsdd.buildingsmart.org/).
2 |
3 | ## Publishing the first dictionary
4 |
5 |
1. Register your organisation
6 |
7 | Each data dictionary in bSDD is published on behalf of a registered organisation. If this is the first time you are uploading, you need to register your organization in bSDD and connect the e-mail address you used to log in to that organization. To achieve this, please fill out the Organization registration form.
8 |
9 | As part of bSDD housekeeping, we manually review each request, which can take up to a few days. As soon as you've received a reply, you can proceed to the next step.
10 |
11 | > Do you want to only experiment with bSDD without registering your organisation? We can add you to the DEMO organisation. For this and other requests, contact us: [CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h).
12 |
13 | 2. Prepare the content
14 |
15 | The primary form of data upload to bSDD is a properly structured JSON file. In [the data model documentation](https://technical.buildingsmart.org/services/bsdd/data-structure/), we specify what such a file should contain and how to structure it.
16 |
17 | You can manually create such a file by coping the JSON template, or use the Excel template instructions. Alternatively, use one of the third-party tools to manage and upload data dictionaries in bSDD.
18 |
19 | #### General guidelines
20 |
21 | - Fill in all the required attributes.
22 | - You cannot upload the content in parts. All classes and properties of one dictionary must be in one file.
23 | - Manage and publish translations in a separate file.
24 | - Make specific dictionaries; don't try to put too much data into one dictionary.
25 | - Link new classes to IFC entities for increased usability. This way, the software knows how to represent the class in IFC.
26 | - Add existing properties to your content instead of replicating them.
27 | - When assigning property to a class, give it a 'property set' name to know how to structure it in a model (avoid using the 'Pset_' prefix. This is restricted to IFC only)
28 | - Naming conventions and guidelines - the dictionary name needs to be unique. Avoid the use of a name that is too generic. Avoid names that conflict with other dictionaries. For example, do not create classes with an 'Ifc' prefix. Avoid replicating content from other dictionaries. Some licenses do not allow redistribution or modifications. It's a good practice to reuse content by linking it to your dictionary. For example, you can add properties from other dictionaries to your class.
29 | - Dictionary code - the dictionary code needs to be unique in the bSDD; choose one that is recognizable with the dictionary name. The dictionary code is used to generate the URIs of all the resources, so it should be short and preferably without spaces.
30 |
31 | **Read more** about good practices for creating data dictionaries: [https://technical.buildingsmart.org/services/bsdd/guidelines/](https://technical.buildingsmart.org/services/bsdd/guidelines/)
32 |
33 | 3. Upload
34 |
35 | Go to [the bSDD Manage portal](https://manage.bsdd.buildingsmart.org/). If you do not have a bSDD buildingSMART account yet, choose "Sign up now"; otherwise, choose "Sign in".
36 |
37 | > Alternatively, use one of the third-party tools to manage and upload data dictionaries in bSDD, which integrates with the bSDD API.
38 |
39 | > Note: if the bSDD Manage portal shows an error at startup or you keep seeing the spinner icon, try pressing Ctrl-F5 to refresh the cookies. If that doesn't work, then try an "incognito" or "InPrivate" window of your browser and then navigate to the bSDD Manage portal. If that still doesn't work, then contact us: [CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h).
40 |
41 | Go to the Dictionaries tab and select your organisation. If you belong to only one organisation, it will appear immediately on the list.
42 |
43 | Using the "Select file" button load your dictionary JSON file.
44 |
45 |
46 |
47 | You have the option to first validate if the file is free of errors or upload it for testing by selecting option 'Test upload'. The test upload means the content will be automatically deleted from bSDD after 2 months and it will not be possible to set the status to 'Active' to prevent mistakes.
48 |
49 | > Note: If you only want to experiment with the bSDD, we provide an option for a `TEST` upload. This is a safe option for beginners, as the content uploaded as a `TEST` cannot be activated and will automatically be removed after 2 months.
50 |
51 | Press "Upload selected file"
52 |
53 | Before each import, we recommend first using the option 'Validate only?' This will inform you of any errors or warnings without trying to import the file.
54 |
55 | **Important** Uploading a new file with the same version number as already existing will replace the content (only if status is `Preview`, as all other content is immutable - [read more below](#the-lifecycle-of-a-dictionary)).
56 |
57 | Once ready, and if the platform returns no errors, click "Upload selected file."
58 |
59 | Once the file has been imported, you will receive a more detailed import report by email. It might take up to 15 minutes. If the import routine spots any errors, you will see them listed in the email.
60 |
61 | **Important** Uploading will make the content publicly available. Do not publish anything that you don't want to share with the general public, or you don't have sufficient permission.
62 |
63 | > Note: it is possible to restrict the visibility of a dictionary only to certain users. However, this is a paid feature of bSDD. Read more about [Private dictionaries](https://technical.buildingsmart.org/services/bsdd/private-dictionaries/).
64 |
65 | > Note: all of the steps explained above can also be automated using the bSDD API integration.
66 |
67 | The lifecycle of a dictionary
68 |
69 | When you publish a new dictionary version in the bSDD, it always initially has the `Preview` status. At this stage, you can **reupload** the content to modify it, **activate** that version, or permanently **delete** it.
70 |
71 |
72 |
73 | **⚠️ Once the content is activated, it will get an immutable URI, meaning the content will stay in bSDD permanently and can't be deleted.** It is still possible to change the status to `Inactive`, indicating it should no longer be used, but the page will still exist and show the content. Consider that before activating the version of a dictionary.
74 |
75 | Publishing a new dictionary version
76 |
77 | Similarly to publishing for the first time, you can also upload a new dictionary version by loading a properly structured JSON file and clicking Upload.
78 |
79 | Changing the dictionary status
80 |
81 | As soon as you have at least one version of a dictionary uploaded, you will see a row in the table with the name, version number and other properties of each version. By clicking `action`, you can **download** the JSON file to your computer, **change the status** to `Active`, or **delete** the version (both options are only available if the status is `Preview`).
82 |
83 | If this option is enabled, the user can change the dictionary into a private one and specify a list of users with access to such content. Private dictionaries are a paid option. You can read more about it here: [Private dictionaries](https://technical.buildingsmart.org/services/bsdd/private-dictionaries/).
84 |
85 | > Note: All of the above can also be done through the API interface, meaning it is possible to achieve the same result with third-party software implementing bSDD API.
86 |
--------------------------------------------------------------------------------
/Documentation/bSDD private content.md:
--------------------------------------------------------------------------------
1 | ### What is a private dictionary in bSDD?
2 | A private dictionary can only be accessed by designated users. To see the content, they need to be logged in and have permission from the dictionary owner.
3 |
4 | Private dictionaries are **a paid feature** of bSDD, priced individually. If you are interested in this feature, please contact [CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h).
5 |
6 | ### How to make a dictionary private?
7 | Organization users with upload rights can make a dictionary Private by adding a line to their JSON files: `IsPrivate: true,` **in the first upload** of a dictionary. Subsequent uploads cannot change this setting.
8 |
9 | Another option to make a dictionary private (or public again) is by manually changing the setting via the bSDD Management site:
10 | → "Dictionaries" → 'Make dictionary private' button for the desired dictionary. Such a dictionary needs to be uploaded as public first.
11 |
12 | 
13 |
14 |
15 | ### Who can access my private dictionary?
16 | 1. people (e-mail addresses) listed as an "organization user" (no matter what rights, being in the list of organization users is enough to be able to access all private dictionaries of that organization).
17 | 2. access can be granted per dictionary (so **not** per dictionary version): either provide e-mail for giving access to one person or supply a hostname (e.g. "buildingsmart.org"), and all people with e-mails of that host can access the dictionary.
18 |
19 | 
20 |
21 | 
22 |
23 | ### How can I access a private data dictionary?
24 | You can only access private dictionary data when you're logged in as a user that is allowed to access it, and the application you are using supports it.
25 |
26 | For example, to access the content via the Swagger page (Production: https://app.swaggerhub.com/apis-docs/buildingSMART/Dictionaries/v1 / Test: https://test.bsdd.buildingsmart.org/swagger), you should authorise and use the secured API's. Accessing the data via the unsecured APIs is possible, but Swagger does not support that (for those unsecured APIs, swagger does not send your 'token', so the server does not know who you are).
27 |
28 | > Currently, you cannot access private data via the search website (Production: https://search.bsdd.buildingsmart.org/ / Test: https://search-test.bsdd.buildingsmart.org).
29 |
--------------------------------------------------------------------------------
/Documentation/graphics/ClassProp_instantiation.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/ClassProp_instantiation.jpg
--------------------------------------------------------------------------------
/Documentation/graphics/Class_inheritance.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/Class_inheritance.jpg
--------------------------------------------------------------------------------
/Documentation/graphics/Content_lifecycle_workflow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/Content_lifecycle_workflow.jpg
--------------------------------------------------------------------------------
/Documentation/graphics/HowToGetOutputInTurtleFormat.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/HowToGetOutputInTurtleFormat.PNG
--------------------------------------------------------------------------------
/Documentation/graphics/Screenshot_03_signupsignin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/Screenshot_03_signupsignin.png
--------------------------------------------------------------------------------
/Documentation/graphics/bSDD management portal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/bSDD management portal.png
--------------------------------------------------------------------------------
/Documentation/graphics/bSDD_data_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/bSDD_data_example.png
--------------------------------------------------------------------------------
/Documentation/graphics/bSDD_data_model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/bSDD_data_model.png
--------------------------------------------------------------------------------
/Documentation/graphics/bSDD_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/bSDD_logo.png
--------------------------------------------------------------------------------
/Documentation/graphics/bs-signupsignin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/bs-signupsignin.png
--------------------------------------------------------------------------------
/Documentation/graphics/latest_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/latest_example.jpg
--------------------------------------------------------------------------------
/Documentation/graphics/swagger-authorize2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/swagger-authorize2.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/Screenshot_01_swagger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/Screenshot_01_swagger.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/Screenshot_02_authorize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/Screenshot_02_authorize.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/Screenshot_04_authorization_confirmed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/Screenshot_04_authorization_confirmed.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/Screenshot_05_upload_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/Screenshot_05_upload_1.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/Screenshot_06_upload_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/Screenshot_06_upload_2.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/Screenshot_07_upload_result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/Screenshot_07_upload_result.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/bSDD database diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/bSDD database diagram.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/bSDD_data_example - v1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/bSDD_data_example - v1.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/bSDD_data_model - v1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/bSDD_data_model - v1.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/sketchup-plugin-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/sketchup-plugin-1.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/sketchup-plugin-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/sketchup-plugin-2.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/sketchup-plugin-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/sketchup-plugin-3.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/sketchup-plugin-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/sketchup-plugin-4.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/sketchup-plugin-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/sketchup-plugin-5.png
--------------------------------------------------------------------------------
/Documentation/graphics/unused/swagger-authorize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Documentation/graphics/unused/swagger-authorize.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 buildingSMART International Ltd.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Meetings/2021 Content workshop/210519 FGR bSDD Workshop final.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Content workshop/210519 FGR bSDD Workshop final.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Content workshop/CCI_bSDD experiences_20210519.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Content workshop/CCI_bSDD experiences_20210519.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Content workshop/bSDD Workshop presentation Wolfgang Wilkes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Content workshop/bSDD Workshop presentation Wolfgang Wilkes.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Content workshop/readme.md:
--------------------------------------------------------------------------------
1 | # bSDD workshop dedicated to content providers
2 |
3 | ## Date: 2021-05-19
4 |
5 | ## Presenters:
6 | - Frédéric Grand, Erik Baars - bSDD
7 | - Søren Spile - CCI
8 | - Wolfgang Wikes- Semaino
9 |
10 | ## Agenda
11 | - bSDD overview and bSDD standards compliance : [see](https://github.com/buildingSMART/bSDD/blob/master/2021%20Content%20workshop/210519%20FGR%20bSDD%20Workshop%20final.pdf)
12 | - CCI content import story (Søren Spile) : [see](https://github.com/buildingSMART/bSDD/blob/master/2021%20Content%20workshop/CCI_bSDD%20experiences_20210519.pdf)
13 | - Mapping dictionary data to bSDD (Wolgang Wilkes) : [see](https://github.com/buildingSMART/bSDD/blob/master/2021%20Content%20workshop/bSDD%20Workshop%20presentation%20Wolfgang%20Wilkes.pdf)
14 | - Pushing content into bSDD (Erik Baars)
15 | - Interactive Walkthrough of the bSDD import model : [see](https://github.com/buildingSMART/bSDD/blob/master/2020%20prototype/import-model/bSDD%20JSON%20import%20model.md)
16 |
17 | ## Recording
18 | [see on Vimeo](https://vimeo.com/553234172/e024861065)
19 |
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/20210303_bSDD_overview.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Hackathon/20210303_bSDD_overview.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/21-03-03 bSDD Standards_Compliance.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Hackathon/21-03-03 bSDD Standards_Compliance.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/Challenge results/Bernhard_Simon_Bock_20220304_bSDD_Hackathon.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Hackathon/Challenge results/Bernhard_Simon_Bock_20220304_bSDD_Hackathon.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/Challenge results/Tim_Lemoine_20210304_bsddHackathon.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Hackathon/Challenge results/Tim_Lemoine_20210304_bsddHackathon.zip
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/Challenge results/readme.md:
--------------------------------------------------------------------------------
1 | # Results of the challenge
2 |
3 | This folder contains presentations by the developpers as a result of the challenge
4 |
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/GraphQL bSDD.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Hackathon/GraphQL bSDD.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/Hackathon Date Templates Future in bSDD Wolfgang Wilkes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Meetings/2021 Hackathon/Hackathon Date Templates Future in bSDD Wolfgang Wilkes.pdf
--------------------------------------------------------------------------------
/Meetings/2021 Hackathon/tutorial.md:
--------------------------------------------------------------------------------
1 | IMPORTANT: naming and (some) example API calls in this file are outdated! Please check the [swagger information page](https://test.bsdd.buildingsmart.org/swagger) for up-to-date API information.
2 |
3 | # March 2021 Hackathon Tutorial
4 |
5 | How to use the buildingSMART Data Dictionary API?
6 |
7 | You can find a lot of info regarding the bSDD API on https://github.com/buildingSMART/bSDD/tree/master/2020%20prototype.
8 | But where to start using the API?
9 |
10 | ## Context
11 |
12 | ### Main use-case
13 |
14 | One of the main use-cases for using bSDD is having to link parts of a design to classifications or using properties of a specific domain.
15 | As you've seen in the Sketchup demo some Nl-SfB properties needed to be specified for a wall.
16 | The bSDD provides an API for getting the list of domains available.
17 | And after selecting the required domain, there's an API to search for classifications within the selected domain.
18 | In the demo the search is done via "Related IFC Entity Name". It is also possible to search using plain text.
19 | Note that not all domains may have relations with IFC specified.
20 |
21 | By then selecting the desired classification, details of that classification, including properties, can be requestedusing the Classification API.
22 |
23 | ### Authentication
24 |
25 | Some of the bSDD APIs are publicly available, for others you need to be authenticated.
26 | Being authenticated means for bSDD that you have identified yourself to the buildingsmartservices Active Directory. This Active Directory is an Azure service known as Azure AD B2C (with B2C meaning Business to Consumer). You can sign up yourself by providing valid e-mail address and name.
27 |
28 | For this tutorial there is no need to sign up.
29 |
30 | ### Resources
31 |
32 | Some resources for you to get to know more about bSDD and using the API:
33 |
34 | Main resource location of the bSDD API: https://github.com/buildingSMART/bSDD/tree/master/2020%20prototype.
35 | Authenticated call to the bSDD API from a .NET Console App: https://github.com/buildingSMART/bSDD/tree/master/2020%20prototype/CSharp-Client-Console-Demo
36 | Azure AD B2C documentation home page: http://aka.ms/aadb2c
37 | More Azure AD B2C code samples: https://docs.microsoft.com/en-us/azure/active-directory-b2c/code-samples
38 | The API swagger page: https://test.bsdd.buildingsmart.org/swagger
39 |
40 | ## Steps
41 |
42 | For following this tutortial we assume you have some experience with programming and using APIs over HTTP. So we are not going into all programming details of executing an API request.
43 |
44 | For demo, and this tutorial, purposes it is fine to have settings like the base URL of the bSDD API in your code. But if you go along with using bSDD it is better to have these settings configurable so you can, for example, easily switch from the bSDD prototype API to the production API.
45 |
46 | Most bSDD API calls do not require any form of authentication yet, so for this tutorial we're going to skip doing authorized calls.
47 |
48 | ## Part 1 - get a list of the domains
49 |
50 | Prepare your app for doing a HTTP request to the buildingSMART Data Dictionary API.
51 | How to do this depends a lot on the language you use for building your app. If you're using .NET and C#, have a look at the demo console app: https://github.com/buildingSMART/bSDD/tree/master/2020%20prototype/CSharp-Client-Console-Demo
52 |
53 | Call the Domain API to get a list of all domains.
54 | API url: https://test.bsdd.buildingsmart.org/api/Domain/v2
55 | query parameters: -none-
56 |
57 | Response body looks like:
58 | ```
59 | [
60 | {
61 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3",
62 | "name": "IFC",
63 | "version": "4.3",
64 | "organizationNameOwner": "buildingSMART",
65 | "defaultLanguageCode": "EN",
66 | "license": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International",
67 | "licenseUrl": "https://creativecommons.org/licenses/by-nc-nd/4.0/",
68 | "qualityAssuranceProcedure": "bSI process",
69 | "qualityAssuranceProcedureUrl": "https://www.buildingsmart.org/about/bsi-process"
70 | },
71 | {
72 | "namespaceUri": "https://identifier.buildingsmart.org/uri/etim/etim/7.0",
73 | "name": "ETIM",
74 | "version": "7.0",
75 | "organizationNameOwner": "ETIM International",
76 | "defaultLanguageCode": "nl-BE",
77 | "qualityAssuranceProcedure": "ETIM international",
78 | "qualityAssuranceProcedureUrl": "https://www.etim-international.com/wp-content/uploads/2019/11/Statutes-ETIM-International-version-EN-10-2017.pdf"
79 | },
80 | ...
81 | ```
82 |
83 | Present the list to the user
84 |
85 | ## Part 2 - search for classifications within a domain
86 |
87 | Call the SearchListOpen API (for production purposes you should use the secured SearchList API).
88 | Provide one of the Domain NamespaceUris from the list received in the previous step.
89 | Optionally provide some text to search for or provide an official IFC entity name to get even more specific results.
90 | Not all domains have RelatedIfcName(s) available.
91 |
92 | API url: https://test.bsdd.buildingsmart.org/api/SearchListOpen/v2
93 | query parameters: DomainNamespaceUri=http%3A%2F%2Fidentifier.buildingsmart.org%2Furi%2Fbuildingsmart%2Fifc/4.3&SearchText=bridge
94 |
95 | Response body looks like:
96 | ```
97 | {
98 | "numberOfClassificationsFound": 21,
99 | "domains": [
100 | {
101 | "name": "IFC",
102 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3",
103 | "classifications": [
104 | {
105 | "name": "IfcBridge",
106 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcBridge",
107 | "definition": "A Bridge is civil engineering works that affords passage to pedestrians, animals, vehicles, and services above obstacles or between two points at a height above ground. NOTE Definition from ISO 6707 1 2014 Civil engineering works that affords passage to pedestrians, animals, vehicles, and services above obstacles or between two points at a height above ground. bSI Documentation"
108 | },
109 | {
110 | "name": "IfcBridge.ARCHED",
111 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcBridge.ARCHED"
112 | },
113 | {
114 | "name": "IfcBridge.CABLE_STAYED",
115 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcBridge.CABLE_STAYED"
116 | },
117 | ...
118 | ```
119 |
120 | ## Part 3 - get the details of a classification
121 |
122 | Call the Classification API with one of the Classification NamespaceUris received via the SearchList API.
123 |
124 | API url: https://test.bsdd.buildingsmart.org/api/Classification/v2
125 | query parameters: namespaceUri=http%3A%2F%2Fidentifier.buildingsmart.org%2Furi%2Fbuildingsmart%2Fifc%2F4.3%2Fclass%2FIfcBridge&includeChildClassificationReferences=true
126 |
127 | Response body looks like:
128 | ```
129 | {
130 | "parentClassificationReference": {
131 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcFacility",
132 | "name": "IfcFacility",
133 | "code": "IfcFacility"
134 | },
135 | "classificationProperties": [
136 | {
137 | "propertyDomainName": "IFC",
138 | "propertyNamespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/prop/StructureIndicator",
139 | "name": "StructureIndicator",
140 | "propertySet": "Pset_BridgeCommon",
141 | "dataType": "PEnum_StructureIndicator",
142 | "values": [
143 | {
144 | "value": "COMPOSITE"
145 | },
146 | {
147 | "value": "HOMOGENEOUS"
148 | },
149 | {
150 | "value": "COATED"
151 | }
152 | ]
153 | }
154 | ],
155 | "childClassificationReferences": [
156 | {
157 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcBridge.CULVERT",
158 | "name": "IfcBridge.CULVERT",
159 | "code": "IfcBridge.CULVERT"
160 | },
161 | {
162 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/IfcBridge.CABLE_STAYED",
163 | "name": "IfcBridge.CABLE_STAYED",
164 | "code": "IfcBridge.CABLE_STAYED"
165 | },
166 | ...
167 | ```
168 |
169 | ## Further development (out of scope of hackathon)
170 |
171 | For a stable app and great user experience in a lot of circumstances you should make your app resilient to temporary failures. Depending on the failure it can make sense to try again in a few seconds. Most likely there are libraries available you can use to make your app more resilient to transient failures. For .NET for example, you should have a look at the library Polly.
172 |
173 | Needing more flexibility in the results returned from the API?
174 | Have a look at our GraphQL implementation: https://test.bsdd.buildingsmart.org/graphiql.
175 | With GraphQL you can specify the fields you need. Only those fields will be returnd by GraphQL.
176 |
177 | ## More good to know
178 |
179 | You've probably noted the "v2" in the API urls. In case your'e wondering why this is, this is the version number of the API method. If we change the behaviour of the API, or if we change the request parameters and/or response in a way that it is not backwards compatible anymore, the version number will be increased. So it is not necessary for you to immediately adjust your software. The old version will be supported for a long period afterwards. But you need to adjust your software to be able to take advantage of the changes.
180 | Please be aware that we can change the request parameters and/or response without increasing the version number, but only if it is an addition: your software does not need to be changed. For example, if we add an extra field to the response, the version number will not be increased. Your software should not fail if an extra field is returned. It probably will ignore it, but that's no problem, the behaviour stays the same.
--------------------------------------------------------------------------------
/Meetings/README.md:
--------------------------------------------------------------------------------
1 | Here we upload content used at various meetings and events for easier access.
2 |
--------------------------------------------------------------------------------
/Model/Exports/ExportDomain.xsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Model/Exports/ExportDomain.xsd
--------------------------------------------------------------------------------
/Model/Exports/copy-all-to-json.xslt:
--------------------------------------------------------------------------------
1 | {
2 | "OrganizationCode": "buildingsmart",
3 | "DomainCode": "ifc",
4 | "DomainVersion": "4.3",
5 | "DomainName": "IFC",
6 | "ReleaseDate": "2016-01-01",
7 | "LanguageIsoCode": "EN",
8 | "LanguageOnly": false,
9 | "License": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International",
10 | "LicenseUrl": "https://creativecommons.org/licenses/by-nc-nd/4.0/",
11 | "Status": "Released",
12 | "QualityAssuranceProcedure": "bSI process",
13 | "QualityAssuranceProcedureUrl": "https://www.buildingsmart.org/about/bsi-process",
14 | "Classifications": [
15 | {
16 | "Code": "ifcwall",
17 | "Name": "IfcWall",
18 | "Definition": "The wall represents a vertical construction that may bound or subdivide spaces. Wall are usually vertical, or nearly vertical, planar elements, often designed to bear structural loads. A wall is however S not required to be load bearing. .extDef NOTE Definition according to ISO 6707 1 vertical construction usually in masonry or in concrete which bounds or subdivides a construction works and fulfils a load bearing or retaining function. NOTE There is a representation of walls for structural analysis provided by a proper subtype of IfcStructuralMember being part of the IfcStructuralAnalysisModel . NOTE An arbitrary planar element to which this semantic information is not applicable is not predominantly vertical , shall be modeled as IfcPlate . A wall may have openings, such as wall openings, openings used for windows or doors, or niches and recesses. They are defined by an IfcOpeningElement attached to the wall using the inverse relationship HasOpenings pointing to IfcRelVoidsElement . NOTE Walls with openings that have already been modeled within the enclosing geometry may use the relationship IfcRelConnectsElements to associate the wall with embedded elements such as doors and windows. There are three entities for wall occurrences IfcWallStandardCase S used for all occurrences of walls, that have a non changing thickness along the wall path and where the thickness parameter can be fully described by a material layer set. These walls are always represented geometrically by an Axis and a SweptSolid shape representation or by a Clipping geometry based on SweptSolid , if a 3D geometric representation is assigned. In addition they have to have a corresponding IfcMaterialProfileSetUsage assigned. IfcWallElementedCase used for occurrences of walls which are aggregated from subordinate elements, following specific decomposition rules expressed by the mandatory use of IfcRelAggregates relationship. IfcWall S used for all other occurrences of wall, particularly for walls with changing thickness along the wall path e.g. polygonal walls , or walls with a non rectangular cross sections e.g. L shaped retaining walls , and walls having an extrusion axis that is unequal to the global Z axis of the project i.e. non vertical walls , or walls having only Brep , or SurfaceModel geometry. HISTORY New entity in IFC1.0 bSI Documentation",
19 | "Status": "Active",
20 | "ActivationDateUtc": "2010-09-08",
21 | "VersionDateUtc": "2001-01-01T00:00:00",
22 | "Synonyms": [],
23 | "ClassificationRelations": [
24 | {
25 | "RelationType": "IsEqualTo",
26 | "RelatedClassificationUri": "abcd"
27 | }
28 | ],
29 | "ClassificationProperties": [
30 | {
31 | "Code": "",
32 | "PropertyCode": "prop1",
33 | "ExternalPropertyUri": "",
34 | "Unit": "",
35 | "SortNumber": null,
36 | "Symbol": "",
37 | "PropertyType": "Property",
38 | "PropertySet": "",
39 | "PredefinedValue": "",
40 | "MinExclusive": null,
41 | "MaxExclusive": null,
42 | "Values": []
43 | }
44 | ]
45 | },
46 | {
47 | "Code": "class2",
48 | "Name": "Class 2",
49 | "Definition": "",
50 | "Status": "Active",
51 | "ActivationDateUtc": "2001-01-01T00:00:00",
52 | "RevisionDateUtc": null,
53 | "VersionDateUtc": "2001-01-01T00:00:00",
54 | "DeActivationDateUtc": null,
55 | "VersionNumber": null,
56 | "RevisionNumber": null,
57 | "ReplacedObjectCodes": [],
58 | "ReplacingObjectCodes": [],
59 | "DeprecationExplanation": "",
60 | "CreatorLanguageIsoCode": "",
61 | "VisualRepresentationUri": "",
62 | "CountriesOfUse": [],
63 | "SubdivisionsOfUse": [],
64 | "CountryOfOrigin": "NL",
65 | "DocumentReference": "",
66 | "ClassificationType": "Class",
67 | "ParentClassificationCode": "class1",
68 | "RelatedIfcEntityNamesList": [],
69 | "Synonyms": [],
70 | "ClassificationRelations": null,
71 | "ClassificationProperties": [
72 | {
73 | "Code": "",
74 | "PropertyCode": "prop2",
75 | "ExternalPropertyUri": "",
76 | "Unit": "mm",
77 | "SortNumber": null,
78 | "Symbol": "",
79 | "PropertyType": "Property",
80 | "PropertySet": "",
81 | "PredefinedValue": "",
82 | "MinInclusive": null,
83 | "MaxInclusive": null,
84 | "Values": []
85 | }
86 | ]
87 | }
88 | ],
89 | "Properties": [
90 | {
91 | "Code": "prop1",
92 | "Name": "Property 1",
93 | "Definition": "Some definition",
94 | "Status": "Active",
95 | "ActivationDateUtc": "2001-01-01T00:00:00",
96 | "RevisionDateUtc": null,
97 | "VersionDateUtc": "2001-01-01T00:00:00",
98 | "DeActivationDateUtc": null,
99 | "VersionNumber": 1,
100 | "RevisionNumber": 0,
101 | "ReplacedObjectCodes": [ "abc", "def" ],
102 | "ReplacingObjectCodes": [ "ghi", "jkl" ],
103 | "DeprecationExplanation": "Deprecated",
104 | "CreatorLanguageIsoCode": "nl-NL",
105 | "VisualRepresentationUri": null,
106 | "CountriesOfUse": [ "GB", "NL" ],
107 | "SubdivisionsOfUse": [ "NH" ],
108 | "CountryOfOrigin": "NL",
109 | "DocumentReference": "EN 196-3:2016",
110 | "Description": "Property description",
111 | "Example": "Example 1",
112 | "ConnectedPropertyCodes": [],
113 | "PhysicalQuantity": "",
114 | "Dimension": "",
115 | "DimensionMass": 2,
116 | "DimensionTime": -1,
117 | "MethodOfMeasurement": "",
118 | "DataType": "String",
119 | "Pattern": "[a-z",
120 | "IsDynamic": false,
121 | "DynamicParameterPropertyCodes": [],
122 | "Units": [ "mm", "cm" ],
123 | "AllowedValues": [],
124 | "TextFormat": ""
125 | },
126 | {
127 | "Code": "prop2",
128 | "Name": "Property 2",
129 | "Definition": "",
130 | "Status": "Active",
131 | "ActivationDateUtc": "2001-01-01T00:00:00",
132 | "RevisionDateUtc": null,
133 | "VersionDateUtc": "2001-01-01T00:00:00",
134 | "DeActivationDateUtc": null,
135 | "VersionNumber": null,
136 | "RevisionNumber": null,
137 | "ReplacedObjectCodes": [],
138 | "ReplacingObjectCodes": [],
139 | "DeprecationExplanation": "",
140 | "CreatorLanguageIsoCode": "",
141 | "VisualRepresentationUri": "",
142 | "CountriesOfUse": [],
143 | "SubdivisionsOfUse": [],
144 | "CountryOfOrigin": "",
145 | "DocumentReference": "",
146 | "Description": "",
147 | "Example": "",
148 | "ConnectedPropertyCodes": [],
149 | "PhysicalQuantity": "",
150 | "Dimension": null,
151 | "DimensionLength": -1,
152 | "DimensionMass": 2,
153 | "DimensionTime": 0,
154 | "DimensionElectricCurrent": 0,
155 | "DimensionThermodynamicTemperature": 0,
156 | "DimensionAmountOfSubstance": 0,
157 | "DimensionLuminousIntensity": 0,
158 | "MethodOfMeasurement": "",
159 | "DataType": "Integer",
160 | "IsDynamic": false,
161 | "DynamicParameterPropertyCodes": [],
162 | "Units": [],
163 | "AllowedValues": [],
164 | "TextFormat": ""
165 | }
166 | ]
167 | }
--------------------------------------------------------------------------------
/Model/Exports/copy-all.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Model/Exports/export-example.xslt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | -
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Model/Import Model/README.md:
--------------------------------------------------------------------------------
1 | You can find all the bSDD documentation in [Documentation](/Documentation/) folder. When it comes to importing, we recommend reading about:
2 | [bSDD JSON import model](/Documentation/bSDD%20JSON%20import%20model.md), explaining what content can be stored in bSDD, and [bSDD import tutorial](/Documentation/bSDD%20import%20tutorial.md) with guidance on uploading that to the bSDD.
3 |
4 | If you have any questions regarding this subject, contact us: [CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h)
5 |
6 |
--------------------------------------------------------------------------------
/Model/Import Model/bsdd-import-model.json:
--------------------------------------------------------------------------------
1 | {
2 | "ModelVersion": "2.0",
3 | "OrganizationCode": null,
4 | "DictionaryCode": null,
5 | "DictionaryName": null,
6 | "DictionaryVersion": null,
7 | "LanguageIsoCode": null,
8 | "LanguageOnly": false,
9 | "UseOwnUri": false,
10 | "DictionaryUri": null,
11 | "License": null,
12 | "LicenseUrl": null,
13 | "ChangeRequestEmailAddress": null,
14 | "MoreInfoUrl": null,
15 | "QualityAssuranceProcedure": null,
16 | "QualityAssuranceProcedureUrl": null,
17 | "ReleaseDate": null,
18 | "Status": null,
19 | "Classes": [
20 | {
21 | "Code": null,
22 | "Name": null,
23 | "ClassType": null,
24 | "Definition": null,
25 | "Description": null,
26 | "ParentClassCode": null,
27 | "RelatedIfcEntityNamesList": [],
28 | "Synonyms": [],
29 | "ActivationDateUtc": null,
30 | "ReferenceCode": null,
31 | "CountriesOfUse": [],
32 | "CountryOfOrigin": null,
33 | "CreatorLanguageIsoCode": null,
34 | "DeActivationDateUtc": null,
35 | "DeprecationExplanation": null,
36 | "DocumentReference": null,
37 | "OwnedUri": null,
38 | "ReplacedObjectCodes": [],
39 | "ReplacingObjectCodes": [],
40 | "RevisionDateUtc": null,
41 | "RevisionNumber": null,
42 | "Status": null,
43 | "SubdivisionsOfUse": [],
44 | "Uid": null,
45 | "VersionDateUtc": null,
46 | "VersionNumber": null,
47 | "VisualRepresentationUri": null,
48 | "ClassProperties": [
49 | {
50 | "Code": null,
51 | "PropertyCode": null,
52 | "PropertyUri": null,
53 | "Description": null,
54 | "PropertySet": null,
55 | "Unit": null,
56 | "PredefinedValue": null,
57 | "IsRequired": null,
58 | "IsWritable": null,
59 | "MaxExclusive": null,
60 | "MaxInclusive": null,
61 | "MinExclusive": null,
62 | "MinInclusive": null,
63 | "Pattern": null,
64 | "OwnedUri": null,
65 | "PropertyType": null,
66 | "SortNumber": null,
67 | "Symbol": null,
68 | "AllowedValues": [
69 | {
70 | "Code": null,
71 | "Value": null,
72 | "Description": null,
73 | "Uri": null,
74 | "SortNumber": null,
75 | "OwnedUri": null
76 | }
77 | ]
78 | }
79 | ],
80 | "ClassRelations": [
81 | {
82 | "RelationType": null,
83 | "RelatedClassUri": null,
84 | "RelatedClassName": null,
85 | "Fraction": null,
86 | "OwnedUri": null
87 | }
88 | ]
89 | }
90 | ],
91 | "Properties": [
92 | {
93 | "Code": null,
94 | "Name": null,
95 | "Definition": null,
96 | "Description": null,
97 | "DataType": null,
98 | "Units": [],
99 | "Example": null,
100 | "ActivationDateUtc": null,
101 | "ConnectedPropertyCodes": [],
102 | "CountriesOfUse": [],
103 | "CountryOfOrigin": null,
104 | "CreatorLanguageIsoCode": null,
105 | "DeActivationDateUtc": null,
106 | "DeprecationExplanation": null,
107 | "Dimension": null,
108 | "DimensionLength": null,
109 | "DimensionMass": null,
110 | "DimensionTime": null,
111 | "DimensionElectricCurrent": null,
112 | "DimensionThermodynamicTemperature": null,
113 | "DimensionAmountOfSubstance": null,
114 | "DimensionLuminousIntensity": null,
115 | "DocumentReference": null,
116 | "DynamicParameterPropertyCodes": [],
117 | "IsDynamic": false,
118 | "MaxExclusive": null,
119 | "MaxInclusive": null,
120 | "MinExclusive": null,
121 | "MinInclusive": null,
122 | "MethodOfMeasurement": null,
123 | "OwnedUri": null,
124 | "Pattern": null,
125 | "PhysicalQuantity": null,
126 | "PropertyValueKind": null,
127 | "ReplacedObjectCodes": [],
128 | "ReplacingObjectCodes": [],
129 | "RevisionDateUtc": null,
130 | "RevisionNumber": null,
131 | "Status": null,
132 | "SubdivisionsOfUse": [],
133 | "TextFormat": null,
134 | "Uid": null,
135 | "VersionDateUtc": null,
136 | "VersionNumber": null,
137 | "VisualRepresentationUri": null,
138 | "PropertyRelations": [
139 | {
140 | "RelatedPropertyName": null,
141 | "RelatedPropertyUri": null,
142 | "RelationType": null,
143 | "OwnedUri": null
144 | }
145 | ],
146 | "AllowedValues": [
147 | {
148 | "Code": null,
149 | "Value": null,
150 | "Description": null,
151 | "Uri": null,
152 | "SortNumber": null,
153 | "OwnedUri": null
154 | }
155 | ]
156 | }
157 | ]
158 | }
159 |
--------------------------------------------------------------------------------
/Model/Import Model/examples/bs-agri-machines-example.json:
--------------------------------------------------------------------------------
1 | {
2 | "ModelVersion": "2.0",
3 | "OrganizationCode": "bs-agri",
4 | "DictionaryCode": "agri-machine",
5 | "DictionaryVersion": "0.1",
6 | "DictionaryName": "Agricultural machinery (private)",
7 | "ReleaseDate": "2023-02-05",
8 | "IsPrivate": true,
9 | "Status": "Preview",
10 | "MoreInfoUrl": null,
11 | "UseOwnUri": false,
12 | "DictionaryUri": null,
13 | "LanguageIsoCode": "en-US",
14 | "LanguageOnly": false,
15 | "License": "No license",
16 | "LicenseUrl": null,
17 | "QualityAssuranceProcedure": "Use at own risk - this is for demo purposes only",
18 | "QualityAssuranceProcedureUrl": null,
19 | "Classes": [
20 | {
21 | "Code": "plow",
22 | "Name": "Plow",
23 | "Definition": "Machine for plowing your land",
24 | "Status": "Active",
25 | "ActivationDateUtc": "2022-09-26",
26 | "RevisionDateUtc": null,
27 | "VersionDateUtc": "2022-09-26",
28 | "DeActivationDateUtc": null,
29 | "VersionNumber": 1,
30 | "RevisionNumber": 0,
31 | "ReplacedObjectCodes": [],
32 | "ReplacingObjectCodes": [],
33 | "DeprecationExplanation": null,
34 | "CreatorLanguageIsoCode": "en-US",
35 | "VisualRepresentationUri": null,
36 | "CountriesOfUse": [
37 | "GB",
38 | "NL",
39 | "IT",
40 | "BE"
41 | ],
42 | "SubdivisionsOfUse": [],
43 | "CountryOfOrigin": null,
44 | "DocumentReference": null,
45 | "Synonyms": [],
46 | "ReferenceCode": "plow",
47 | "ParentClassCode": null,
48 | "RelatedIfcEntityNamesList": [],
49 | "ClassProperties": []
50 | },
51 | {
52 | "Code": "disc-plow",
53 | "Name": "Disc plow",
54 | "Definition": "Plow consisting of one or more discs",
55 | "Status": "Active",
56 | "ActivationDateUtc": "2022-09-26",
57 | "RevisionDateUtc": null,
58 | "VersionDateUtc": "2022-09-26",
59 | "DeActivationDateUtc": null,
60 | "VersionNumber": 1,
61 | "RevisionNumber": 0,
62 | "ReplacedObjectCodes": [],
63 | "ReplacingObjectCodes": [],
64 | "DeprecationExplanation": null,
65 | "CreatorLanguageIsoCode": "en-US",
66 | "Synonyms": [ "Disk plow" ],
67 | "ParentClassCode": "plow",
68 | "ClassProperties": [
69 | {
70 | "Code": "number-of-discs",
71 | "Description": "Number of discs",
72 | "IsRequired": true,
73 | "IsWritable": true,
74 | "MaxExclusive": null,
75 | "MaxInclusive": 10,
76 | "MinExclusive": null,
77 | "MinInclusive": 1,
78 | "PropertyCode": "number",
79 | "PropertyUri": null,
80 | "PropertySet": null,
81 | "PropertyType": "Property",
82 | "SortNumber": null,
83 | "Symbol": null,
84 | "Unit": null
85 | }
86 | ]
87 | }
88 | ],
89 | "Properties": [
90 | {
91 | "Code": "number",
92 | "Name": "Number",
93 | "Definition": "Generic positive integer number",
94 | "Status": "Active",
95 | "ActivationDateUtc": "2019-01-25",
96 | "RevisionDateUtc": "2022-09-26",
97 | "VersionDateUtc": "2021-10-01",
98 | "DeActivationDateUtc": null,
99 | "VersionNumber": 1,
100 | "RevisionNumber": 0,
101 | "CreatorLanguageIsoCode": "en-US",
102 | "Example": "For example, the space that a substance or 3D shape occupies or contains.",
103 | "DataType": "Integer",
104 | "PropertyValueKind": "Single",
105 | "MinInclusive": 0,
106 | "IsDynamic": false
107 | }
108 | ]
109 | }
--------------------------------------------------------------------------------
/Model/Import Model/examples/bsdd-minimum-import-file.json:
--------------------------------------------------------------------------------
1 | {
2 | "ModelVersion": "2.0",
3 | "OrganizationCode": "text",
4 | "DictionaryCode": "text",
5 | "DictionaryVersion": "text",
6 | "DictionaryName": "text",
7 | "LanguageIsoCode": "text",
8 | "LanguageOnly": false,
9 | "UseOwnUri": false,
10 | "Classes": [
11 | {
12 | "Code": "text",
13 | "Name": "text",
14 | "ClassType": "text",
15 | "ClassRelations": [
16 | {
17 | "RelationType": "text",
18 | "RelatedClassUri": "text"
19 | }
20 | ],
21 | "ClassProperties": [
22 | {
23 | "Code": "text",
24 | "PropertyCode": "text",
25 | "PropertyUri": "text",
26 | "AllowedValues": [
27 | {
28 | "Code": "text",
29 | "Value": "text"
30 | }
31 | ]
32 | }
33 | ]
34 | }
35 | ],
36 | "Properties": [
37 | {
38 | "Code": "text",
39 | "Description": "text",
40 | "Name": "text",
41 |
42 | "AllowedValues": [
43 | {
44 | "Code": "text",
45 | "Value": "text"
46 | }
47 | ],
48 |
49 | "PropertyRelations": [
50 | {
51 | "RelationType": "text",
52 | "RelatedPropertyUri": "text"
53 | }
54 | ]
55 | }
56 | ]
57 | }
--------------------------------------------------------------------------------
/Model/Import Model/examples/fruit_and_vegetables/bs-agri-veg-example-nl-NL.json:
--------------------------------------------------------------------------------
1 | {
2 | "ModelVersion": "2.0",
3 | "OrganizationCode": "bs-agri",
4 | "DictionaryCode": "fruitvegs",
5 | "DictionaryVersion": "1.0",
6 | "DictionaryName": "Fruit and vegetables",
7 | "LanguageIsoCode": "nl-NL",
8 | "LanguageOnly": true,
9 | "License": "Geen licentie",
10 | "Classes": [
11 | {
12 | "Code": "fruit",
13 | "Name": "Fruit",
14 | "Definition": "Fruit is de verzamelnaam voor eetbare vruchten van plantensoorten en -rassen, en daarop gelijkende schijnvruchten zoals aardbei, vijg, ananas, appel en peer"
15 | },
16 | {
17 | "Code": "veg",
18 | "Name": "Groente",
19 | "Definition": "Een plant of onderdeel van plant dat gegeten kan worden"
20 | },
21 | {
22 | "Code": "apple",
23 | "Name": "Appel",
24 | "Definition": "De appel is de pitvrucht van de plant Malus domestica uit de rozenfamilie (Rosaceae).",
25 | "ClassProperties": [
26 | {
27 | "PropertyCode": "volume",
28 | "PropertySet": "SizeSet",
29 | "Description": "Het volume van een appel"
30 | },
31 | {
32 | "PropertyCode": "height",
33 | "PropertySet": "SizeSet",
34 | "Description": "De hoogte van een appel"
35 | }
36 | ]
37 | },
38 | {
39 | "Code": "grannysmith",
40 | "Name": "Granny Smith",
41 | "Definition": "De granny smith is een populair appelras, afkomstig uit Australië. Dit ras werd rond 1865 door Marie Ana (Granny) Smith gekweekt. Er wordt verondersteld dat het een kruising is van de Malus sylvestris, de wilde appel, met een gedomesticeerd appelras.",
42 | "Synonyms": [
43 | "Groene appel",
44 | "Zure appel"
45 | ],
46 | "ClassProperties": [
47 | {
48 | "AllowedValues": [
49 | {
50 | "Code": "green",
51 | "Value": "Groen"
52 | },
53 | {
54 | "Code": "yellow",
55 | "Value": "Geel"
56 | }
57 | ],
58 | "PropertyCode": "color",
59 | "Description": "De kleur van een Granny Smith"
60 | },
61 | {
62 | "AllowedValues": [],
63 | "PropertyCode": "height",
64 | "PropertySet": "SizeSet",
65 | "Description": "De hoogte van een Granny Smith"
66 | }
67 | ]
68 | },
69 | {
70 | "Code": "tomato",
71 | "Name": "Tomato",
72 | "Definition": "Eetbare vrucht van de plant Solanum lycopersicum",
73 | "Synonyms": [
74 | "Liefdes appel"
75 | ],
76 | "ClassProperties": [
77 | {
78 | "AllowedValues": [
79 | {
80 | "Code": "green",
81 | "Value": "Groen",
82 | "Description": "Dan is ie nog niet rijp"
83 | },
84 | {
85 | "Code": "yellow",
86 | "Value": "Geel",
87 | "Description": null
88 | },
89 | {
90 | "Code": "red",
91 | "Value": "Rood",
92 | "Description": null
93 | }
94 | ],
95 | "PropertyCode": "color",
96 | "Description": "De kleur van een tomaat"
97 | }
98 | ]
99 | }
100 | ],
101 | "Properties": [
102 | {
103 | "Code": "volume",
104 | "Name": "Volume",
105 | "Definition": "De inhoud of het volume van een voorwerp (lichaam) is de grootte van het gebied dat door dit voorwerp wordt ingenomen in de driedimensionale ruimte",
106 | "MethodOfMeasurement": "Archimedes’ Gold Crown methode"
107 | },
108 | {
109 | "Code": "height",
110 | "Name": "Height",
111 | "Definition": "Afstand van bodem tot top"
112 | },
113 | {
114 | "Code": "color",
115 | "Name": "Color",
116 | "Definition": "Kleur is een eigenschap van licht die wordt bepaald door de verschillende golflengtes waaruit dat licht is samengesteld",
117 | "AllowedValues": [
118 | {
119 | "Code": "red",
120 | "Value": "Rood",
121 | "Description": "Rood"
122 | },
123 | {
124 | "Code": "yellow",
125 | "Value": "Geel",
126 | "Description": null
127 | },
128 | {
129 | "Code": "green",
130 | "Value": "Groen",
131 | "Description": null
132 | },
133 | {
134 | "Code": "blue",
135 | "Value": "Blauw",
136 | "Description": null
137 | }
138 | ]
139 | },
140 | {
141 | "Code": "water",
142 | "Name": "Water",
143 | "Definition": "Water is de chemische verbinding van twee waterstofatomen en een zuurstofatoom",
144 | "Synonyms": [
145 | "H2O"
146 | ]
147 | },
148 | {
149 | "Code": "fiber",
150 | "Name": "Vezel",
151 | "Definition": "Een vezel is een dun filament van een beperkte lengte (10 tot 500 mm) die ten minste drie keer zo groot is als de diameter. Vezels kunnen onderscheiden worden in plantaardige, dierlijke en synthetische."
152 | }
153 | ]
154 | }
--------------------------------------------------------------------------------
/Model/Import Model/examples/molio/readme.md:
--------------------------------------------------------------------------------
1 |
2 | (C) Molio, published under the MIT license.
3 |
4 | Example of "CCI Construction 1.0" as published in the bSDD production version in 2021.
5 | Search this domain for example for wall here: https://search.bsdd.buildingsmart.org/?SearchText=wall&Command=Search&TypeFilter=All&SelectedDomains=%3B17%3B
6 |
7 | This JSON file is used to publish the CCI Construction dataset to bSDD. It shows how IFC properties are linked to CCI classes, and how the specialisation structure is created.
8 | It serves as a good example for others that want to inpout their data into the bSDD.
9 |
10 | More info on https://anvisninger.molio.dk/Gratis-vaerktojer/CCI_Klassifikation
11 |
12 |
--------------------------------------------------------------------------------
/Model/Import Model/spreadsheet-import/Excel2bSDD_template.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buildingSMART/bSDD/ec07a53a981abd75830179400c2b57ce721b6a28/Model/Import Model/spreadsheet-import/Excel2bSDD_template.xlsx
--------------------------------------------------------------------------------
/Model/Import Model/spreadsheet-import/README.md:
--------------------------------------------------------------------------------
1 | The desired input format to bSDD is JSON, and there are various ways and tools that allow you to create it. We added the Excel template for those of you that prefer this form. Since spreadhsheets are based on rows and columns, and JSON allows for multilevel hierarchies of data, we needed to add few fields that allow for conversion from Excel to JSON files.
2 |
3 | Once you have your dictionary prepared in Excel, we offer this Python script to convert Excel files to JSON. This is an auxiliary helping tool on request of users, not a necessary step to import anything to bSDD. If you're not familiar with basics of Python, we recommend to use a dedicated software instead.
4 |
5 | Please report if you experience any problems with using it. We advise to always review the output before uploading to bSDD.
6 |
7 | ## Using the Python converter
8 |
9 | 1. You need to have Python installed. If not, download and install python from here: https://www.python.org/downloads/.
10 | 2. You need to install a few Python libraries. If you don't have them already, type in the console: `pip install numpy pandas openpyxl tqdm`
11 | (note: system console, not a Python console. To open on Windows, find 'Command Prompt' app)
12 | 4. Copy the Excel template and fill in with your data. All the fields marked with * are mandatory if a row is in use.
13 | 5. Save and close the Excel file.
14 | 6. Run the Python script Excel2bSDD_converter.py with these arguments:
15 | * EXCEL_PATH (path to your Excel file)
16 | * JSON_TEMPLATE_PATH (path where the template JSON file is located. You can find this file in the bSDD/Model/Import Model)
17 | * JSON_OUTPUT_PATH (path where you want to create the resultant JSON file, should end with ".JSON")
18 | * WITHOUT_NULLS (set to 'True' to produce a minimal JSON only with fields filled in Excel, 'False' to also export all empty fields with 'null' assigned)
19 |
20 | You can do that from the (Windows) console with:
21 | ```Python Excel2bSDD_converter.py "C:\...\Excel_file.xlsx" "C:\...\Template.json" "C:\...\Result.json" False```
22 |
--------------------------------------------------------------------------------
/RDF/README.md:
--------------------------------------------------------------------------------
1 | You can find the documentation in [/Documentation/RDF](/Documentation/RDF.md).
2 |
--------------------------------------------------------------------------------
/RDF/preview-bsdd-rdfs-0.3.ttl:
--------------------------------------------------------------------------------
1 | # baseURI: https://bsdd.buildingsmart.org/rdfs/def
2 | # prefix: bsdd
3 |
4 | @prefix bsdd: .
5 | @prefix owl: .
6 | @prefix rdf: .
7 | @prefix rdfs: .
8 | @prefix skos: .
9 | @prefix xsd: .
10 |
11 |
12 | a owl:Ontology ;
13 | .
14 |
15 | bsdd:Domain a rdfs:Class ;
16 | skos:prefLabel "Domain"@en .
17 |
18 | bsdd:Organization a rdfs:Class ;
19 | skos:prefLabel "Organization"@en .
20 |
21 | bsdd:Code a rdf:Property ;
22 | skos:prefLabel "Code"@en ;
23 | rdfs:range xsd:string .
24 |
25 | bsdd:Version a rdf:Property ;
26 | skos:prefLabel "Version"@en ;
27 | rdfs:range xsd:string .
28 |
29 | bsdd:Name a rdf:Property ;
30 | skos:prefLabel "Name"@en ;
31 | owl:equivalentProperty skos:prefLabel ;
32 | rdfs:range xsd:string .
33 |
34 | bsdd:ReleaseDate a rdf:Property ;
35 | skos:prefLabel "releaseDate"@en ;
36 | rdfs:range xsd:dateTime .
37 |
38 | bsdd:Status a rdf:Property ;
39 | skos:prefLabel "status"@en ;
40 | rdfs:range xsd:string .
41 |
42 | bsdd:MoreInfoUrl a rdf:Property ;
43 | skos:prefLabel "moreInfoUrl"@en ;
44 | rdfs:range xsd:string .
45 |
46 | bsdd:NamespaceUri a rdf:Property ;
47 | skos:prefLabel "NamespaceUri"@en ;
48 | rdfs:range xsd:string .
49 |
50 | bsdd:LanguageIsoCode a rdf:Property ;
51 | skos:prefLabel "LanguageIsoCode"@en ;
52 | rdfs:range xsd:string .
53 |
54 | bsdd:License a rdf:Property ;
55 | skos:prefLabel "License"@en ;
56 | rdfs:range xsd:string .
57 |
58 | bsdd:LicenseUrl a rdf:Property ;
59 | skos:prefLabel "LicenseUrl"@en ;
60 | rdfs:range xsd:string .
61 |
62 | bsdd:QualityAssuranceProcedure a rdf:Property ;
63 | skos:prefLabel "Quality Assurance Procedure"@en ;
64 | rdfs:range xsd:string .
65 |
66 | bsdd:QualityAssuranceProcedureUrl a rdf:Property ;
67 | skos:prefLabel "Quality Assurance Procedure URL"@en ;
68 | rdfs:range xsd:string .
69 |
70 | bsdd:Classification a rdfs:Class ;
71 | skos:prefLabel "Classification"@en .
72 |
73 | bsdd:UID a rdf:Property ;
74 | skos:prefLabel "Unique IDentification"@en ;
75 | owl:equivalentProperty skos:notation ;
76 | rdfs:range xsd:string .
77 |
78 | bsdd:Definition a rdf:Property ;
79 | skos:prefLabel "definition"@en ;
80 | owl:equivalentProperty skos:definition ;
81 | rdfs:range xsd:string .
82 |
83 | bsdd:Status a rdf:Property ;
84 | skos:prefLabel "status"@en ;
85 | rdfs:range xsd:string .
86 |
87 | bsdd:ActivationDateUtc a rdf:Property ;
88 | skos:prefLabel "activationDateUtc"@en ;
89 | rdfs:range xsd:dateTime .
90 |
91 | bsdd:RevisionDateUtc a rdf:Property ;
92 | skos:prefLabel "revisionDateUtc"@en ;
93 | rdfs:range xsd:dateTime .
94 |
95 | bsdd:VersionDateUtc a rdf:Property ;
96 | skos:prefLabel "Version Date Utc"@en ;
97 | rdfs:range xsd:dateTime .
98 |
99 | bsdd:DeActivationDateUtc a rdf:Property ;
100 | skos:prefLabel "Deactivation Date Utc"@en ;
101 | rdfs:range xsd:dateTime .
102 |
103 | bsdd:VersionNumber a rdf:Property ;
104 | skos:prefLabel "Version Number"@en ;
105 | rdfs:range xsd:integer .
106 |
107 | bsdd:RevisionNumber a rdf:Property ;
108 | skos:prefLabel "Revision Number"@en ;
109 | rdfs:range xsd:integer .
110 |
111 | bsdd:ReplacedObjectCode a rdf:Property ;
112 | skos:prefLabel "Replaced Object Code"@en ;
113 | rdfs:range xsd:string .
114 |
115 | bsdd:replacingObjectCode a rdf:Property ;
116 | skos:prefLabel "Replacing Object Code"@en ;
117 | rdfs:range xsd:string .
118 |
119 | bsdd:DeprecationExplanation a rdf:Property ;
120 | skos:prefLabel "Deprecation Explanation"@en ;
121 | rdfs:range xsd:string .
122 |
123 | bsdd:CreatorLanguageIsoCode a rdf:Property ;
124 | skos:prefLabel "Creator Language ISO Code"@en ;
125 | rdfs:range xsd:string .
126 |
127 | bsdd:VisualRepresentationUri a rdf:Property ;
128 | skos:prefLabel "Vvisual Representation URI"@en ;
129 | rdfs:range xsd:string .
130 |
131 | bsdd:CountryOfUse a rdf:Property ;
132 | skos:prefLabel "Country Of Use"@en ;
133 | rdfs:range xsd:string .
134 |
135 | bsdd:SubdivisionOfUse a rdf:Property ;
136 | skos:prefLabel "Subdivision Of Use"@en ;
137 | rdfs:range xsd:string .
138 |
139 | bsdd:CountryOfOrigin a rdf:Property ;
140 | skos:prefLabel "Country Of Origin"@en ;
141 | rdfs:range xsd:string .
142 |
143 | bsdd:DocumentReference a rdf:Property ;
144 | skos:prefLabel "Document Reference"@en ;
145 | rdfs:range xsd:string .
146 |
147 | bsdd:ClassificationType a rdf:Property ;
148 | skos:prefLabel "Classification Type"@en ;
149 | rdfs:range xsd:string .
150 |
151 | bsdd:ParentClassificationCode a rdf:Property ;
152 | skos:prefLabel "Pparent Classification Code"@en ;
153 | rdfs:range xsd:string .
154 |
155 | bsdd:Synonym a rdf:Property ;
156 | skos:prefLabel "Synonym"@en ;
157 | rdfs:range xsd:string .
158 |
159 | bsdd:ClassificationRelation a rdfs:Class ;
160 | skos:prefLabel "ClassificationRelation"@en .
161 |
162 | bsdd:RelationType a rdf:Property ;
163 | skos:prefLabel "Relation Type"@en ;
164 | rdfs:range xsd:string .
165 |
166 | bsdd:RelatedClassificationUri a rdf:Property ;
167 | skos:prefLabel "RelatedClassificationUri"@en ;
168 | rdfs:range xsd:string .
169 |
170 | bsdd:ClassificationProperty a rdfs:Class ;
171 | skos:prefLabel "Classification Property"@en .
172 |
173 | bsdd:PropertyCode a rdf:Property ;
174 | skos:prefLabel "Property Code"@en ;
175 | rdfs:range xsd:string .
176 |
177 | bsdd:PropertySet a rdf:Property ;
178 | skos:prefLabel "PropertySet"@en ;
179 | rdfs:range xsd:string .
180 |
181 | bsdd:ExternalPropertyUri a rdf:Property ;
182 | skos:prefLabel "ExternalPropertyUri"@en ;
183 | rdfs:range xsd:string .
184 |
185 | bsdd:Uunit a rdf:Property ;
186 | skos:prefLabel "unit"@en ;
187 | rdfs:range xsd:string .
188 |
189 | bsdd:QudtUunit a rdf:Property ;
190 | skos:prefLabel "QUDT reference"@en .
191 |
192 | bsdd:SortNumber a rdf:Property ;
193 | skos:prefLabel "Sort Number"@en ;
194 | rdfs:range xsd:integer .
195 |
196 | bsdd:Symbol a rdf:Property ;
197 | skos:prefLabel "Symbol"@en ;
198 | rdfs:range xsd:string .
199 |
200 | bsdd:PropertyType a rdf:Property ;
201 | skos:prefLabel "Property Type"@en ;
202 | rdfs:range xsd:string .
203 |
204 | bsdd:PredefinedValue a rdf:Property ;
205 | skos:prefLabel "Ppredefined Value"@en ;
206 | rdfs:range xsd:string .
207 |
208 | bsdd:MinInclusive a rdf:Property ;
209 | skos:prefLabel "Min Inclusive"@en ;
210 | rdfs:range xsd:float .
211 |
212 | bsdd:MaxInclusive a rdf:Property ;
213 | skos:prefLabel "Max Inclusive"@en ;
214 | rdfs:range xsd:float .
215 |
216 | bsdd:MinExclusive a rdf:Property ;
217 | skos:prefLabel "Min Exclusive"@en ;
218 | rdfs:range xsd:float .
219 |
220 | bsdd:MaxExclusive a rdf:Property ;
221 | skos:prefLabel "MaxExclusive"@en ;
222 | rdfs:range xsd:float .
223 |
224 | bsdd:Pattern a rdf:Property ;
225 | skos:prefLabel "Pattern"@en ;
226 | rdfs:range xsd:string .
227 |
228 | bsdd:AllowedValue a rdfs:Class ;
229 | skos:prefLabel "AllowedValue"@en .
230 |
231 | bsdd:Value a rdf:Property ;
232 | skos:prefLabel "value"@en ;
233 | rdfs:range xsd:string .
234 |
235 | bsdd:Description a rdf:Property ;
236 | skos:prefLabel "Description"@en ;
237 | rdfs:range xsd:string.
238 |
--------------------------------------------------------------------------------
/RDF/preview-bsdd-rdfs-0.4.ttl:
--------------------------------------------------------------------------------
1 | # baseURI: https://bsdd.buildingsmart.org/rdfs/def
2 | # prefix: bsdd
3 |
4 | @prefix bsdd: .
5 | @prefix owl: .
6 | @prefix rdf: .
7 | @prefix rdfs: .
8 | @prefix skos: .
9 | @prefix xsd: .
10 | @prefix qudt: .
11 |
12 |
13 | a owl:Ontology ;
14 | .
15 |
16 | bsdd:Domain a rdfs:Class ;
17 | skos:prefLabel "Domain"@en .
18 |
19 | bsdd:Organization a rdfs:Class ;
20 | skos:prefLabel "Organization"@en .
21 |
22 | bsdd:Code a rdf:Property ;
23 | skos:prefLabel "Code"@en ;
24 | rdfs:range xsd:string .
25 |
26 | bsdd:Version a rdf:Property ;
27 | skos:prefLabel "Version"@en ;
28 | rdfs:range xsd:string .
29 |
30 | bsdd:Name a rdf:Property ;
31 | skos:prefLabel "Name"@en ;
32 | owl:equivalentProperty skos:prefLabel ;
33 | rdfs:range xsd:string .
34 |
35 | bsdd:ReleaseDate a rdf:Property ;
36 | skos:prefLabel "Release Date"@en ;
37 | rdfs:range xsd:date .
38 |
39 | bsdd:Status a rdf:Property ;
40 | skos:prefLabel "Status"@en ;
41 | rdfs:range xsd:string .
42 |
43 | bsdd:MoreInfoUrl a rdf:Property ;
44 | skos:prefLabel "More Info URL"@en ;
45 | rdfs:range xsd:string .
46 |
47 | bsdd:NamespaceUri a rdf:Property ;
48 | skos:prefLabel "Namespace URI"@en ;
49 | rdfs:range xsd:anyURI .
50 |
51 | bsdd:LanguageIsoCode a rdf:Property ;
52 | skos:prefLabel "Language ISO Code"@en ;
53 | rdfs:range xsd:language .
54 |
55 | bsdd:License a rdf:Property ;
56 | skos:prefLabel "License"@en ;
57 | rdfs:range xsd:string .
58 |
59 | bsdd:LicenseUrl a rdf:Property ;
60 | skos:prefLabel "License URL"@en ;
61 | rdfs:range xsd:anyURI .
62 |
63 | bsdd:QualityAssuranceProcedure a rdf:Property ;
64 | skos:prefLabel "Quality Assurance Procedure"@en ;
65 | rdfs:range xsd:string .
66 |
67 | bsdd:QualityAssuranceProcedureUrl a rdf:Property ;
68 | skos:prefLabel "Quality Assurance Procedure URL"@en ;
69 | rdfs:range xsd:anyURI .
70 |
71 | bsdd:Classification a rdfs:Class ;
72 | skos:prefLabel "Classification"@en .
73 |
74 | bsdd:UID a rdf:Property ;
75 | skos:prefLabel "Unique Identification"@en ;
76 | owl:equivalentProperty skos:notation ;
77 | rdfs:range xsd:string .
78 |
79 | bsdd:Definition a rdf:Property ;
80 | skos:prefLabel "Definition"@en ;
81 | owl:equivalentProperty skos:definition ;
82 | rdfs:range xsd:string .
83 |
84 | bsdd:Status a rdf:Property ;
85 | skos:prefLabel "Status"@en ;
86 | rdfs:range xsd:string .
87 |
88 | bsdd:ActivationDateUtc a rdf:Property ;
89 | skos:prefLabel "Activation Date UTC"@en ;
90 | rdfs:range xsd:date .
91 |
92 | bsdd:RevisionDateUtc a rdf:Property ;
93 | skos:prefLabel "Revision Date UTC"@en ;
94 | rdfs:range xsd:date .
95 |
96 | bsdd:VersionDateUtc a rdf:Property ;
97 | skos:prefLabel "Version Date UTC"@en ;
98 | rdfs:range xsd:date .
99 |
100 | bsdd:DeActivationDateUtc a rdf:Property ;
101 | skos:prefLabel "Deactivation Date UTC"@en ;
102 | rdfs:range xsd:date .
103 |
104 | bsdd:VersionNumber a rdf:Property ;
105 | skos:prefLabel "Version Number"@en ;
106 | rdfs:range xsd:integer .
107 |
108 | bsdd:RevisionNumber a rdf:Property ;
109 | skos:prefLabel "Revision Number"@en ;
110 | rdfs:range xsd:integer .
111 |
112 | bsdd:ReplacedObjectCode a rdf:Property ;
113 | skos:prefLabel "Replaced Object Code"@en ;
114 | rdfs:range xsd:string .
115 |
116 | bsdd:ReplacingObjectCode a rdf:Property ;
117 | skos:prefLabel "Replacing Object Code"@en ;
118 | rdfs:range xsd:string .
119 |
120 | bsdd:DeprecationExplanation a rdf:Property ;
121 | skos:prefLabel "Deprecation Explanation"@en ;
122 | rdfs:range xsd:string .
123 |
124 | bsdd:CreatorLanguageIsoCode a rdf:Property ;
125 | skos:prefLabel "Creator Language ISO Code"@en ;
126 | rdfs:range xsd:language .
127 |
128 | bsdd:VisualRepresentationUri a rdf:Property ;
129 | skos:prefLabel "Visual Representation URI"@en ;
130 | rdfs:range xsd:anyURI .
131 |
132 | bsdd:CountryOfUse a rdf:Property ;
133 | skos:prefLabel "Country Of Use"@en ;
134 | rdfs:range xsd:string .
135 |
136 | bsdd:SubdivisionOfUse a rdf:Property ;
137 | skos:prefLabel "Subdivision Of Use"@en ;
138 | rdfs:range xsd:string .
139 |
140 | bsdd:CountryOfOrigin a rdf:Property ;
141 | skos:prefLabel "Country Of Origin"@en ;
142 | rdfs:range xsd:string .
143 |
144 | bsdd:DocumentReference a rdf:Property ;
145 | skos:prefLabel "Document Reference"@en ;
146 | rdfs:range xsd:string .
147 |
148 | bsdd:ClassificationType a rdf:Property ;
149 | skos:prefLabel "Classification Type"@en ;
150 | rdfs:range xsd:string .
151 |
152 | bsdd:ParentClassificationCode a rdf:Property ;
153 | skos:prefLabel "Parent Classification Code"@en ;
154 | rdfs:range xsd:string .
155 |
156 | bsdd:Synonym a rdf:Property ;
157 | skos:prefLabel "Synonym"@en ;
158 | rdfs:range xsd:string .
159 |
160 | bsdd:ClassificationRelation a rdfs:Class ;
161 | skos:prefLabel "Classification Relation"@en .
162 |
163 | bsdd:RelationType a rdf:Property ;
164 | skos:prefLabel "Relation Type"@en ;
165 | rdfs:range xsd:string .
166 |
167 | bsdd:RelatedClassificationUri a rdf:Property ;
168 | skos:prefLabel "Related Classification URI"@en ;
169 | rdfs:range xsd:anyURI .
170 |
171 | bsdd:ClassificationProperty a rdfs:Class ;
172 | skos:prefLabel "Classification Property"@en .
173 |
174 | bsdd:PropertyCode a rdf:Property ;
175 | skos:prefLabel "Property Code"@en ;
176 | rdfs:range xsd:string .
177 |
178 | bsdd:PropertySet a rdf:Property ;
179 | skos:prefLabel "PropertySet"@en ;
180 | rdfs:range xsd:string .
181 |
182 | bsdd:ExternalPropertyUri a rdf:Property ;
183 | skos:prefLabel "External Property URI"@en ;
184 | rdfs:range xsd:anyURI .
185 |
186 | bsdd:Unit a rdf:Property ;
187 | skos:prefLabel "Unit"@en ;
188 | rdfs:range xsd:string .
189 |
190 | bsdd:QudtUnit a rdf:Property ;
191 | skos:prefLabel "QUDT Unit"@en ;
192 | rdfs:range qudt:Unit .
193 |
194 | bsdd:SortNumber a rdf:Property ;
195 | skos:prefLabel "Sort Number"@en ;
196 | rdfs:range xsd:integer .
197 |
198 | bsdd:Symbol a rdf:Property ;
199 | skos:prefLabel "Symbol"@en ;
200 | rdfs:range xsd:string .
201 |
202 | bsdd:PropertyType a rdf:Property ;
203 | skos:prefLabel "Property Type"@en ;
204 | rdfs:range xsd:string .
205 |
206 | bsdd:PredefinedValue a rdf:Property ;
207 | skos:prefLabel "Predefined Value"@en ;
208 | rdfs:range xsd:string .
209 |
210 | bsdd:MinInclusive a rdf:Property ;
211 | skos:prefLabel "Min Inclusive"@en ;
212 | rdfs:range xsd:anySimpleType .
213 |
214 | bsdd:MaxInclusive a rdf:Property ;
215 | skos:prefLabel "Max Inclusive"@en ;
216 | rdfs:range xsd:anySimpleType .
217 |
218 | bsdd:MinExclusive a rdf:Property ;
219 | skos:prefLabel "Min Exclusive"@en ;
220 | rdfs:range xsd:anySimpleType .
221 |
222 | bsdd:MaxExclusive a rdf:Property ;
223 | skos:prefLabel "Max Exclusive"@en ;
224 | rdfs:range xsd:anySimpleType .
225 |
226 | bsdd:Pattern a rdf:Property ;
227 | skos:prefLabel "Pattern"@en ;
228 | rdfs:range xsd:string .
229 |
230 | bsdd:AllowedValue a rdfs:Class ;
231 | skos:prefLabel "Allowed Value"@en .
232 |
233 | bsdd:Value a rdf:Property ;
234 | skos:prefLabel "Value"@en ;
235 | rdfs:range xsd:string .
236 |
237 | bsdd:Description a rdf:Property ;
238 | skos:prefLabel "Description"@en ;
239 | rdfs:range xsd:string.
240 |
241 | bsdd:Property a rdfs:Class ;
242 | skos:prefLabel "Property"@en .
243 |
244 | bsdd:Material a rdfs:Class ;
245 | skos:prefLabel "Material"@en .
246 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.buildingsmart.org/)
2 |
3 |
6 |
7 | **The buildingSMART Data Dictionary (bSDD)** is an online service for hosting data dictionaries containing classifications, their properties, allowed values, units, translations, etc. It provides a standardized workflow to improve data quality and information consistency.
8 |
9 | Read more at bSDD project page: https://www.buildingsmart.org/users/services/buildingsmart-data-dictionary/
10 |
11 | ### Overview
12 |
13 | At the heart of bSDD is a canonical database, where all dictionaries can be related to each other. The main way to access the bSDD is through its [APIs (Application Programming Interfaces)](https://app.swaggerhub.com/apis/buildingSMART/Dictionaries/v1). This is how most BIM software and other apps can use the data stored in the bSDD. Apart from that, there is [the bSDD Search page](https://search.bsdd.buildingsmart.org/), where people can look up the content. Authors can publish content to bSDD through [the API](https://app.swaggerhub.com/apis/buildingSMART/Dictionaries/v1) or [the bSDD Manage portal](https://manage.bsdd.buildingsmart.org/). To upload, please register your organisation using [the organisation registration form](https://bsi-technicalservices.atlassian.net/servicedesk/customer/portal/3/group/4/create/25).
14 |
15 |
18 |
19 | ### Quick links
20 |
21 | * [bSDD project page](https://www.buildingsmart.org/users/services/buildingsmart-data-dictionary/)
22 | * [bSDD Search page]()
23 | * [bSDD Manage portal]()
24 | * [bSDD API Swagger page]()
25 | * [bSDD updates forum]()
26 | * [bSDD data structure](/Documentation/bSDD%20JSON%20import%20model.md)
27 | * [bSDD JSON template](/Model/Import%20Model/bsdd-import-model.json) / [bSDD Excel template](/Model/Import%20Model/spreadsheet-import)
28 | * [Tools integrating bSDD](https://technical.buildingsmart.org/resources/software-implementations/?filter_5%5B%5D=bSDD%20read%20API&filter_5%5B%5D=bSDD%20submit%2Fmanage&filter_5%5B%5D=bSDD%20IFC%20export%20(including%20URIs)&filter_1=&gv_search=&mode=any). This is a self-managed list, so feel free to add missing ones.
29 | * [How to upload your data into the bSDD?](/Documentation/bSDD%20import%20tutorial.md)
30 |
31 | ### For developers
32 |
33 | 📢 We inform about planned and recently implemented bSDD updates in this forum topic:
34 | [bSDD Tech Updates](https://forums.buildingsmart.org/t/bsdd-tech-updates/4889).
35 |
36 | * **API documentation** https://github.com/buildingSMART/bSDD/blob/master/Documentation/bSDD%20API.md
37 | * **API interactive documentation** on Swagger: https://app.swaggerhub.com/apis/buildingSMART/Dictionaries/v1
38 |
39 | We also provide a **TEST** environment where the latest features are rolled out first and tested. If you want to check it out, here are the equivalent pages (not to be used by end-users!):
40 | * **TEST API documentation** on Swagger: https://test.bsdd.buildingsmart.org/swagger/
41 | * **TEST GraphQL** environment UI: [GraphQL UI](https://test.bsdd.buildingsmart.org/graphiql)
42 | and related Search/Manage pages:
43 | * **TEST Search** page: https://search-test.bsdd.buildingsmart.org/
44 | * **TEST Manage** portal: https://manage-test.bsdd.buildingsmart.org/
45 |
46 | ## Contact us
47 |
48 | Need help? Got suggestions? Contact us: [CONTACT FORM](https://share.hsforms.com/1RtgbtGyIQpCd7Cdwt2l67A2wx5h).
49 |
50 | bSDD is one of our [Strategic Projects](https://www.buildingsmart.org/about/strategic-projects/), meaning buildingSMART International is calling on industry sponsorship to help fund the delivery of bSDD improvements.
51 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo-NET8/ConsoleDemo/ConsoleDemo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo-NET8/ConsoleDemo/ConsoleDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.8.34511.84
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleDemo", "ConsoleDemo.csproj", "{7C9C90D9-2F6C-4BE8-9DF7-4D543EFB496F}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {7C9C90D9-2F6C-4BE8-9DF7-4D543EFB496F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {7C9C90D9-2F6C-4BE8-9DF7-4D543EFB496F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {7C9C90D9-2F6C-4BE8-9DF7-4D543EFB496F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {7C9C90D9-2F6C-4BE8-9DF7-4D543EFB496F}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {AA8EFA90-2A51-4018-BA88-9A50FB0B2376}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo-NET8/ConsoleDemo/ConsoleDemo.sln.DotSettings.user:
--------------------------------------------------------------------------------
1 |
2 | SOLUTION
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo-NET8/ConsoleDemo/Program.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using System.Net.Http.Headers;
3 | using System.Text;
4 | using System.Text.Json;
5 | using Microsoft.Identity.Client;
6 |
7 | var config = new PublicClientApplicationOptions
8 | {
9 | // 'Application (client) ID' of the app registration in the Microsoft Entra admin center
10 | ClientId = "4aba821f-d4ff-498b-a462-c2837dbbba70"
11 | };
12 |
13 | const string tenantName = "buildingsmartservices";
14 | const string tenant = $"{tenantName}.onmicrosoft.com";
15 | const string scope = $"https://{tenantName}.onmicrosoft.com/api/read";
16 | const string policySignUpSignIn = "b2c_1a_signupsignin_c";
17 | const string azureAdB2CHostname = "authentication.buildingsmart.org";
18 | const string authorityBase = $"https://{azureAdB2CHostname}/tfp/{tenant}/";
19 | const string authoritySignUpSignIn = $"{authorityBase}{policySignUpSignIn}";
20 | const string redirectUri = "http://localhost";
21 |
22 | const string apiBaseUrl = "https://test.bsdd.buildingsmart.org";
23 | string searchListUrl = $"{apiBaseUrl}/api/SearchInDictionary/v1?DictionaryUri=" + WebUtility.UrlEncode("https://identifier.buildingsmart.org/uri/bs-agri/testpriv/1.0");
24 |
25 | // In order to take advantage of token caching, your MSAL client singleton must
26 | // have a lifecycle that at least matches the lifecycle of the user's session in
27 | // the console application.
28 | var publicMsalClient = PublicClientApplicationBuilder.CreateWithApplicationOptions(config)
29 | .WithB2CAuthority(authoritySignUpSignIn)
30 | .WithRedirectUri(redirectUri)
31 | .WithLogging(Log, LogLevel.Info, false)
32 | .Build();
33 |
34 | AuthenticationResult? msalAuthenticationResult = null;
35 |
36 | // Attempt to use a cached access token if one is available. This will renew existing, but
37 | // expired access tokens if possible. In this specific sample, this will always result in
38 | // a cache miss, but this pattern would be what you'd use on subsequent calls that require
39 | // the usage of the same access token.
40 | IEnumerable accounts = (await publicMsalClient.GetAccountsAsync(policySignUpSignIn)).ToList();
41 |
42 | if (accounts.Any())
43 | {
44 | try
45 | {
46 | msalAuthenticationResult = await publicMsalClient.AcquireTokenSilent(
47 | [scope],
48 | accounts.First()).ExecuteAsync();
49 | }
50 | catch (MsalUiRequiredException)
51 | {
52 | // No usable cached token was found for this scope + account or Entra ID insists in
53 | // an interactive user flow.
54 | }
55 | }
56 |
57 | if (msalAuthenticationResult == null)
58 | {
59 | // Initiate the device code flow.
60 | msalAuthenticationResult = await publicMsalClient.AcquireTokenInteractive([scope])
61 | .ExecuteAsync();
62 | }
63 |
64 | using var searchRequest = new HttpRequestMessage(HttpMethod.Get, searchListUrl);
65 | searchRequest.Headers.Authorization = new AuthenticationHeaderValue("Bearer", msalAuthenticationResult.AccessToken);
66 |
67 | // Make the API call
68 | var httpClient = new HttpClient();
69 | var searchResponse = await httpClient.SendAsync(searchRequest);
70 | searchResponse.EnsureSuccessStatusCode();
71 |
72 | // Present the results to the user (formatting the JSON for readability)
73 | var responseBody = JsonDocument.Parse(await searchResponse.Content.ReadAsStringAsync());
74 | Console.WriteLine(JsonSerializer.Serialize(responseBody,
75 | new JsonSerializerOptions()
76 | {
77 | WriteIndented = true,
78 | Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping
79 | }));
80 |
81 |
82 | static void Log(LogLevel level, string message, bool containsPii)
83 | {
84 | var logs = ($"{level} {message}");
85 | var sb = new StringBuilder();
86 | sb.Append(logs);
87 | File.AppendAllText(System.Reflection.Assembly.GetExecutingAssembly().Location + ".msalLogs.txt", sb.ToString());
88 | sb.Clear();
89 | }
90 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | x64/
22 | x86/
23 | [Aa][Rr][Mm]/
24 | [Aa][Rr][Mm]64/
25 | bld/
26 | [Bb]in/
27 | [Oo]bj/
28 | [Ll]og/
29 |
30 | # Visual Studio 2015/2017 cache/options directory
31 | .vs/
32 | # Uncomment if you have tasks that create the project's static files in wwwroot
33 | #wwwroot/
34 |
35 | # Visual Studio 2017 auto generated files
36 | Generated\ Files/
37 |
38 | # MSTest test Results
39 | [Tt]est[Rr]esult*/
40 | [Bb]uild[Ll]og.*
41 |
42 | # NUNIT
43 | *.VisualState.xml
44 | TestResult.xml
45 |
46 | # Build Results of an ATL Project
47 | [Dd]ebugPS/
48 | [Rr]eleasePS/
49 | dlldata.c
50 |
51 | # Benchmark Results
52 | BenchmarkDotNet.Artifacts/
53 |
54 | # .NET Core
55 | project.lock.json
56 | project.fragment.lock.json
57 | artifacts/
58 |
59 | # StyleCop
60 | StyleCopReport.xml
61 |
62 | # Files built by Visual Studio
63 | *_i.c
64 | *_p.c
65 | *_h.h
66 | *.ilk
67 | *.meta
68 | *.obj
69 | *.iobj
70 | *.pch
71 | *.pdb
72 | *.ipdb
73 | *.pgc
74 | *.pgd
75 | *.rsp
76 | *.sbr
77 | *.tlb
78 | *.tli
79 | *.tlh
80 | *.tmp
81 | *.tmp_proj
82 | *_wpftmp.csproj
83 | *.log
84 | *.vspscc
85 | *.vssscc
86 | .builds
87 | *.pidb
88 | *.svclog
89 | *.scc
90 |
91 | # Chutzpah Test files
92 | _Chutzpah*
93 |
94 | # Visual C++ cache files
95 | ipch/
96 | *.aps
97 | *.ncb
98 | *.opendb
99 | *.opensdf
100 | *.sdf
101 | *.cachefile
102 | *.VC.db
103 | *.VC.VC.opendb
104 |
105 | # Visual Studio profiler
106 | *.psess
107 | *.vsp
108 | *.vspx
109 | *.sap
110 |
111 | # Visual Studio Trace Files
112 | *.e2e
113 |
114 | # TFS 2012 Local Workspace
115 | $tf/
116 |
117 | # Guidance Automation Toolkit
118 | *.gpState
119 |
120 | # ReSharper is a .NET coding add-in
121 | _ReSharper*/
122 | *.[Rr]e[Ss]harper
123 | *.DotSettings.user
124 |
125 | # JustCode is a .NET coding add-in
126 | .JustCode
127 |
128 | # TeamCity is a build add-in
129 | _TeamCity*
130 |
131 | # DotCover is a Code Coverage Tool
132 | *.dotCover
133 |
134 | # AxoCover is a Code Coverage Tool
135 | .axoCover/*
136 | !.axoCover/settings.json
137 |
138 | # Visual Studio code coverage results
139 | *.coverage
140 | *.coveragexml
141 |
142 | # NCrunch
143 | _NCrunch_*
144 | .*crunch*.local.xml
145 | nCrunchTemp_*
146 |
147 | # MightyMoose
148 | *.mm.*
149 | AutoTest.Net/
150 |
151 | # Web workbench (sass)
152 | .sass-cache/
153 |
154 | # Installshield output folder
155 | [Ee]xpress/
156 |
157 | # DocProject is a documentation generator add-in
158 | DocProject/buildhelp/
159 | DocProject/Help/*.HxT
160 | DocProject/Help/*.HxC
161 | DocProject/Help/*.hhc
162 | DocProject/Help/*.hhk
163 | DocProject/Help/*.hhp
164 | DocProject/Help/Html2
165 | DocProject/Help/html
166 |
167 | # Click-Once directory
168 | publish/
169 |
170 | # Publish Web Output
171 | *.[Pp]ublish.xml
172 | *.azurePubxml
173 | # Note: Comment the next line if you want to checkin your web deploy settings,
174 | # but database connection strings (with potential passwords) will be unencrypted
175 | *.pubxml
176 | *.publishproj
177 |
178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
179 | # checkin your Azure Web App publish settings, but sensitive information contained
180 | # in these scripts will be unencrypted
181 | PublishScripts/
182 |
183 | # NuGet Packages
184 | *.nupkg
185 | # The packages folder can be ignored because of Package Restore
186 | **/[Pp]ackages/*
187 | # except build/, which is used as an MSBuild target.
188 | !**/[Pp]ackages/build/
189 | # Uncomment if necessary however generally it will be regenerated when needed
190 | #!**/[Pp]ackages/repositories.config
191 | # NuGet v3's project.json files produces more ignorable files
192 | *.nuget.props
193 | *.nuget.targets
194 |
195 | # Microsoft Azure Build Output
196 | csx/
197 | *.build.csdef
198 |
199 | # Microsoft Azure Emulator
200 | ecf/
201 | rcf/
202 |
203 | # Windows Store app package directories and files
204 | AppPackages/
205 | BundleArtifacts/
206 | Package.StoreAssociation.xml
207 | _pkginfo.txt
208 | *.appx
209 |
210 | # Visual Studio cache files
211 | # files ending in .cache can be ignored
212 | *.[Cc]ache
213 | # but keep track of directories ending in .cache
214 | !?*.[Cc]ache/
215 |
216 | # Others
217 | ClientBin/
218 | ~$*
219 | *~
220 | *.dbmdl
221 | *.dbproj.schemaview
222 | *.jfm
223 | *.pfx
224 | *.publishsettings
225 | orleans.codegen.cs
226 |
227 | # Including strong name files can present a security risk
228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
229 | #*.snk
230 |
231 | # Since there are multiple workflows, uncomment next line to ignore bower_components
232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
233 | #bower_components/
234 |
235 | # RIA/Silverlight projects
236 | Generated_Code/
237 |
238 | # Backup & report files from converting an old project file
239 | # to a newer Visual Studio version. Backup files are not needed,
240 | # because we have git ;-)
241 | _UpgradeReport_Files/
242 | Backup*/
243 | UpgradeLog*.XML
244 | UpgradeLog*.htm
245 | ServiceFabricBackup/
246 | *.rptproj.bak
247 |
248 | # SQL Server files
249 | *.mdf
250 | *.ldf
251 | *.ndf
252 |
253 | # Business Intelligence projects
254 | *.rdl.data
255 | *.bim.layout
256 | *.bim_*.settings
257 | *.rptproj.rsuser
258 | *- Backup*.rdl
259 |
260 | # Microsoft Fakes
261 | FakesAssemblies/
262 |
263 | # GhostDoc plugin setting file
264 | *.GhostDoc.xml
265 |
266 | # Node.js Tools for Visual Studio
267 | .ntvs_analysis.dat
268 | node_modules/
269 |
270 | # Visual Studio 6 build log
271 | *.plg
272 |
273 | # Visual Studio 6 workspace options file
274 | *.opt
275 |
276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
277 | *.vbw
278 |
279 | # Visual Studio LightSwitch build output
280 | **/*.HTMLClient/GeneratedArtifacts
281 | **/*.DesktopClient/GeneratedArtifacts
282 | **/*.DesktopClient/ModelManifest.xml
283 | **/*.Server/GeneratedArtifacts
284 | **/*.Server/ModelManifest.xml
285 | _Pvt_Extensions
286 |
287 | # Paket dependency manager
288 | .paket/paket.exe
289 | paket-files/
290 |
291 | # FAKE - F# Make
292 | .fake/
293 |
294 | # JetBrains Rider
295 | .idea/
296 | *.sln.iml
297 |
298 | # CodeRush personal settings
299 | .cr/personal
300 |
301 | # Python Tools for Visual Studio (PTVS)
302 | __pycache__/
303 | *.pyc
304 |
305 | # Cake - Uncomment if you are using it
306 | # tools/**
307 | # !tools/packages.config
308 |
309 | # Tabs Studio
310 | *.tss
311 |
312 | # Telerik's JustMock configuration file
313 | *.jmconfig
314 |
315 | # BizTalk build output
316 | *.btp.cs
317 | *.btm.cs
318 | *.odx.cs
319 | *.xsd.cs
320 |
321 | # OpenCover UI analysis results
322 | OpenCover/
323 |
324 | # Azure Stream Analytics local run output
325 | ASALocalRun/
326 |
327 | # MSBuild Binary and Structured Log
328 | *.binlog
329 |
330 | # NVidia Nsight GPU debugger configuration file
331 | *.nvuser
332 |
333 | # MFractors (Xamarin productivity tool) working folder
334 | .mfractor/
335 |
336 | # Local History for Visual Studio
337 | .localhistory/
338 |
339 | # BeatPulse healthcheck temp database
340 | healthchecksdb
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2021 buildingSMART International Ltd.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
9 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_type: sample
3 | languages:
4 | - csharp
5 | products:
6 | - azure
7 | description: "This simple sample demonstrates how to use the Microsoft Authentication Library (MSAL) for .NET to get an access token and call an API secured by Azure AD B2C."
8 | urlFragment: active-directory-b2c-dotnet-desktop
9 | ---
10 |
11 | This simple sample demonstrates how to use the [Microsoft Authentication Library (MSAL) for .NET](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet) to get an access token and call an API secured by Azure AD B2C.
12 |
13 | ## How To Run This Sample
14 |
15 | You can run this sample right away. All configuration for accessing the buildingSMART Data Dictionary is in code. If you haven't created an account yet, you should do so to be able to login. You will be prompted for it when you run the sample.
16 |
17 | IMPORTANT: the current configuration for Azure AD B2C is temporary and will not be used for production.
18 |
19 |
20 | ## More information
21 | For more information on Azure B2C, see [the Azure AD B2C documentation homepage](http://aka.ms/aadb2c).
22 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/bSDD.DemoClientConsole.B2C.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29806.167
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bSDD.DemoClientConsole.B2C", "console-app\bSDD.DemoClientConsole.B2C.csproj", "{9A4269AF-7862-482C-A9FC-98D3542C4129}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {9A4269AF-7862-482C-A9FC-98D3542C4129}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {9A4269AF-7862-482C-A9FC-98D3542C4129}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {9A4269AF-7862-482C-A9FC-98D3542C4129}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {9A4269AF-7862-482C-A9FC-98D3542C4129}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {A6407D14-F560-4B02-B103-FA0B0CBE4914}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/ApiHelper/BsddSenderBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.Net.Http;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace bSDD.DemoClientConsole.ApiHelper
9 | {
10 | // Under construction
11 | public abstract class BsddSenderBase
12 | {
13 | private readonly HttpClient _httpClient;
14 | private readonly IApiSettings apiSettings;
15 |
16 | protected BsddSenderBase(HttpClient httpClient, IApiSettings apiSettings)
17 | {
18 | _httpClient = httpClient;
19 | _httpClient.Timeout = new TimeSpan(0, 0, 100);
20 |
21 | this.apiSettings = apiSettings;
22 | }
23 |
24 | protected HttpClient HttpClient => _httpClient;
25 |
26 | protected async Task PostAsync(string relativeUri, HttpContent httpContent, CancellationToken cancellationToken)
27 | {
28 | var uri = CreateUri(relativeUri);
29 | await CatchTransientExceptions(async () =>
30 | {
31 | var response = await HttpClient.PostAsync(uri, httpContent, cancellationToken);
32 | await EvaluateResponse(response, uri);
33 | },
34 | uri);
35 | }
36 |
37 | // protected async Task PostAsJsonAsync(string relativeUri, T dataToPost, CancellationToken cancellationToken) where T : class
38 | // {
39 | // var uri = CreateUri(relativeUri);
40 | // await CatchTransientExceptions(async () =>
41 | // {
42 | // // var response = await HttpClient.PostAsJsonAsync(uri, dataToPost, cancellationToken);
43 | // await EvaluateResponse(response, uri);
44 | // },
45 | // uri);
46 | // }
47 |
48 | private async Task CatchTransientExceptions(Func sender, Uri uri)
49 | {
50 | try
51 | {
52 | await sender();
53 | }
54 | catch (TaskCanceledException ex) when (ex.Message.Contains("HttpClient.Timeout"))
55 | {
56 | // Identify it as transient exception so the message processor can decide to retry later on
57 | throw new Exception($"Timeout while posting to '{uri}' (timeout is {HttpClient.Timeout} seconds)");
58 | }
59 |
60 | }
61 |
62 | private Uri CreateUri(string relativeUri)
63 | {
64 | var uri = new Uri($"{apiSettings.ApiBaseUrl.TrimEnd('/')}{relativeUri}");
65 | return uri;
66 | }
67 |
68 | private async Task EvaluateResponse(HttpResponseMessage response, Uri uri)
69 | {
70 | if (response.IsSuccessStatusCode)
71 | {
72 | // For demo purposes writing to console. Use a separate logger for real use
73 | Console.WriteLine($"Response status is {response.StatusCode}");
74 | }
75 | else
76 | {
77 | // Note: maybe log all requests and responses? (use middleware for that)
78 | var stringContent = await response.Content.ReadAsStringAsync();
79 | var builder = new StringBuilder();
80 | builder.AppendLine("Default Request Headers:");
81 | foreach (var header in HttpClient.DefaultRequestHeaders)
82 | {
83 | builder.AppendLine($"{header.Key}:{string.Join(";", header.Value)}");
84 | }
85 |
86 | // For demo purposes writing to console. Use a separate logger for real use
87 | Console.WriteLine(
88 | $"bSDD API response is: {response.StatusCode} - {stringContent} - {response.ReasonPhrase}",
89 | null,
90 | new { Headers = builder.ToString() });
91 | }
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/ApiHelper/IApiSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace bSDD.DemoClientConsole.ApiHelper
8 | {
9 | public interface IApiSettings
10 | {
11 | string ApiBaseUrl { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/ApiHelper/SimpleBsddClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | namespace bSDD.DemoClientConsole.ApiHelper
5 | {
6 | // Note: this is not the best designed piece of code, it is only showing the absolute minimum to do an API request
7 | public static class SimpleBsddClient
8 | {
9 | public static async Task PostGraphQL(string baseUrl, string graphqlRequest, string accessToken)
10 | {
11 | var url = $"{baseUrl}/graphqls";
12 |
13 | Console.WriteLine($"Calling {url}...");
14 | var jsonContent = @"{ ""query"": """ + graphqlRequest.Replace("\"", "\\\"") + @"""}";
15 | var resultText = await Helpers.PostHttpContentWithToken(url, accessToken, jsonContent);
16 | Console.WriteLine($"Result received: {resultText}");
17 |
18 | return resultText;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/ApiHelper/Uploader.cs:
--------------------------------------------------------------------------------
1 | // using System;
2 | // using System.Collections.Generic;
3 | // using System.IO;
4 | // using System.Linq;
5 | // using System.Net.Http;
6 | // using System.Net.Http.Headers;
7 | // using System.Net.Mime;
8 | // using System.Text;
9 | // using System.Threading;
10 | // using System.Threading.Tasks;
11 | //
12 | // namespace bSDD.DemoClientConsole.ApiHelper
13 | // {
14 | // public class Uploader
15 | // {
16 | // public async Task UploadFile(string fileName, byte[] byteArray, CancellationToken cancellationToken)
17 | // {
18 | // // LogInstance.Logger.Trace($"Start sending file '{fileName}' to woodpulp ...");
19 | //
20 | // var contentType = GetContentType(fileName);
21 | //
22 | // var httpContent = new ByteArrayContent(byteArray);
23 | // httpContent.Headers.ContentType = new MediaTypeHeaderValue(contentType);
24 | // // using var formData = new MultipartFormDataContent { { httpContent, "uploadRequest.File", fileName } };
25 | // //
26 | // // await PostAsync(RelativeUri, formData, cancellationToken);
27 | // }
28 | //
29 | // private static string GetContentType(string fileName)
30 | // {
31 | // var extension = Path.GetExtension(fileName);
32 | // string contentType;
33 | // switch (extension)
34 | // {
35 | // case ".xml":
36 | // contentType = MediaTypeNames.Application.Xml;
37 | // break;
38 | // case ".json":
39 | // contentType = MediaTypeNames.Application.Json;
40 | // break;
41 | // default:
42 | // contentType = MediaTypeNames.Application.Octet;
43 | // break;
44 | // }
45 | //
46 | // return contentType;
47 | // }
48 | // }
49 | // }
50 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Contract/ClassificationSearchResultContract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace bSDD.DemoClientConsole.Contract
5 | {
6 | public class ClassificationSearchResultContract
7 | {
8 | public Guid Guid { get; set; }
9 | public string Name { get; set; }
10 | public string Definition { get; set; }
11 |
12 | public List Synonyms { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Contract/DomainSearchResultContract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace bSDD.DemoClientConsole.Contract
5 | {
6 | public class DomainSearchResultContract
7 | {
8 | public Guid Guid { get; set; }
9 | public string Name { get; set; }
10 |
11 | public List Classifications { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Contract/SearchResultContract.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace bSDD.DemoClientConsole.Contract
4 | {
5 | public class SearchResultContract
6 | {
7 | ///
8 | /// The total number of Classifications matching the search criteria
9 | ///
10 | public int NumberOfClassificationsFound { get; set; }
11 |
12 | ///
13 | /// The list of Domains with found Classification and ClassificationProperties
14 | ///
15 | public List Domains { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Helpers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Net.Http;
4 | using System.Net.Http.Headers;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Microsoft.Identity.Client;
8 | using Newtonsoft.Json.Linq;
9 |
10 | namespace bSDD.DemoClientConsole
11 | {
12 | public static class Helpers
13 | {
14 | public static JObject ParseIdToken(string idToken)
15 | {
16 | // Parse the idToken to get user info
17 | idToken = idToken.Split('.')[1];
18 | idToken = Base64UrlDecode(idToken);
19 | return JObject.Parse(idToken);
20 | }
21 |
22 | public static async Task GetHttpContent(string url)
23 | {
24 | var httpClient = new HttpClient();
25 | HttpResponseMessage response;
26 | try
27 | {
28 | var request = new HttpRequestMessage(HttpMethod.Get, url);
29 | response = await httpClient.SendAsync(request).ConfigureAwait(false);
30 |
31 | var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
32 | if (!response.IsSuccessStatusCode)
33 | {
34 | return $"{response.StatusCode} - {response.ReasonPhrase} - {content}";
35 | }
36 | return content;
37 | }
38 | catch (Exception ex)
39 | {
40 | return ex.ToString();
41 | }
42 | }
43 |
44 | ///
45 | /// Perform an HTTP GET request to a URL using an HTTP Authorization header
46 | ///
47 | /// The URL
48 | /// The token
49 | /// String containing the results of the GET operation
50 | public static async Task GetHttpContentWithToken(string url, string token)
51 | {
52 | var httpClient = new HttpClient();
53 | HttpResponseMessage response;
54 | try
55 | {
56 | var request = new HttpRequestMessage(HttpMethod.Get, url);
57 | request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
58 | response = await httpClient.SendAsync(request).ConfigureAwait(false);
59 |
60 | var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
61 | if (!response.IsSuccessStatusCode)
62 | {
63 | return $"[{response.StatusCode}] - {response.ReasonPhrase} - {content}";
64 | }
65 | return content;
66 | }
67 | catch (Exception ex)
68 | {
69 | return ex.ToString();
70 | }
71 | }
72 |
73 | ///
74 | /// Perform an HTTP POST request to a URL using an HTTP Authorization header
75 | ///
76 | /// String containing the results of the GET operation
77 | public static async Task PostHttpContentWithToken(string url, string token, string jsonContent)
78 | {
79 | var httpClient = new HttpClient();
80 | HttpResponseMessage response;
81 | try
82 | {
83 | httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
84 | var stringContent = new StringContent(jsonContent);
85 | stringContent.Headers.Remove("Content-Type");
86 | stringContent.Headers.Add("Content-Type", $"application/json");
87 | response = await httpClient.PostAsync(url, stringContent);
88 |
89 | var content = await response.Content.ReadAsStringAsync();
90 | if (!response.IsSuccessStatusCode)
91 | {
92 | return $"Not OK: {response.StatusCode} - {response.ReasonPhrase} - {content}";
93 | }
94 | return content;
95 | }
96 | catch (Exception ex)
97 | {
98 | return ex.ToString();
99 | }
100 | }
101 |
102 | public static async Task SignIn(IPublicClientApplication app, string[] apiScopes, string authorityResetPassword, IntPtr? windowHandle)
103 | {
104 | AuthenticationResult authResult;
105 | try
106 | {
107 | if (windowHandle != null)
108 | {
109 | authResult = await app.AcquireTokenInteractive(apiScopes)
110 | .WithParentActivityOrWindow(windowHandle)
111 | .ExecuteAsync()
112 | .ConfigureAwait(false);
113 | }
114 | else
115 | {
116 | authResult = await app.AcquireTokenInteractive(apiScopes)
117 | // .WithParentActivityOrWindow(new WindowInteropHelper(this).Handle)
118 | .ExecuteAsync()
119 | .ConfigureAwait(false);
120 | }
121 |
122 | return authResult;
123 | }
124 | catch (MsalException ex)
125 | {
126 | if (ex.Message.Contains("AADB2C90118"))
127 | {
128 | authResult = await app.AcquireTokenInteractive(apiScopes)
129 | // .WithParentActivityOrWindow(new WindowInteropHelper(this).Handle)
130 | .WithPrompt(Prompt.SelectAccount)
131 | .WithB2CAuthority(authorityResetPassword)
132 | .ExecuteAsync()
133 | .ConfigureAwait(false);
134 |
135 | return authResult;
136 | }
137 |
138 | throw;
139 | }
140 | }
141 |
142 | private static string Base64UrlDecode(string s)
143 | {
144 | s = s.Replace('-', '+').Replace('_', '/');
145 | s = s.PadRight(s.Length + (4 - s.Length % 4) % 4, '=');
146 | var byteArray = Convert.FromBase64String(s);
147 | var decoded = Encoding.UTF8.GetString(byteArray, 0, byteArray.Count());
148 | return decoded;
149 | }
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Security.Policy;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using bSDD.DemoClientConsole.ApiHelper;
9 | using bSDD.DemoClientConsole.Contract;
10 | using Microsoft.Identity.Client;
11 | using Newtonsoft.Json;
12 | using Newtonsoft.Json.Linq;
13 |
14 | namespace bSDD.DemoClientConsole
15 | {
16 | public static class Program
17 | {
18 | // For authentication & authorization (those items should be in a config file)
19 |
20 | // B2C environment
21 | public static readonly string TenantName = "buildingsmartservices";
22 | public static readonly string ClientId = "4aba821f-d4ff-498b-a462-c2837dbbba70";
23 |
24 | public static readonly string RedirectUri = "https://authentication.buildingsmart.org/oauth2/nativeclient";
25 |
26 | private static readonly string Tenant = $"{TenantName}.onmicrosoft.com";
27 | private static readonly string AzureAdB2CHostname = "authentication.buildingsmart.org";
28 | public static string PolicySignUpSignIn = "b2c_1a_signupsignin_c";
29 | public static string PolicyEditProfile = "b2c_1a_profileedit_c";
30 | public static string PolicyResetPassword = "b2c_1a_passwordreset_c";
31 |
32 | // For accessing production environment the last part of the scope must be bsddapi/read
33 | public static string[] ApiScopes = { $"https://{TenantName}.onmicrosoft.com/api/read" };
34 |
35 | private static string AuthorityBase = $"https://{AzureAdB2CHostname}/tfp/{Tenant}/";
36 | public static string AuthoritySignUpSignIn = $"{AuthorityBase}{PolicySignUpSignIn}";
37 | public static string AuthorityEditProfile = $"{AuthorityBase}{PolicyEditProfile}";
38 | public static string AuthorityResetPassword = $"{AuthorityBase}{PolicyResetPassword}";
39 |
40 | // For accessing API endpoint
41 | public const string ApiBaseUrl = "https://test.bsdd.buildingsmart.org";
42 | public static string SearchListUrl = $"{ApiBaseUrl}/api/SearchInDictionary/v1?DictionaryUri=" + WebUtility.UrlEncode("https://identifier.buildingsmart.org/uri/bs-agri/tractors/1.0");
43 |
44 | private static IPublicClientApplication publicClientApp;
45 |
46 | public static int Main(string[] args)
47 | {
48 | publicClientApp = PublicClientApplicationBuilder.Create(ClientId)
49 | .WithB2CAuthority(AuthoritySignUpSignIn)
50 | .WithRedirectUri(RedirectUri)
51 | .WithLogging(Log, LogLevel.Info, false) // don't log PII details on a regular basis
52 | .Build();
53 |
54 | TokenCacheHelper.Bind(publicClientApp.UserTokenCache);
55 |
56 | Console.WriteLine("Press L to clear the token cache before continuing. Any other character just continues.");
57 | var keyInfo = Console.ReadKey();
58 |
59 | if (keyInfo.KeyChar == 'l' || keyInfo.KeyChar == 'L')
60 | {
61 | Console.WriteLine();
62 | Console.WriteLine("Clearing token cache...");
63 | ClearTokenCache().GetAwaiter().GetResult();
64 | }
65 |
66 | Console.WriteLine("Reading data...");
67 | if (SecuredExample(SearchListUrl, out var resultText, out var exitWithError))
68 | //if (SecuredGraphqlExample(ApiBaseUrl, out var resultText, out var exitWithError))
69 | {
70 | Console.WriteLine($"--> {resultText}");
71 | Console.WriteLine();
72 | Console.WriteLine("Press Enter to close");
73 | Console.ReadLine();
74 | return exitWithError;
75 | }
76 |
77 | var searchResult = JsonConvert.DeserializeObject(resultText);
78 | Console.WriteLine("Result received");
79 | Console.WriteLine($"Number of classifications found: {searchResult.NumberOfClassificationsFound}");
80 | if (searchResult.NumberOfClassificationsFound > 0)
81 | {
82 | // Just printing first item from result list for demo purposes
83 | var firstDomain = searchResult.Domains[0];
84 | var firstClassification = firstDomain.Classifications[0];
85 | Console.WriteLine($"First item in result list, domain: {firstDomain.Name}, classification: {firstClassification.Name}");
86 | }
87 |
88 | Console.WriteLine();
89 | Console.WriteLine("Press Enter to close");
90 | Console.ReadLine();
91 | return 0;
92 | }
93 |
94 | private static bool SecuredExample(string fullUrl, out string resultText, out int exitWithError)
95 | {
96 | var authResult = Authenticate();
97 | if (authResult == null)
98 | {
99 | resultText = string.Empty;
100 | exitWithError = 1;
101 | return true;
102 | }
103 |
104 | Console.WriteLine($"Calling {fullUrl}...");
105 | resultText = Helpers.GetHttpContentWithToken(fullUrl, authResult.AccessToken).GetAwaiter().GetResult();
106 | if (resultText.StartsWith("["))
107 | {
108 | exitWithError = 1;
109 | return true;
110 | }
111 |
112 | exitWithError = 0;
113 | return false;
114 | }
115 |
116 | // In the prototype the GraphQL endpoint is not secured yet. For production it will be
117 | private static bool SecuredGraphqlExample(string baseUrl, out string resultText, out int exitWithError)
118 | {
119 | const string GraphQlExample = @"{domain(namespaceUri: ""https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3"") { name version license languageCode } }";
120 |
121 | var authResult = Authenticate();
122 | if (authResult == null)
123 | {
124 | resultText = string.Empty;
125 | exitWithError = 1;
126 | return true;
127 | }
128 |
129 | resultText = SimpleBsddClient.PostGraphQL(baseUrl, GraphQlExample, authResult.AccessToken).GetAwaiter().GetResult();
130 | if (resultText.StartsWith("Not OK"))
131 | {
132 | exitWithError = 1;
133 | return true;
134 | }
135 |
136 | exitWithError = 0;
137 | return false;
138 | }
139 |
140 | private static AuthenticationResult Authenticate()
141 | {
142 | AuthenticationResult authResult;
143 | try
144 | {
145 | var accounts = publicClientApp.GetAccountsAsync(PolicySignUpSignIn).GetAwaiter().GetResult();
146 | var account = accounts.FirstOrDefault();
147 | authResult = publicClientApp.AcquireTokenSilent(ApiScopes, account).ExecuteAsync().GetAwaiter().GetResult();
148 |
149 | DisplayUserInfo(authResult);
150 | }
151 | catch (MsalUiRequiredException)
152 | {
153 | Console.WriteLine("You need to sign-in first...");
154 | try
155 | {
156 | authResult = Helpers.SignIn(publicClientApp, ApiScopes, AuthorityResetPassword, null).GetAwaiter().GetResult();
157 | DisplayUserInfo(authResult);
158 | }
159 | catch (Exception e)
160 | {
161 | ExitWithError(e.ToString());
162 | return null;
163 | }
164 | }
165 | catch (Exception ex)
166 | {
167 | ExitWithError($"Error Acquiring Token Silently:{Environment.NewLine}{ex}");
168 | return null;
169 | }
170 |
171 | return authResult;
172 | }
173 |
174 | private static async Task ClearTokenCache()
175 | {
176 | var accounts = (await publicClientApp.GetAccountsAsync(PolicySignUpSignIn)).ToList();
177 |
178 | // clear the cache
179 | while (accounts.Any())
180 | {
181 | await publicClientApp.RemoveAsync(accounts.First());
182 | accounts = (await publicClientApp.GetAccountsAsync(PolicySignUpSignIn)).ToList();
183 | }
184 | }
185 |
186 | private static int ExitWithError(string error)
187 | {
188 | Console.WriteLine(error);
189 | Console.WriteLine();
190 | Console.WriteLine("Press Enter to close");
191 | Console.ReadLine();
192 |
193 | return 1;
194 | }
195 |
196 | private static void DisplayUserInfo(AuthenticationResult authResult)
197 | {
198 | if (authResult != null)
199 | {
200 | var user = Helpers.ParseIdToken(authResult.IdToken);
201 |
202 | Console.WriteLine($"Name: {user["name"]}");
203 | Console.WriteLine($"User Identifier: {user["oid"]}");
204 | Console.WriteLine($"Street Address: {user["streetAddress"]}");
205 | Console.WriteLine($"City: {user["city"]}");
206 | Console.WriteLine($"State: {user["state"]}");
207 | Console.WriteLine($"Country: {user["country"]}");
208 | Console.WriteLine($"Job Title: {user["jobTitle"]}");
209 |
210 | if (user["emails"] is JArray emails)
211 | {
212 | Console.WriteLine($"Emails: {emails[0]}");
213 | }
214 | Console.WriteLine($"Identity Provider: {user["iss"]}");
215 | }
216 | }
217 |
218 | private static void Log(LogLevel level, string message, bool containsPii)
219 | {
220 | var logs = ($"{level} {message}");
221 | var sb = new StringBuilder();
222 | sb.Append(logs);
223 | File.AppendAllText(System.Reflection.Assembly.GetExecutingAssembly().Location + ".msalLogs.txt", sb.ToString());
224 | sb.Clear();
225 | }
226 | }
227 | }
228 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("active_directory_b2c_wpf")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("active_directory_b2c_wpf")]
15 | [assembly: AssemblyCopyright("Copyright © 2017")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace bSDD.DemoClientConsole.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("bSDD.DemoClientConsole.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace bSDD.DemoClientConsole.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/TokenCacheHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Licensed under the MIT License.
3 |
4 | using System.IO;
5 | using System.Security.Cryptography;
6 | using Microsoft.Identity.Client;
7 |
8 | namespace bSDD.DemoClientConsole
9 | {
10 | static class TokenCacheHelper
11 | {
12 | ///
13 | /// Path to the token cache
14 | ///
15 | public static readonly string CacheFilePath = System.Reflection.Assembly.GetExecutingAssembly().Location + ".msalcache.bin";
16 |
17 | private static readonly object FileLock = new object();
18 |
19 | public static void BeforeAccessNotification(TokenCacheNotificationArgs args)
20 | {
21 | lock (FileLock)
22 | {
23 | args.TokenCache.DeserializeMsalV3(File.Exists(CacheFilePath)
24 | ? ProtectedData.Unprotect(File.ReadAllBytes(CacheFilePath),
25 | null,
26 | DataProtectionScope.CurrentUser)
27 | : null);
28 | }
29 | }
30 |
31 | public static void AfterAccessNotification(TokenCacheNotificationArgs args)
32 | {
33 | // if the access operation resulted in a cache update
34 | if (args.HasStateChanged)
35 | {
36 | lock (FileLock)
37 | {
38 | // reflect changesgs in the persistent store
39 | File.WriteAllBytes(CacheFilePath,
40 | ProtectedData.Protect(args.TokenCache.SerializeMsalV3(),
41 | null,
42 | DataProtectionScope.CurrentUser));
43 | }
44 | }
45 | }
46 |
47 | internal static void Bind(ITokenCache tokenCache)
48 | {
49 | tokenCache.SetBeforeAccess(BeforeAccessNotification);
50 | tokenCache.SetAfterAccess(AfterAccessNotification);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/bSDD.DemoClientConsole.B2C.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9A4269AF-7862-482C-A9FC-98D3542C4129}
8 | Exe
9 | bSDD.DemoClientConsole
10 | bSDD.DemoClientConsole.B2C
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 | ..\packages\Microsoft.Identity.Client.4.61.3\lib\net462\Microsoft.Identity.Client.dll
43 | True
44 |
45 |
46 | ..\packages\Microsoft.IdentityModel.Abstractions.7.6.0\lib\net472\Microsoft.IdentityModel.Abstractions.dll
47 | True
48 |
49 |
50 | ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
51 |
52 |
53 |
54 | ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
55 | True
56 |
57 |
58 |
59 | ..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll
60 | True
61 |
62 |
63 |
64 |
65 | ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll
66 | True
67 |
68 |
69 | ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
70 | True
71 |
72 |
73 | ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
74 | True
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 4.0
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | Code
106 |
107 |
108 | True
109 | True
110 | Resources.resx
111 |
112 |
113 | True
114 | Settings.settings
115 | True
116 |
117 |
118 | ResXFileCodeGenerator
119 | Resources.Designer.cs
120 |
121 |
122 |
123 | SettingsSingleFileGenerator
124 | Settings.Designer.cs
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/Source code examples/CSharp-Client-Console-Demo/console-app/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Source code examples/Python-Client-Console-Demo/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2021 buildingSMART International Ltd.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
9 |
--------------------------------------------------------------------------------
/Source code examples/Python-Client-Console-Demo/Readme.md:
--------------------------------------------------------------------------------
1 | IMPORTANT: naming and (some) example API calls in this file are outdated! Please check the [swagger information page](https://test.bsdd.buildingsmart.org/swagger) for up-to-date API information.
2 |
3 | # Hackathon - Use case walkthrough
4 |
5 | The Python console app provides the API calls needed to implement the use case presented in the Hackathon on 2021 3th of March.
6 |
7 | see: https://github.com/buildingSMART/bSDD/blob/master/2021%20Hackathon/tutorial.md
8 |
9 | 1- Get the list of available domains in bSDD
10 |
11 | 2- Get the classes linked to IfcWall from NL-SfB 2005 domain
12 |
13 | 3- Get the properties available in (16.21) funderingsconstructies; keerwanden, grondkerende wanden classification
14 |
15 | For ease of use, the results of step 1 and 2 are saved to csv files to copy/paste the URIs as parameters of the following calls
16 |
17 |
18 | # 1- List of available domains
19 |
20 | Call Get_Domains()
21 |
22 | ## Ressource
23 |
24 | /api/Domain/v2
25 |
26 | ## Result
27 |
28 | ```json
29 | [
30 | {
31 | "namespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3",
32 | "name": "IFC",
33 | "version": "4.3",
34 | "organizationNameOwner": "buildingSMART",
35 | "defaultLanguageCode": "EN",
36 | "license": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International",
37 | "licenseUrl": "https://creativecommons.org/licenses/by-nc-nd/4.0/",
38 | "qualityAssuranceProcedure": "bSI process",
39 | "qualityAssuranceProcedureUrl": "https://www.buildingsmart.org/about/bsi-process"
40 | },
41 |
42 | {
43 | "namespaceUri": "https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2",
44 | "name": "NL-SfB 2005",
45 | "version": "2.2",
46 | "organizationNameOwner": "NL-SfB",
47 | "defaultLanguageCode": "nl-NL"
48 | }
49 | ]
50 | ```
51 |
52 | ## Results saved to
53 | bSDD_Domains.csv
54 |
55 | # 2- Get the classes linked to IfcWall from a domain
56 |
57 | Call Get_Classes_Linked_To_IFC()
58 |
59 | ## Ressource
60 |
61 | /api/SearchListOpen/v2
62 |
63 | ## Parameters
64 |
65 | Need to input the parameters into the console
66 |
67 | - DomainNamespaceUri : https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2
68 |
69 | - RelatedIfcEntity: IfcWall
70 |
71 | ## Result
72 |
73 | The call will return 22 classification linked to IfcWall
74 |
75 | ```json
76 | {
77 | "numberOfClassificationsFound": 22,
78 | "domains": [
79 | {
80 | "name": "NL-SfB 2005",
81 | "namespaceUri": "https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2",
82 | "classifications": [
83 | {
84 | "name": "(16.21) funderingsconstructies; keerwanden, grondkerende wanden",
85 | "namespaceUri": "https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2/class/16.21"
86 | },
87 | {
88 | "name": "(16.22) funderingsconstructies; keerwanden, waterkerende wanden",
89 | "namespaceUri": "https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2/class/16.22"
90 | }
91 | ...
92 | ]
93 | }
94 | ]
95 | }
96 | Response header
97 | ```
98 |
99 | ## Results saved to
100 | NL-SfB 2005_Classes.csv
101 |
102 | # 3- Get the properties available for a classification
103 |
104 | Call Get_Classification_Properties()
105 |
106 | ## Ressource
107 |
108 | /api/Classification/v2
109 |
110 | ## Parameters
111 |
112 | Need to input the parameters into the console
113 |
114 | - ClassificationUri : https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2/class/16.21
115 |
116 | - ClassificationName: 16.21 (we just use it for a nice filename, nothing else)
117 |
118 | ## Result
119 |
120 | 2 properties found, each from IFC domain
121 | ```json
122 | {
123 | "relatedIfcEntityNames": [
124 | "IfcWall"
125 | ],
126 | "parentClassificationReference": {
127 | "namespaceUri": "https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2/class/16.2",
128 | "name": "(16.2) funderingsconstructies; keerwanden",
129 | "code": "16.2"
130 | },
131 | "classificationProperties": [
132 | {
133 | "propertyDomainName": "IFC",
134 | "propertyNamespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/prop/LoadBearing",
135 | "name": "LoadBearing",
136 | "description": "Indicates whether the object is intended to carry loads TRUE or not FALSE .",
137 | "propertySet": "Pset_WallCommon",
138 | "predefinedValue": "",
139 | "dataType": "boolean"
140 | },
141 | {
142 | "propertyDomainName": "IFC",
143 | "propertyNamespaceUri": "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3/prop/IsExternal",
144 | "name": "IsExternal",
145 | "description": "Indication of whether the junction box type is allowed for exposure to outdoor elements set TRUE where external exposure is allowed .",
146 | "propertySet": "Pset_WallCommon",
147 | "predefinedValue": "TRUE",
148 | "dataType": "boolean"
149 | }
150 | ],
151 | "code": "16.21",
152 | "namespaceUri": "https://identifier.buildingsmart.org/uri/nlsfb/nlsfb2005/2.2/class/16.21",
153 | "name": "(16.21) funderingsconstructies; keerwanden, grondkerende wanden",
154 | "status": "Preview",
155 | "activationDateUtc": "0001-01-01T00:00:00",
156 | "versionDateUtc": "0001-01-01T00:00:00"
157 | }
158 | ```
159 |
160 | ## Results saved to
161 |
162 | 16.21_Properties.csv
163 |
--------------------------------------------------------------------------------
/Source code examples/Python-Client-Console-Demo/bSDDV5_Main.py:
--------------------------------------------------------------------------------
1 |
2 | from bSDDV5_Classes import TClassification, TCountry, TDomain, TPostman
3 | import requests
4 | import msal
5 |
6 | bsdd = TPostman() #used to handle the API calls
7 |
8 | #---------------------------------------------------
9 | # Authorize #
10 | #---------------------------------------------------
11 |
12 | def Login():
13 |
14 | bsdd.Authorize()
15 |
16 | #---------------------------------------------------
17 | # Get countries #
18 | #---------------------------------------------------
19 |
20 | def Get_Countries():
21 |
22 | bsdd.get_Countries()
23 |
24 | #---------------------------------------------------
25 | # Get domains #
26 | #---------------------------------------------------
27 |
28 | def Get_Domains():
29 |
30 | SaveResult = True
31 | NbDomains = bsdd.get_Domains(SaveResult)
32 | print ( str(NbDomains) + ' domains found')
33 | for item in bsdd.Domains:
34 | print("Domain: " + item.name + " --> " + item.namespaceUri)
35 |
36 | #---------------------------------------------------
37 | # Get all classes of a domain #
38 | #---------------------------------------------------
39 |
40 | def Get_Classes_For_Domain():
41 |
42 | #Ask user the domain URI
43 | DomainURI = input("enter the domain URI : >") #we got them from the previous get domains call
44 | LanguageRequired = 'fr-FR'
45 | SaveResult = True
46 | Get_Details = True #Used to ask to get all classification details (including properties)
47 | NbClasses = bsdd.get_Domain_Classes(DomainURI, LanguageRequired, SaveResult, Get_Details)
48 | print ( str(NbClasses) + " found in the domain")
49 |
50 | #-----------------------------------------------------------
51 | # Get classes linked to an IFC Entity #
52 | #-----------------------------------------------------------
53 |
54 | def Get_Classes_Linked_To_IFC():
55 | #Ask user the domain URI
56 | DomainURI = input("enter the domain URI : >") # we got them from the previous get domains call
57 | IFCEntity = input("enter the IFC Entity name : >") # case sensitive
58 | LanguageRequired = 'EN'
59 | SaveResult = True
60 | Get_Details = False #Used to ask to get all classification details (including properties)
61 | NbClasses = bsdd.get_Linked_Classes(DomainURI, LanguageRequired, IFCEntity, SaveResult, Get_Details)
62 | print ( str(NbClasses) + " classification linked to " + IFCEntity)
63 |
64 | #-----------------------------------------------------------
65 | # Get Properties of a class #
66 | #-----------------------------------------------------------
67 |
68 | def Get_Classification_Properties():
69 | #Ask user the classification URI
70 | ClassificationURI = input("enter the classification URI : >")
71 | ClassificationName = input("enter the classification name : >")
72 | LanguageRequired = 'EN'
73 | SaveResult = True
74 | NbProperties = bsdd.Get_Classification_Properties(ClassificationURI, LanguageRequired, SaveResult, ClassificationName)
75 | print ( str(NbProperties) + " Properties found for " + ClassificationName)
76 |
77 | #-----------------------------------------------------------
78 | # Console APP example #
79 | #-----------------------------------------------------------
80 |
81 | #-------------- Uncomment calls as needed
82 |
83 | Login()
84 | #Get_Countries()
85 | Get_Domains()
86 | #Get_Classes_For_Domain() #Search all classes for a domain
87 | Get_Classes_Linked_To_IFC() #Search classes linked to an IFC Entity in a domain
88 | Get_Classification_Properties() # Get the properties for a given classification
89 |
90 |
91 |
--------------------------------------------------------------------------------
/Source code examples/Python_demo_-_ETIM_API_integration/Mapping.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {
5 | "code": "Code",
6 | "version": "VersionNumber",
7 |
8 | "mutationDate": "VersionDateUtc",
9 | "revision": "RevisionNumber",
10 | "revisionDate": "RevisionDateUtc",
11 |
12 | "dimensionalDrawingSvgUrl": "VisualRepresentationUri"
13 | "descriptionEn": "Definition",
14 |
15 | "synonyms": "Synonyms",
16 | "features": "ClassProperties"
17 |
18 | }
19 |
20 |
21 | {
22 | "code": "Code",
23 |
24 | "unit": "Units",
25 | }
--------------------------------------------------------------------------------
/Source code examples/README.md:
--------------------------------------------------------------------------------
1 | Here are examples of bSDD use.
2 |
3 | You can find the documentation in [/Documentation/bSDD API](/Documentation/bSDD%20API.md).
--------------------------------------------------------------------------------
/Source code examples/javascript/simple-example-accessing-open-bsdd-api.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
35 |
36 | Get list of domains
37 |
42 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | #---------------------------------------#
2 | # Build the PSetManager.exe #
3 | #---------------------------------------#
4 | version: 1.0.{build}
5 | image: Visual Studio 2017
6 | configuration: Release
7 | assembly_info:
8 | patch: true
9 | file: '**\AssemblyInfo.*'
10 | assembly_version: '{version}'
11 | assembly_file_version: '{version}'
12 | assembly_informational_version: '{version}'
13 | before_build:
14 | - nuget restore "PSets\Tools\PSetManager\PSetManager.sln"
15 | build:
16 | project: PSets\Tools\PSetManager\PSetManager.sln
17 | verbosity: minimal
18 | artifacts:
19 | - path: PSets\Tools\PSetManager\PSetManager\bin\$(configuration)
20 | name: PSetManager
21 | - path: PSets\Tools\PSetManager\PSetManager\bin\$(configuration)\PSetManager.log
22 | name: PSet2YamlConverterLog
23 |
24 | #---------------------------------------#
25 | # Run the PSetManager.exe #
26 | #---------------------------------------#
27 | environment:
28 | access_token:
29 | secure: sNVOMaQLV0mfLGZL9mXDXZvRvhHjX+WYON1/WokLH7w2fev2upMCuElyw07vW1w0
30 | gh_email:
31 | secure: V/J9RJx75dwkZ3GYcz6HxOuHhgRjronD6QpRkF5O+so=
32 | gh_username:
33 | secure: WYN/eo4TYe5gfE1sRt2Ugw==
34 | bsddUrl: http://test.bsdd.buildingsmart.org
35 | bsddUser:
36 | secure: V/J9RJx75dwkZ3GYcz6HxOuHhgRjronD6QpRkF5O+so=
37 | bsddPassword:
38 | secure: NsrogBgtuwTGnsZJl37ryz5NPjIO7ZESEzqd+1Xcd9lpE3XW0LBaE9eGI3ModO0q
39 |
40 | on_finish:
41 | - ps: '& "C:\projects\bSDD\PSets\Tools\ConvertAndPublishPSets.ps1" -bsddUrl $env:bsddUrl -bsddUser $env:bsddUser -bsddPassword $env:bsddPassword'
42 | # - git config --global credential.helper store
43 | # - ps: Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
44 | # - git config --global user.email "$($env:gh_email)"
45 | # - git config --global user.name "$($env:gh_username)"
46 | # - git config core.autocrlf true
47 | # - git status
48 | # - git commit . -m "Transformed PSets to YAML and JSON format"
49 | # - git remote -v
50 | # - git push origin master
--------------------------------------------------------------------------------