{"id":40634490,"url":"https://github.com/steinarb/modelstore","last_synced_at":"2026-01-21T07:43:52.339Z","repository":{"id":28735006,"uuid":"32256332","full_name":"steinarb/modelstore","owner":"steinarb","description":"Java library holding a generic model intended as the underlying model of an Eclipse GEF editor.","archived":false,"fork":false,"pushed_at":"2026-01-19T20:26:51.000Z","size":3011,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T02:14:57.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://steinarb.github.io/modelstore/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steinarb.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-03-15T11:12:39.000Z","updated_at":"2026-01-19T20:26:16.000Z","dependencies_parsed_at":"2025-08-22T07:17:51.347Z","dependency_job_id":"a3515e35-4eb2-4808-9ddd-d08bba87c8e2","html_url":"https://github.com/steinarb/modelstore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/steinarb/modelstore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fmodelstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fmodelstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fmodelstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fmodelstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steinarb","download_url":"https://codeload.github.com/steinarb/modelstore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fmodelstore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-21T07:43:48.450Z","updated_at":"2026-01-21T07:43:52.329Z","avatar_url":"https://github.com/steinarb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Modelstore: a typless modeling framework\n** What is this?\n\n This is a small Java library intended to hold a model consisting of objects and relations in memory.\n\n The main use case for this library is to be used as a generic model container for an Eclipse GEF editor.  Because of this, and because it does no harm, and because I kind of like OSGi, this library is packaged as an OSGi bundle.\n\n The API is meant to be as clutter-free as possbile in use: it should throw no exceptions, and it should return no nulls (instead of null it will return the empty string, empty collections and zero values for the numeric types).\n\n The PropertySet interface defines the API of objects that forms both objects and relationships of the model.\n\n This library is licensed under the Eclipse Public License.  See the\n file LICENSE for the terms and specifics of the license.\n** Development stuff\n\n[[https://github.com/steinarb/modelstore/actions/workflows/modelstore-maven-ci-build.yml][file:https://github.com/steinarb/modelstore/actions/workflows/modelstore-maven-ci-build.yml/badge.svg]]\n[[https://coveralls.io/r/steinarb/modelstore][file:https://coveralls.io/repos/steinarb/modelstore/badge.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=alert_status#.svg]]\n\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/images/project_badges/sonarcloud-white.svg]]\n\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=sqale_index#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=coverage#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=ncloc#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=code_smells#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=sqale_rating#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=security_rating#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=bugs#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=vulnerabilities#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=duplicated_lines_density#.svg]]\n[[https://sonarcloud.io/summary/new_code?id=steinarb_modelstore][file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_modelstore\u0026metric=reliability_rating#.svg]]\n\n  - [[https://github.com/steinarb/modelstore][Source code repository]]\n  - [[https://coveralls.io/r/steinarb/modelstore][Test coverage history on coveralls]]\n  - [[http://steinarb.github.io/modelstore/javadoc/][javadoc generated by the latest github actions build]]\n\n** Installing on karaf\n\nThe modelstore can't be used for anything, yet.  But it can be installed on apache karaf:\n 1. Clone and build the project (requires git, java \u003e= 1.8 and maven installed):\n    #+BEGIN_EXAMPLE\n      git clone https://github.com/steinarb/modelstore.git\n      cd modelstore\n      mvn clean install\n    #+END_EXAMPLE\n 2. Install apache karaf using the [[https://karaf.apache.org/manual/latest/quick-start.html][karaf quick start]]\n 3. In the karaf console give the following commands:\n    #+BEGIN_EXAMPLE\n      feature:repo-add mvn:no.priv.bang.modeling.modelstore/modelstore.backend/LATEST/xml/features\n      feature:install modelstore.backend\n    #+END_EXAMPLE\n\n* Roadmap [18/55]\n** DONE Fix the test coverage of all property values (hashCode, equals and toString ruined coverage)\n** DONE Put javadoc from travis builds on the web\n** TODO Add javadocs to everything\n** DONE Rename \"propertyvalue\" to \"value\" in type names\n\nHaving \"property\" in the name doesn't make sense for the list of values, and make the type names longer than they have to be.\n** DONE Refactor the propertyvalue creation into something that makes sense for a library bundle\n - Maybe a static method on the PropertyValue interface, if that's possible?\n - Or make that creation methods on the interface, backed by a class with static methods?\n** DONE Create typespecific add and set operations to the ValueList interface\n** DONE Create primitive-value setters for Propertyset\n** DONE Change \"propertyName\" to \"propertyname\" in arguments\n** DONE Add clone or copy constructor operation to Propertyset\n** DONE Add clone or copy constructor to ValueList\n** DONE Add copy-on-set for complex properties and list values\n - Primitives and lists are immutable and can be shared\n - Lists and complex properties should not be shared\n   - For complex properties this can be accomplished with a clone operation\n   - For list properties, probably a clone here as well\n** DONE Add list creation method on the PropertysetManager interface, to make it possible to create ValueList instances outside of the bundle\n** DONE Put some basic aspects in place (object, relationship, model, aspectcontainer)\n** DONE Split off ModelContext [5/5]\n - Modelstore will be the access point for creating and saving ModelContext instances\n - This is an approach at making the system multithreaded and performant\n   - Minimal locking on the propertysets themselves, because there is only on thread using them at a time\n   - No need to copy the property values, because they are immutable (except for complexproperty and listproperty, that is...)\n     - Use shallow copy on list and complex object property get, perhaps?\n*** DONE Persist and instantiation should use PropertysetContext\n*** DONE Extract an interface for PropertysetContext\n*** DONE Add methods to the PropertysetManager to store and receive PropertysetContexts\n*** DONE Store metadata (last modification time, at first)\n*** DONE Create a merge operation that will merge all aspects and propertysets\n - Merge will not touch the id property so merging with an empty object with a different id will be to effectively make a copy with a different id\n   - This may be useful\n** DONE Rename the PropertysetManager interface to Modelstore\n** DONE Rename PropertysetContext to ModelContext\n** DONE Store exception errors in the Modelstore\n - The parsing and file/stream operations give a lot of possible error situation that right now go untracked\n - Add a logError method to the ModelContext\n - Let the ModelContext pass the error to the Modelstore\n - Create an ErrorBean with getters only and a constructor initializing the fields:\n   - Date when the error occurred\n   - ModelContext where the error occurred\n   - Errormessage\n   - Exception caught\n - Create an interface with methods\n   - reportError(String message, Exception e)\n   - boolean hasErrors()\n   - Collection\u003cErrorBean\u003e listErrors()\n - Let the ModelContext and Modelstore interfaces inherit this interface\n - Should be thread safe with a minimal locked critical region\n   - Wrap the error list in a synchronized list\n   - Synchronize on the list before doing a shallow copy in getErrors()\n** DONE Add UUIDs of built-in aspects to Modelstore\n - Create an interface with the getters for these IDs (a \"protocol\")\n - Let Modelstore inherit this interface\n - Try the following implementation: create a class implementing this interface and let ModelstoreBase inherit it, as well as implementing the Modelstore\n - Can use the same approach for value creation if of interest\n** DONE Switch from Jsr330Activator to OSGi Declarative Service (DS)\n - \u003c2019-08-12 man. 11:54\u003e The single jar was split into modelstore.services defining the OSGi services and a modelstore.backend containing the DS component\n - \u003c2019-08-12 man. 11:56\u003e The gogoshell stuff was deleted and karaf features were created instead\n** TODO Replace logging to ErrorBean with the OSGi LogService\n** TODO Separate the modelstore implementation holding model in memory into an OSGi library bundle (maybe)\n - \u003c2019-08-12 man. 20:54\u003e modelstore.backend is to become a DS component that initially saves to and restores from disk\n - \u003c2019-08-12 man. 20:56\u003e need a good name for the model-in-memory library before I can create the model\n - \u003c2019-08-12 man. 21:02\u003e The serialization/deserialization code doesn't need to be part of this library\n - \u003c2019-08-12 man. 21:03\u003e modelstore.model is probably a good name for the library,\n - \u003c2019-08-12 man. 21:20\u003e classes that should be migrated to modelstore.model, are:\n   1. Aspects\n   2. BooleanValue\n   3. BuiltinAspectsBase\n   4. ComplexValue\n   5. DoubleValue\n   6. EmptyValue\n   7. EmptyValueList\n   8. IdValue\n   9. ListValue\n   10. LongValue\n   11. NilValue\n   12. PropertysetImpl\n   13. PropertysetNil\n   14. Propertysets\n   15. PropertysetValueBase\n   16. ReferenceValue\n   17. StringValue\n   18. ValueArrayList\n   19. ValueBase\n   20. Values\n - \u003c2019-08-12 man. 21:21\u003e classes that should not be migrated to modelstore.model, are:\n   1. JsonGeneratorWithReferences\n   2. JsonPropertysetPersister\n   3. ModelstoreProvider (this is the DS component)\n - \u003c2019-08-12 man. 21:24\u003e classes I'm unsure of should be migrated to modelstore.model, are:\n   1. ModelContextImpl\n   2. ModelContextRecordingMetadata\n   3. ModelContexts\n   4. ModelstoreBase\n   5. PropertysetRecordingSaveTime\n - \u003c2019-08-12 man. 21:38\u003e Looks like not all classes in modelstore.model should be visible\n - \u003c2019-08-12 man. 21:39\u003e A static creator class and/or singleton is not a good pattern for OSGi: then it's better to create a DS component\n - \u003c2019-08-12 man. 21:49\u003e What should the inteface exposed by the DS component be called?\n   - \u003c2019-08-12 man. 21:50\u003e Some name candidates for the interface:\n     1. Model (probably wrong. Model should be a parent object containing other objects)\n     2. ModelFactory (more correct, but suffixing with \"Factory\" is overused, and suffixing is bad practice anyway)\n     3. ObjectFactory (most correct. However, maybe too \"overused\"...?)\n     4. ModelBuilder (sounds good, but might make people expect the builder pattern...?)\n     5. ModelProducer\n     6. ObjectProducer\n - \u003c2023-04-03 Mon 13:37\u003e Current plan:\n   1. First create a ValueCreator interface in modelstore.services, that contains all the methods in the static class Values\n   2. Then create a new bundle modelstore.values that contains a DS component that implements ValueCreator\n   3. Then (maybe) create an Aspects interface (not sure what should go into it?)\n   4. Then (again: maybe) create a new bundle modelstore.aspects that contains a DS component for Aspects\n   5. Then create a Models interface for creating and composing Models in modelstore.services\n   6. Then create a bundle modelstore.models containing a DS component that provides a DS component for Models and requires the ValueCreator service\n** TODO create an OSGi bundle modelstore.client\n - \u003c2019-08-12 man. 21:27\u003e This is a to be a convenient starting point for using modelstore\n - \u003c2019-08-12 man. 21:30\u003e Design:\n   1. Create an interface in modelstore.services called ModelstoreClient (maybe just a subtype of Modelstore?)\n   2. in modelstore.client create a DS component that receives a Modelstore service and exposes a ModelstoreClient service\n   3. This allows for having an in-process modelstore or a modelstore accessed through a REST API\n   4. For an in-process modelstore this should be a thin wrapper\n   5. For a remote modelstore this library should maintain the in-memory model\n** TODO Create modelstore.db.liquibase bundle to define the JDBC schema\n - \u003c2019-08-12 man. 22:14\u003e The objects themselves should be stored to disk and/or a git blob store\n - \u003c2019-08-12 man. 22:15\u003e The schema should define object interconnection and metadata (but I don't have clear vision of how it should look)\n** TODO use the Modelstore DatabaseService in modelstore.backend\n** TODO create a modelstore.web.security OSGi bundle (connect with shiro and authservice)\n** TODO create a modelstore.web.api OSGi bundle providing a REST API\n** TODO Create a modelstore-specific DatabaseService interface in modelstore.services\n** TODO Create modelstore.db.derbytest OSGi bundle\n** TODO Create modelstore.db.postgresql OSGi bundle\n** TODO Connect a minimal hardcoded model to eclipse GEF\n** TODO Implement JSON storage for eclipse GEF models\n** TODO Split ModelContext objects\n - Separate out a propertyset and all the propertysets it depends on to a separate ModelContext\n - Should be thread safe before it is set to complete\n** TODO Add version information to the metadata object\n - Since the metadata object will be first in all files, it is a good place to put machine and human readable version information\n** TODO Add local and modified flags to the metadata object\n - The idea is that objects that aren't created locally, and have been locally modified are the ones that needs to be saved back to a remote server\n** TODO Order propertysets by dependency when serializing\n - Aspects should come before propertysets referencing them\n - Base aspects should come before aspects inheriting them\n - Propertysets being referenced should come before propertysets referencing them\n   - Contents of a container should come before the container\n   - Endpoints of a relationship should come before the\n   - Propertyset fronted by graphical proxy propertyset should come before the proxies\n** TODO Introduce a DateTime primitive type in value\n - Not so easy, since JSON doesn't have a syntactic marker for this\n - The metadata object stores and restores Date objects with millisecond accuracy, but the values are stored as JSON strings with a custom format (human readable)\n - This could be something on the aspect, but I don't see how to do this cleanly during parsing\n   - It could be parsed as a string value, and then converted to a DateTime value on access or when an aspect is applied\n** TODO Add verification code for aspects\n - Check a propertyset to see if it has the required propertysets for an aspect\n - Check the propertyset to see if it brings anything meaningful to the table (ie. property definitions)\n** TODO Add AspectViwer (connected to aspect container and used as a filter)\n** TODO Create a read-only propertyset wrapper with defensive copy-on-read for complex properties and lists\n - Use this with the built-in aspects\n** TODO Create a proxy aspect\n - Contains a single property that is a reference to a different propertyset\n - Think about how a proxy should be handled in an aspect container\n   - It would be nice if the actual application of the aspect could \"pass through\" to the proxied propertyset\n   - The graphical information (position, symbol) should be added to the proxy\n** TODO Test serialization/deserialization using YAML (YAML has object id and object reference)\n** TODO Storage based on SQL for relationships and references and individual JSON files\n*** TODO Individual Propertyset files git versioned\n*** TODO Metatada into the RDBMS\n - Per propertyset load time\n - Per propertyset last modified time\n - Propertyset delete time\n** TODO Storage based on PostgreSQL with native JSON support\n** TODO Get PropertysetManager with storage running in Karaf\n** TODO Move interface definitions to a separate bundle\n - This may be necessary when creating more components in a server setting (servlet component, and SQL server component)\n** TODO Move Jackson serialization to a separate bundle (maybe a library bundle?)\n - The functionality of JsonPropertysetPersister must be available in some fashion from the Modelstore\n - JsonPropertysetPersister parsing and unparsing will be needed for:\n   - parsing JSON messages from clients (REST requests)\n   - Creating JSON messages to send to clients (REST responses)\n   - Loading and saving individual objects in a jgit based versioned storage\n** TODO Create a RESTful API and a storage/persist mechanism on top of it\n** TODO Create a query language (or find something usable and implement/use)\n - Possibilities\n   - I like s-expressions\n   - Is there something in JSON that could be used\n   - Just implement something as nested complex objects and let its JSON representation be the wire format\n** TODO Make an s-expression-factory for jackson\nMaybe actually two separate:\n - S-expression directly on jackson\n - sxml on top of the existing XML serialization/deserialization\n** TODO Make merge operation thread safe\n - \u003c2015-07-25 lør 15:44\u003e Not doing this for now, too hard to be certain with the current implementation\n** TODO Add propertyvalue creation methods on the ModelStore interface, to make them accessible to the world\n - Not sure if this is necessary with the primitive value setters in place for both Propertyset and Valuelist?\n** TODO Decide if the PropertysetRecordingSaveTime should compare equal to a PropertysetRecordingSaveTime from a different ModelContext\n - \u003c2015-07-14 tir 17:49\u003e I couldn't compare two propertsets that should have been equal with assertEquals() in a test\n   - I can't decide what's the correct thing to do here, so I compared the unwrapped propertysets instead\n** TODO Switch to defensive copy on read for list and complex properties (have to think about this)\n - This is the only (practical) way to track changes to list and complex properties\n   - Wrap the complex properties and the lists will be just too much work\n** TODO Rename Propertyset to Valueset\n - Don't know if I will go through with this...?\n** TODO Wrap the propertysets and aspects returned from the metadata-setting ModelContext\n - What was this about?  Is this something other than the current wrapping?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinarb%2Fmodelstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinarb%2Fmodelstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinarb%2Fmodelstore/lists"}