Commit 83b35e81 authored by Andrei Popescu's avatar Andrei Popescu
Browse files

set to GBFS

parent 05d4e92e
Pipeline #56265 passed with stage
in 36 seconds
......@@ -5,4 +5,5 @@ steps.txt
shacl.ttl
turtleTranslation.ttl
.json-schema-spec.txt
.paths.txt
\ No newline at end of file
.paths.txt
.schemaToTS.ts
\ No newline at end of file
......@@ -294,8 +294,7 @@ export class JsonProcessor {
this.writer.addQuad(quad);
return;
}
// Recursive step
if(propType == 'object' || propType =='array'){
let newClassName;
......@@ -305,16 +304,11 @@ export class JsonProcessor {
newClassName = RDFTools.capitalizeFirstLetter(prop); // Since it is an object/array, we give it a new class as a range
this.writer.addQuad(RDFTools.node_node_node(this.prefix+':'+prop, 'rdfs:range', this.prefix+':'+newClassName));
// the new class becomes the mainobject
this.writer.addQuad(RDFTools.node_node_node(this.prefix+':'+newClassName, 'rdf:type', 'rdfs:Class'));
if(propDescription != undefined ){
this.writer.addQuad(RDFTools.node_node_literal(this.prefix+':'+prop, 'rdfs:label', propDescription.toString()));
}
// Shacl shape text
if (JsonProcessor.isRequired(prop)){
this.shaclFileText = this.shaclFileText+ShaclTools.getShaclRequiredProperty(prop)+'\n';
......@@ -347,8 +341,6 @@ export class JsonProcessor {
}
}
// An array can have sub items
if(subItems != undefined){
for (let item in subItems){
this.jsonTraverseRecursive( depth, path, mainJsonObject, item);
......
This diff is collapsed.
......@@ -3,6 +3,7 @@
"@types/node": "^16.11.12"
},
"dependencies": {
"json-schema-to-typescript": "^10.1.5",
"json-schema-traverse": "^1.0.0",
"n3": "^1.13.0",
"tsc": "^2.0.3",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment