Normalize baseline and source history evidence
This commit is contained in:
@@ -18,6 +18,7 @@ type historyRole uint8
|
||||
|
||||
const (
|
||||
historyRoleDefinition historyRole = iota
|
||||
historyRoleContribution
|
||||
historyRoleCompositeDefinition
|
||||
historyRoleOperation
|
||||
historyRoleControl
|
||||
@@ -54,8 +55,10 @@ type historyObservation struct {
|
||||
}
|
||||
|
||||
type historyModel struct {
|
||||
observations []historyObservation
|
||||
attributions []historyAttribution
|
||||
observations []historyObservation
|
||||
attributions []historyAttribution
|
||||
baseline *document.Node
|
||||
sourcePayloads []historySourcePayload
|
||||
|
||||
shapesByPointer map[string][]Path
|
||||
shapeOrder []Path
|
||||
@@ -116,7 +119,7 @@ func (builder *historyBuilder) addObservation(observation historyObservation) in
|
||||
builder.model.observations = append(builder.model.observations, observation)
|
||||
builder.addShape(observation.path)
|
||||
switch observation.role {
|
||||
case historyRoleDefinition, historyRoleCompositeDefinition, historyRoleCheckpoint:
|
||||
case historyRoleDefinition, historyRoleContribution, historyRoleCompositeDefinition, historyRoleCheckpoint:
|
||||
pointer := observation.path.String()
|
||||
builder.model.observationsByPointer[pointer] = append(builder.model.observationsByPointer[pointer], observationID)
|
||||
case historyRoleOperation, historyRoleControl:
|
||||
|
||||
Reference in New Issue
Block a user