[josm-dev] [PATCH] OsmPrimitive / PrimitiveData refactoring
phaaurlt at googlemail.com
Thu May 26 22:48:54 BST 2011
There are two structures
OsmPrimitive / Node / Way / Relation
PrimitiveData / NodeData / WayData / RelationData.
Both have much in common, however, the class trees are unrelated at the moment. In order to avoid code duplication when it really doesn't matter if you have an object from the 1st or from the 2nd category, I put common features to an interface and added an abstract base class [1,2]. The above classes can be replaced by the respective interface
IPrimitive / INode / IWay / IRelation
when only common functionality is needed. Commit  shows, how this would look in practice: In my use case, I'd like to upload PrimitiveData objects without converting them to OsmPrimitive first.
Haven't checked the history stuff, maybe this can be consolidated as well, somehow.
More information about the josm-dev