Open brianjahnke opened 3 years ago
Hi Brian, almost as in #1, we have started working on this suggestion and created some generalizing interfaces. The first improvements, covering most of what you suggest here, should be ready in roughly three weeks from today. Thanks for the great suggestions!
Hi,
all Infomodel Object interfaces seem to share common functions, such as
getId()
,toRdf
,setProperties
andgetProperties
.By defining such it would be possible to operate on IDS objects in a generic way. E.g. call toRdf on all IDS objects regardless if they are ResourceCatalogs or Artifacts (which is currently not possible, see definition of Catalog and Artifact).
getId
,toRdf
. But those are already definied in the parent interfaceCatalog
.It gets even more complicated when looking at classes like
Representation
that inherit multiple interfaces, but all are defining those functions. This makes interfaces larger then they need to be and it obscures how a e.g.ResourceCatalog
differs from aCatalog
.IdsObject
? This IdsObject would inherit those single purpose interface (defined in 1) and every IDS Object would inherit fromIdsObject
. This would also allow to narrow the scope of generic functions and classes because it would allow the usage of<? extends IdsObject>
. At the moment such scoping is not possible since the only common interface is the java base classObject
.