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

Start a MOF2RDF-aware variant of the driver #15

Open
agarciadom opened this issue Nov 28, 2024 · 4 comments
Open

Start a MOF2RDF-aware variant of the driver #15

agarciadom opened this issue Nov 28, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@agarciadom
Copy link
Member

The OMG has published a specification providing a standardised mapping from MOF metamodels and models to RDF (including use RDFS and OWL), with some conventions on how to map some MOF-specific features, such as the relative order of the elements of an OrderedSequence:

https://www.omg.org/spec/MOF2RDF/1.0/PDF

We could investigate creating a subclass of the current RDFModel with specialised property getters that are aware of the MOF2RDF transformation (could be called something like MOFAwareRDFModel?), e.g. sorting the resources linked through a property using the linkSequence annotation.

@agarciadom agarciadom added the enhancement New feature or request label Nov 28, 2024
@agarciadom
Copy link
Member Author

Having some initial slides to kick-off the discussion and agree on a strategy would be useful, according to Gian.

@agarciadom agarciadom changed the title Investigate a MOF2RDF-aware variant of the driver Create a MOF2RDF-aware variant of the driver Jan 17, 2025
@agarciadom
Copy link
Member Author

agarciadom commented Jan 17, 2025

Dimitris and I had a brief chat about this. The idea would be to create a MOF2RDFModel subclass of RDFModel, and move the bit about using OWL maxCardinality restrictions to it. MOF2RDFModel would have all the MOF2RDF-specific logic, including its use of linkSequence to support ordered associations (see Section 9.2.6 in MOF2RDF 1.0).

@agarciadom agarciadom changed the title Create a MOF2RDF-aware variant of the driver Start a MOF2RDF-aware variant of the driver Jan 17, 2025
@agarciadom
Copy link
Member Author

agarciadom commented Jan 29, 2025

We could try going for this structure, so that the MOF2RDFModel is kept as simple as possible (turning all new RDFResource(x, y) calls into createResource(x, y) calls, and moving the logic from #14 to MOF2RDFResource):

Image

We'd need to create a new EclipseMOF2RDFModel to maintain the platform: URL compatibility. This will have its own extension in the plugin.xml of the .dt plugin. We may want to move the platform: URL preprocessing to a separate class that gets reused from both EclipseRDFModel and EclipseMOF2RDFModel.

@OwenR-York
Copy link
Contributor

OwenR-York commented Jan 29, 2025

To support different flavours of RDFModels like MOF2RDF, specific pairs of Model and Resource type extensions will be used.

Property "gets" happen through the RDFResource class, before invoking the more general propertyGetter. Therefore, the type and creation of Resources need to be adapted to enable different getProperty results processing.

Change how RDFModel creates RDFResources

  • RDFModel.java - Add createResource()
  • Replace all references to new Resource with createResource()
  • Check tests are passing

Create MOF2RDF extensions for (RDF) Model and Resource

  • MOF2RDFModel.createResource() should return a MOF2RDFResource
  • MOF2RDFResource.getProperty() should override RDFModel.getProperty with "MOF2RDF" property processing (call super now, change processes later).
  • Duplicate a set of tests that use MOF2RDFModel in place of RDFModel (no changes to functionality yet)

Change getProperty() on RDFResourcel and MOF2RDFResource

  • Remove the Max Cardinality processing from RDFResource to MOF2RDF.getProperty()
  • Correct the RDFTest results, which no should not follow "Max Cardinality"
  • Check tests

Create EclipseMOF2RDFModel extension

  • Separate the Protocol parser from EclipseRDFModel
  • Duplicate the EclipseRDFModel but for MOF2RDFModel types

UI updates

  • Add a new MOF2RDF Model type to the ADD model button
  • Add a Dialogue (duplicate RDFModelConfigurationDialog)
  • As a stretch goal, could I try adding *.ttl to the workspace filter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants