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

Document TOML -> RDF mapping in a machine-readable way (in RDF) #24

Open
Tracked by #146
hoijui opened this issue Feb 22, 2022 · 1 comment
Open
Tracked by #146

Document TOML -> RDF mapping in a machine-readable way (in RDF) #24

hoijui opened this issue Feb 22, 2022 · 1 comment
Assignees

Comments

@hoijui
Copy link
Collaborator

hoijui commented Feb 22, 2022

We convert one machine-readable format (TOML) into an other (RDF/Turtle).
I think it would make sense (and should be easy), to document this mapping in a (at least quasi-)machine-readable way.
I imagine pseudo-code within the RDF ontology,
where each property defines how it is derived from TOML.
This seems a good spot to document this, because anyone who is interested in the mapping from TOML to RDF needs to understand RDF anyway, and at least when changing the RDF, it comes natural to change this mapping too, at the same time, if required.

example (Note the added okh:fromManifestMapping lines):

okh:repository
  a owl:ObjectProperty ;
  rdfs:label "repository" ;
  rdfs:comment '''
    URL to the place where development happens (typically the repository)" ;
    following this link people shall be able to contribute to the development
    (reporting issues, suggesting changes, connecting to the team etc.)" '''@en;
  okh:fromManifestMapping "{repo}" ;
  rdfs:subPropertyOf schema:codeRepository ;
  rdfs:range okh:WebsiteURL ;
  owl:cardinality 1 ;
  rdfs:domain okh:Module ;
  .

okh:repoSnapshot
  a owl:ObjectProperty ;
  rdfs:label "URL respository snapshot (=specific version)" ;
  rdfs:comment "LOSH-Krawler takes the commit hash from the version tag and creates this permalink" ;
  okh:fromManifestMapping "{repo}/tree/{version}/" ;
  rdfs:subPropertyOf okh:repository ;
  rdfs:range okh:WebsiteURL ;
  owl:cardinality 1 ;
  rdfs:domain okh:Module ;
  .

okh:version
  a owl:DatatypeProperty ;
  rdfs:label "version" ;
  rdfs:comment "version of this Component, preferably in the semantic versioning scheme (semver.org)" ;
  okh:fromManifestMapping "{version}" ;
  rdfs:subPropertyOf schema:version ;
  rdfs:domain okh:Module ;
  owl:cardinality 1
  .

_Originally posted by @hoijui in #46

@hoijui
Copy link
Collaborator Author

hoijui commented Feb 22, 2022

https://docs.atomicdata.dev/ might also be useful for this

@hoijui hoijui self-assigned this Jul 29, 2023
@hoijui hoijui transferred this issue from OPEN-NEXT/OKH-LOSH May 30, 2024
@hoijui hoijui mentioned this issue Jul 28, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant