fun restore() { try { if (inCurrentStorage) currentStorage.insertElementSafe(element) else currentStorage.removeElement( element ) if (inApiStorage) apiStorage.insertElementSafe(element) else apiStorage.removeElement( element ) } catch (e: StorageException) { e.printStackTrace() } element.osmId = osmId element.osmVersion = osmVersion element.state = state element.setTags(tags) if (parentRelations != null) { element.parentRelations = ArrayList<Relation>() element.parentRelations.addAll(parentRelations) } else { element.parentRelations = null } }
Restores the saved state of the element