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

Add RDF backend to Concept Description repository #167

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhrimaz
Copy link
Contributor

@mhrimaz mhrimaz commented Dec 30, 2023

This pull request will add a new backend to Concept Description repository that uses RDF representation of AAS and stores information in a Triplestore (Apache Jena).
This is the first step towards native RDF-based knowledge graph approach to interact with AAS. Leveraging RDF will allow to run SPARQL queries, SHACL for complex constraint validation, and semantic reasoning.

The exact timeplan will be provided after approval. Followings are the list of tasks. :

  • Basic POC and structure
  • Add test cases
  • Implement CRUD operations
  • Generalize and test with other Triplestores (Ontotext GraphDB)
  • Migrate RDF de-/serialization to AAS4j

@FrankSchnicke
Copy link
Contributor

This would be a really nice addition to BaSyx!
I guess delegating the RDF serialization to a third-party service is only for the POC, right?
In AAS4J, there was already an implementation of RDF of V3RC02, cf. eclipse-aas4j/aas4j@f45cf98 for the commit removing it. Maybe you can reuse parts of it?

@mhrimaz
Copy link
Contributor Author

mhrimaz commented Jan 3, 2024

I guess delegating the RDF serialization to a third-party service is only for the POC, right?

Yes, it is a temporary solution for now.

In AAS4J, there was already an implementation of RDF of V3RC02, cf. eclipse-aas4j/aas4j@f45cf98 for the commit removing it.

I also checked the AAS4j, but many internal things changed and removed which made it hard for me to go through the entire code base and trace changes. So I did my own python implementation. But in case there is no one in AAS4j dev team to fix it, then I will try my best.

@FrankSchnicke
Copy link
Contributor

For AAS4J, RDF is not on our immediate roadmap. Thus, it would be highly appreciated if you could contribute an implementation - even if it just focused on ConceptDescriptions.

@wiresio
Copy link

wiresio commented Jan 12, 2024

@mhrimaz - I now understand the discussion that we had in: aas-core-works/aas-core-codegen#427

I already prototyped your idea for Submodels using the following chain (if I remember correctly):

  • Duplicate feature-mqtt to feature-fuseki (such that it is triggered in the same way)
  • Convert the JSON Submodel data via JSON-LD context to triples
  • Upload to Fuseki

Attached you can find the respective code for inspiration: FusekiSubmodelRepository.java.txt

@mhrimaz
Copy link
Contributor Author

mhrimaz commented Jan 12, 2024

@wiresio Thanks for sharing, I will also take a look at that.

Definitely, in the future, we can extend it to the Submodel and Shell repositories. But since they have more complex behavior, I started with Concept Description.

For now I will focus more on having RDF de-/serializer in AAS4j. I am working on that right now. When AAS4j is done, it shouldn't be hard to finish the CD repository with RDF backend.

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

Successfully merging this pull request may close these issues.

3 participants