From 36dcd81bdcc8b9ea96d402e805f6e362eb8e7ed5 Mon Sep 17 00:00:00 2001 From: FORGIS98 Date: Thu, 17 Sep 2020 16:43:59 +0200 Subject: [PATCH 1/6] From RDF to JSON-LD --- Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld diff --git a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld new file mode 100644 index 000000000..73f152d91 --- /dev/null +++ b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld @@ -0,0 +1,66 @@ +{ + "@context" : { + "base" : "http://example.org/", + "data" : "http://example.org/data", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "includes" : "base:includes", + "hasMeasurement" : "base:hasMeasurement", + "hasOwner" : "base:hasOwner", + "hasTemperature" : "base:hasTemperature", + "atTime" : "base:atTime", + "hasName" : "base:hasName", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph" : [ + { + "@id" : "base:Class01", + "@type" : "base:", + "includes" : [ + { + "@id" : "base:Sensor029", + "@type" : "base:" + }, + { + "@id" : "base:Computer101", + "@type" : "base:" + } + ] + }, + { + "@id" : "base:Sensor029", + "@type" : "base:", + "hasMeasurement" : { + "@id" : "base:Measurement8401", + "@type" : "base:" + } + }, + { + "@id" : "base:Computer101", + "@type" : "base:", + "hasOwner" : { + "@id" : "base:User10A", + "@type" : "base:" + } + }, + { + "@id" : "base:Measurement8401", + "@type" : "base:", + "hasTemperature" : { + "@value" : "29", + "@type" : "xsd:integer" + } + "atTime" : { + "@value" : "2010-06-12T12:00:12", + "@type" : "xsd:dateTime" + } + }, + { + "@id" : "base:User10A", + "@type" : "base:", + "hasName" : { + "@value" : "Pedro", + "@type" : "xsd:string" + } + } + ] +} From 1f05c295cfb6ab0185bbca5f2a9ff7b4b1071103 Mon Sep 17 00:00:00 2001 From: FORGIS98 Date: Thu, 17 Sep 2020 18:31:01 +0200 Subject: [PATCH 2/6] From JSON to JSON-LD --- Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld diff --git a/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld b/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld new file mode 100644 index 000000000..23b35fa92 --- /dev/null +++ b/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld @@ -0,0 +1,52 @@ +{ + "@context" : { + "xsd" : "http://www.w3.org/2001/XMLSchema#", + "name" : "rdfs:label", + "middleName" : "rdfs:label", + "lastName" : "rdfs:label", + "hometown" : "rdfs:label", + "country" : "rdfs:label", + "age" : "rdfs:label", + "almaMater" : "rdfs:label", + "mothesrName" : "rdfs:label", + "fathesrName" : "rdfs:label", + "subejct" : "http://example.org/subject", + "teachers" : "http://example.org/teachers", + "description" : "rdfs:comment" + }, + "name" : "Jorge", + "middleName" : "Sol", + "lastName" : "Gonzalez", + "hometown" : "Madrid", + "country" : "España", + "age" : "21", + "almaMater" : "Universidad Politecnica Madrid", + "mothersName" : "Almudena", + "fathersName" : "Daniel", + "subject" : [ + { + "name" : "Ingenieria del Software II", + "teachers" : [ + { + "name" : "Tomas San Feliu Gilabert" + }, + { + "name" : "Jose Antonio Calvo" + } + ], + "description" : "La asignatura de Ingeniería del Software II se enfoca en aplicar los aspectos de gestión al desarrollo software." + }, + { + "name" : "Gestion de Procesos de Tecnologia de la Información", + "teachers" : [ + { + "name" : "Oscar Dieste Tubio" + }, + { + "name" : "Edmundo Tovar Caro" + } + ], + "description" : "En esta asignatura se tratan los elementos de una organización, la gestión por procesos, y modelos de calidadaplicados a organizaciones de TI" + } + ] +} From c0b4d1c14e8724ecd99aa34f14c9dbde1038bfe1 Mon Sep 17 00:00:00 2001 From: FORGIS98 Date: Thu, 17 Sep 2020 18:56:24 +0200 Subject: [PATCH 3/6] I don't know what commit to put. --- Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld index 73f152d91..a24b5a6e0 100644 --- a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld +++ b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld @@ -3,12 +3,12 @@ "base" : "http://example.org/", "data" : "http://example.org/data", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "includes" : "base:includes", - "hasMeasurement" : "base:hasMeasurement", - "hasOwner" : "base:hasOwner", - "hasTemperature" : "base:hasTemperature", - "atTime" : "base:atTime", - "hasName" : "base:hasName", + "includes" : "rdfs:label", + "hasMeasurement" : "rdfs:label", + "hasOwner" : "rdfs:label", + "hasTemperature" : "rdfs:label", + "atTime" : "rdfs:label", + "hasName" : "rdfs:label", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@graph" : [ From 098000c58b9f55a9e126c1c123ddd6c4b97a950b Mon Sep 17 00:00:00 2001 From: FORGIS98 Date: Fri, 18 Sep 2020 15:28:52 +0200 Subject: [PATCH 4/6] Changes Fixed - added vocab for attribute definition - type "subejct" -> "subject" - added @id and @type --- Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld b/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld index 23b35fa92..61efcd745 100644 --- a/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld +++ b/Assignment2/FORGIS98_fromJSONtoJSON-LD.jsonld @@ -1,19 +1,22 @@ { "@context" : { "xsd" : "http://www.w3.org/2001/XMLSchema#", - "name" : "rdfs:label", - "middleName" : "rdfs:label", - "lastName" : "rdfs:label", - "hometown" : "rdfs:label", - "country" : "rdfs:label", - "age" : "rdfs:label", - "almaMater" : "rdfs:label", - "mothesrName" : "rdfs:label", - "fathesrName" : "rdfs:label", - "subejct" : "http://example.org/subject", + "vocab" : "http://example.org/specialVocab/Assignment2b", + "name" : "vocab:name", + "middleName" : "vocab:middleName", + "lastName" : "vocab:lastName", + "hometown" : "vocab:hometown", + "country" : "vocab:country", + "age" : "vocab:age", + "almaMater" : "vocab:almaMater", + "mothesrName" : "vocab:mothesrName", + "fathesrName" : "vocab:fathesrName", + "subject" : "http://example.org/subject", "teachers" : "http://example.org/teachers", "description" : "rdfs:comment" }, + "@id" : "http://example.org/specialVocab/Assignment2b/jorgesolgonzalez", + "@type" : "vocab:student", "name" : "Jorge", "middleName" : "Sol", "lastName" : "Gonzalez", From 0156e3cd4253361383c36d21e39e6e9b339ccff2 Mon Sep 17 00:00:00 2001 From: FORGIS98 Date: Fri, 18 Sep 2020 16:00:20 +0200 Subject: [PATCH 5/6] Changes Fixed - added vocab for attribute definition - object type specified --- Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld index a24b5a6e0..48afcddb4 100644 --- a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld +++ b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld @@ -1,6 +1,6 @@ { "@context" : { - "base" : "http://example.org/", + "vocab" : "http://example.org#", "data" : "http://example.org/data", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "includes" : "rdfs:label", @@ -13,38 +13,38 @@ }, "@graph" : [ { - "@id" : "base:Class01", - "@type" : "base:", + "@id" : "http://example.org/Class01", + "@type" : "vocab:Class01", "includes" : [ { - "@id" : "base:Sensor029", - "@type" : "base:" + "@id" : "http://example.org/Class01/Sensor029", + "@type" : "Class01/Sensor029" }, { - "@id" : "base:Computer101", - "@type" : "base:" + "@id" : "http://example.org/Class01/Computer101", + "@type" : "Class01/Computer101" } ] }, { - "@id" : "base:Sensor029", - "@type" : "base:", + "@id" : "http://example.org/Class01/Sensor029/", + "@type" : "Class01/Sensor029", "hasMeasurement" : { - "@id" : "base:Measurement8401", - "@type" : "base:" + "@id" : "http://example.org/Class01/Sensor029/Measurement8401", + "@type" : "Sensor029:Measurement8401" } }, { - "@id" : "base:Computer101", - "@type" : "base:", + "@id" : "http://example.org/Class01/Computer101", + "@type" : "Class01:Computer101", "hasOwner" : { - "@id" : "base:User10A", - "@type" : "base:" + "@id" : "http://example.org/Class01/Computer101/User10A", + "@type" : "Computer101:User10A" } }, { - "@id" : "base:Measurement8401", - "@type" : "base:", + "@id" : "http://example.org/Class01/Sensor029/Measurement8401", + "@type" : "Sensor029:Measurement8401", "hasTemperature" : { "@value" : "29", "@type" : "xsd:integer" @@ -55,8 +55,8 @@ } }, { - "@id" : "base:User10A", - "@type" : "base:", + "@id" : "http://example.org/Class01/Computer101/User10A", + "@type" : "Computer101:User10A", "hasName" : { "@value" : "Pedro", "@type" : "xsd:string" From 5048b50df6539b04c5d5b56865b1bb57b6a73269 Mon Sep 17 00:00:00 2001 From: FORGIS98 Date: Fri, 18 Sep 2020 20:56:53 +0200 Subject: [PATCH 6/6] Forgetten error fixed --- Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld index 48afcddb4..d6f596d01 100644 --- a/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld +++ b/Assignment2/FORGIS98_fromRDFtoJSON-LD.jsonld @@ -3,12 +3,12 @@ "vocab" : "http://example.org#", "data" : "http://example.org/data", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "includes" : "rdfs:label", - "hasMeasurement" : "rdfs:label", - "hasOwner" : "rdfs:label", - "hasTemperature" : "rdfs:label", - "atTime" : "rdfs:label", - "hasName" : "rdfs:label", + "includes" : "vocab:includes", + "hasMeasurement" : "vocab:hasMeasurement", + "hasOwner" : "vocab:hasOwner", + "hasTemperature" : "vocab:hasTemperature", + "atTime" : "vocab:atTime", + "hasName" : "vocab:hasName", "xsd": "http://www.w3.org/2001/XMLSchema#" }, "@graph" : [