Open
Conversation
This commit introduces a new approach to handling ORM type registration in OSGi environments that avoids the race conditions inherent in dynamic service discovery patterns. Key additions: 1. TypeMetadata interface (owl-orm-api) - Provides metadata about generated OWL ORM types - Includes type IRI, parent type IRIs, and hierarchy depth - Computed statically at code generation time 2. TypeRegistry interface (owl-orm-api) - Central registry for TypeMetadata instances - Supports lookup by Class, IRI, or String - Provides sorted lookups (most specific first) for type hierarchy queries 3. SimpleTypeMetadata/SimpleTypeRegistry (owl-orm-engine) - Thread-safe implementations using ConcurrentHashMap - Support for source-based unregistration (for bundle tracking) 4. OsgiTypeRegistry (owl-orm-osgi) - OSGi service component using BundleTracker - Discovers TypeMetadata via ServiceLoader from bundle classloaders - Registers types during bundle STARTING phase before services activate 5. OsgiThingFactory (owl-orm-osgi) - OSGi service providing ThingFactory + type hierarchy operations - Methods matching Mobi OrmFactoryRegistry API patterns 6. Code generator updates (owl-orm-generate) - Generates TypeMetadata implementation classes for each OWL class - Generates META-INF/services file for ServiceLoader discovery Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…multiple owl:Ontology definitions in the same file. Also added fallback logic to use the ontology file name if there is no label on the owl:Ontology object itself.
…basic package to fix OSGi runtime errors. Fixed some logic when referenced things are not present in the underlying model of a BaseThing and added equality and hashCode methods. Changed BaseThingFactory to use the type's class loader instead of the OwlOrmInvocationHandler's class loader. Made clearOut methods in OwlOrmInvocationHandler valid for functional and non-functional. Added _Resource methods for generated object properties to avoid merging models if necessary. Updated OwlOrmInvocationHandler methods that retrieve values to create a new Thing if one does nto exist in the underlying model. Updated GeneratingOntology to ensure all transitive parents are considered. Fixed where TypeMetadata is written to for OSGi bundle loading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated by Claude, but makes the library compatible with OSGi consumers.