Task #2056
Mutualize and clarify the result nodes tree hierarchy
Status: | Closed | Start date: | 03/04/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% |
|
Category: | Development | Spent time: | - | |
Target version: | TXM 0.8.0a (split/restructuration) |
Description
Mutualize and clarify the result nodes tree hierarchy. It will also permit to avoid cyclic dependencies in plug-ins.
Solution¶
- define methods in TXMResult (or TXMObject?): getParent(), getChildren(), delete(), deleteChild(int index), etc. and copy(), clone() ?
- override these in subclasses that needs to free some other resources/objects
- check the way that the toolbox uses to remove an object from R (RServeVariablesView) and enhance it (at this moment it tests the instanceof each object leading to cyclic dependencies in plug-ins)
- define method updateChild(int index) to update a child result from modification of its parent?
- use the methods in the result adapters
NOTE: these adapters are used to fill the tree of the corpora view:
- see: /org.txm.rcp/src/main/java/org/txm/rcpapplication/TextometrieContentProvider.java
- and: /org.txm.rcp/src/main/java/org/txm/rcpapplication/TextometrieLabelProvider.java
SJ: First proposal:
- define TXMResult
- define TXMObject extends TXMResult
- find a better name for TXMObject
- redefine Function role:
- does only computation and produces a TXMResult
- this class is used to monitor a computation
- delete/merge HasResult
- delete/merge Result
- check that all commands inherit from TXMResult
- class org.txm.core.results.TXMResult.java and interface org.txm.core.results.ITXMResult.java has been developed
- interface ITXMResult was needed for some TXM abstract results as LexicalTable, LexicalTableImpl, etc.
- HasResult, Result and old TXMResult classes have been removed/merged
- TxmObject inherits from new TXMResult (need to clarify here, the name are not well chosen)
- Actual hierarchy
- TXMResult <- Function <- A function (with thread canceling support)
- TXMResult <- A result (without thread canceling support)
- TXMResult <- TxmObject <- an object
- IChartResult <- ITXMResult (used for export purpose)
- Still in progress:
- need to clarify the Function class role and name
- need to clarify the TxmObject role and name
- the problem here is a TxmObject needs methods from TXMResult but that's strange to have a TxmObject that inherits from a result in terms of semantic
History
#1 Updated by Sebastien Jacquot about 4 years ago
- Description updated (diff)
#2 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#3 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#4 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#5 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#6 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#7 Updated by Sebastien Jacquot over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Done in 0.8, need to explain it in dev Wiki.