Skip to content

Commit

Permalink
fix (core): Test lang_string in 2 langs (en + es)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Feb 24, 2024
1 parent 846986d commit 4552148
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions common/rdf/src/test/java/dev/enola/rdf/LearnRdf4jTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

public class LearnRdf4jTest {

// TODO Ontology to define what's "valid" for http://www.w3.org/ns/locn#location?
// TODO Ontology to define what's "valid" for http://www.w3.org/ns/locn#location ?

// https://rdf4j.org/documentation/tutorials/getting-started/

Expand All @@ -55,7 +55,7 @@ Model picasso1() {

// Terzo
model.add(picasso, LOCN.LOCATION, Values.literal("Spain", "en"));
// TODO model.add(picasso, LOCN.LOCATION, Values.literal("España", "es"));
model.add(picasso, LOCN.LOCATION, Values.literal("España", "es"));

// TODO Add Blank Node (and #test ConvertersTest and MessageToThingConverterTest), see
// https://rdf4j.org/documentation/tutorials/getting-started/#blank-nodes
Expand All @@ -70,7 +70,7 @@ Model picasso2() {
.add(RDF.TYPE, "ex:Artist")
.add(FOAF.FIRST_NAME, "Pablo")
.add(LOCN.LOCATION, Values.literal("Spain", "en"))
// TODO .add(LOCN.LOCATION, Values.literal("España", "es"))
.add(LOCN.LOCATION, Values.literal("España", "es"))
.build();
}

Expand Down
6 changes: 6 additions & 0 deletions common/rdf/src/test/resources/picasso.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"@value": "Spain"
}
],
"http://www.w3.org/ns/locn#location": [
{
"@language": "es",
"@value": "España"
}
],
"http://xmlns.com/foaf/0.1/firstName": [
{
"@value": "Pablo"
Expand Down
2 changes: 1 addition & 1 deletion common/rdf/src/test/resources/picasso.thing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
iri: http://example.enola.dev/Picasso
fields:
http://www.w3.org/ns/locn#location: { lang_string: { text: "Spain", lang: en } }
# TODO http://www.w3.org/ns/locn#location: { lang_string: { text: "España", lang: es } }
http://www.w3.org/ns/locn#location: { lang_string: { text: "España", lang: es } }
http://xmlns.com/foaf/0.1/firstName: { string: "Pablo" }
http://www.w3.org/1999/02/22-rdf-syntax-ns#type: { link: { iri: "http://example.enola.dev/Artist" } }
3 changes: 2 additions & 1 deletion common/rdf/src/test/resources/picasso.turtle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

ex:Picasso a ex:Artist;
<http://xmlns.com/foaf/0.1/firstName> "Pablo";
<http://www.w3.org/ns/locn#location> "Spain"@en .
<http://www.w3.org/ns/locn#location> "Spain"@en ;
<http://www.w3.org/ns/locn#location> "España"@es .

0 comments on commit 4552148

Please sign in to comment.