Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Replacing persisted elements of an object heirarchy..
[Teneo] Replacing persisted elements of an object heirarchy.. [message #606865] Wed, 06 June 2007 10:58
Duncan Alexander is currently offline Duncan AlexanderFriend
Messages: 90
Registered: July 2009
Member
[Not sure if this should be here or in the EMF list...but here goes]

I am building a system which stores statistical metadata in a registry. I need to be able to replace
sections of this metadata but feel I may not be using EMF and Teneo to their full potential here.

The architecture dictates that the statistical metadata is represented in a model from which an EMF
datagraph has been generated. The datagraph is then persisted in a database using Teneo and Hibernate.

The datagraph has a fairly simple heirarchy of the form

Container
- CodeList
- Code
- Code
- ...
- ConceptScheme
- Concept
- Concept
- ...
- KeyFamily
- Attributes...
- Dimensions...
- Measures....
- Agency

-----------------------------

- Metadata is loaded into the system using XML documents structured as above.

- Every element in the datagraph is of type Identifiable which are keyed on unique URNs.

- The model allows relations between the Identifiable objects which is orthogonal to the basic
heirarchy shown above. I.e. Objects contain references to the URNs of other Identifiables.
E.g. Attributes references codes, KeyFamilies reference agencies, Attributes reference concepts etc
etc. The URN keys are generated based on these relationships.

It is a requirement of the system that the 'main sections' of metadata can be replaced, CodeLIsts,
KeyFamilies etc etc e.g. A CodeList and all its codes could be replaced with a new CodeList with the
same URN but with additional codes to those in the original CodeList.

The incoming replacement section of metadata must include direct replacement for any subelements
(codes, concepts etc) which are already referenced by other elements in the datagraph. In otherwords
it must contain a subelement which has the same URN although it may contain additional info over and
above this.

To do this every object keeps track of its references to other objects and the referees (objects
which refer to it). Then, when an object replacement is needed the original section and any sub
elements are loaded from the database and 'unpicked' from the original datagraph, then the
references are transferred onto the new section and this is persisted to the DB and the original
section deleted.

Phew....sound confusing.....yes, because it is and I cant help feeling that I am doing this the
extra long way.

My question is do I need to go through the process of loading all of the elements from the DB and
then calculating all the references and referees for transferal to be able to replace a section of
the datagraph.?

Would it be easier (better) being done directly in the DB by replacing data directly which would
implicitly update the references rather than in the Object layer which requires that object
references have to be moved.?

I hope someone understand the nature of the problem as Im having trouble even explaining it...

kind regards

Duncan
Previous Topic:error when I validate an ecore with Eclipse Europa
Next Topic:[teneo] XML(Gregorian)Calendar or GregorianCalendar
Goto Forum:
  


Current Time: Fri Sep 20 11:42:05 GMT 2024

Powered by FUDForum. Page generated in 0.03838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top