Simplify the generation of node references in ReferenceManager and NameManager

Registered by Danil Sokolov

Currently a functor Func<Node, String> is passed to ReferenceManager that generates a prefix part of the reference for each type of nodes. This functor is subsequently passed to NameManager. The problem with this approach is that there is no default functor and each model needs to define the prefix generation again.

A better solution is to have a method "public String getPrefix(Node)" defined both in the NameManager and ReferenceManager interfaces. The default implementation of this method can be placed in AbstractModel class (givign prefix "node" to all the nodes). This can be extended in the AbstractMathModel class for specific types of nodes (calling super.getPrefix in the end), and in all the descendant classes in a similar way.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Low
Drafter:
Danil Sokolov
Direction:
Needs approval
Assignee:
Danil Sokolov
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 3.0.1
Started by
Danil Sokolov
Completed by
Danil Sokolov

Sprints

Whiteboard

(?)

Work Items

Work items:
Add "String getPrefix(Node)" in NameManager and ReferenceManager interfaces: DONE
Add "void setDefaultNameIfUnnamed(Node)" in the NameManager interface: DONE
Adjust all the reference managers and name managers to the modified interfaces: DONE
Update all MathModels to the new way of specifying node prefixes: DONE

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.