Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (core): Test lang_string in 2 langs (en + es) #540

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 .