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

15 start a mof2rdf aware variant of the driver #27

Merged
merged 21 commits into from
Feb 3, 2025

Conversation

OwenR-York
Copy link
Contributor

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)

Resource is now public to enable extensions of RDFResource access.

listPropertyValues doesn't need to be public.

Removed the MaxCardinality checking and value return processing.

Reordered the methods involved in the getProperty process, to try and
improve readability. This entire chain of methods could do with a
refactor at some point.
The RDFModel uses RDFResources which do not apply Cardinality checking,
so we always get an ArrayList in an Object back. Thus, the results need
to check the number of properties returned, not types or error messages.
@OwenR-York OwenR-York linked an issue Jan 31, 2025 that may be closed by this pull request
@agarciadom agarciadom merged commit 6fd8f1d into main Feb 3, 2025
4 checks passed
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.

Start a MOF2RDF-aware variant of the driver
2 participants