Skip to content

Commit

Permalink
feat (core): Introduce Enola's new YAML RDF & TextProto format
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Mar 23, 2024
1 parent 9f6782d commit 5c30a50
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2024 The Enola <https://enola.dev> 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 {}
41 changes: 41 additions & 0 deletions common/thing/src/test/resources/picasso.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2024 The Enola <https://enola.dev> 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
36 changes: 36 additions & 0 deletions common/thing/src/test/resources/picasso.things.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2024 The Enola <https://enola.dev> 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

0 comments on commit 5c30a50

Please sign in to comment.