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

Create attributes containing links to other components (classes) #2

Open
richardmarston opened this issue Jul 24, 2021 · 0 comments
Open
Assignees

Comments

@richardmarston
Copy link
Contributor

Component attribute links

Currently we read the primitive attributes and assign values to the class properties. However, we ignore links to other classes. When a reference to another class is discovered, we need to:

  • find out if the relationship between the two classes is 1:1 or 1:n
  • ensure that both classes have been created in the map
  • populate the link and the reverse link with the object references
    • if it's 1:n, we will add the reference to the list if it's not already there
    • if it's 1:1, we will set the variable to the reference

@m-mirz This is a slight variation on the lazy-linking strategy we discussed. Instead of storing the rdfid and then later updating with a reference, we just create the linked class, which will later have the attributes filled in. A possible problem with this approach is that we could end up creating components that only exist in the file as links. However:

  • there's not a huge difference between a broken link and an empty component
  • that file is badly formed already
  • I'm not convinced that leaving a broken link is a better strategy
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