diff --git a/common/thing/src/main/java/dev/enola/thing/yaml/ThingYamlReader.java b/common/thing/src/main/java/dev/enola/thing/yaml/ThingYamlReader.java new file mode 100644 index 000000000..c42995cf5 --- /dev/null +++ b/common/thing/src/main/java/dev/enola/thing/yaml/ThingYamlReader.java @@ -0,0 +1,20 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2024 The Enola Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package dev.enola.thing.yaml; + +public class ThingYamlReader {} diff --git a/common/thing/src/test/resources/picasso.textproto b/common/thing/src/test/resources/picasso.textproto new file mode 100644 index 000000000..694285c2b --- /dev/null +++ b/common/thing/src/test/resources/picasso.textproto @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Copyright 2024 The Enola Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TODO Write this, by hand, as the initial requirements spec + +# proto-file: dev/enola/core/meta/enola_meta.proto +# proto-message: EntityKinds + +# imports: +# - https://enola.dev/namespaces + +# prefixes: +# # rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# +# foaf: http://xmlns.com/foaf/0.1/ +# ex: https://enola.dev/tutorial/artist + +# things: +# ex:Picasso: +# # TODO http://www.w3.org/ns/locn#location: !MLS "Spain"@en +# foaf:firstName: Pablo +# ex:homeAddress: +# ex:city: Barcelona +# ex:street: 31 Art Gallery +# rdf:type: ex:Artist + +# http://example.enola.dev/Dalí: +# foaf:firstName: [Salvador, Domingo, Felipe, Jacinto] +# rdf:type: http://example.enola.dev/Artist diff --git a/common/thing/src/test/resources/picasso.things.yaml b/common/thing/src/test/resources/picasso.things.yaml new file mode 100644 index 000000000..c514e2cad --- /dev/null +++ b/common/thing/src/test/resources/picasso.things.yaml @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Copyright 2024 The Enola Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +imports: + - https://enola.dev/namespaces + +prefixes: + # rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# + foaf: http://xmlns.com/foaf/0.1/ + ex: https://enola.dev/tutorial/artist + +things: + ex:Picasso: + # TODO http://www.w3.org/ns/locn#location: !MLS "Spain"@en + foaf:firstName: Pablo + ex:homeAddress: + ex:city: Barcelona + ex:street: 31 Art Gallery + rdf:type: ex:Artist + + http://example.enola.dev/Dalí: + foaf:firstName: [Salvador, Domingo, Felipe, Jacinto] + rdf:type: http://example.enola.dev/Artist