Use an iteration variable in walker

This commit is contained in:
Dan Hawkins 2021-12-21 17:30:16 +00:00
commit 72b5f6de79

View file

@ -927,7 +927,7 @@ class MetaInfo extends GISJsonSerialised {
class IterationInfo {
private ArrayList<CollectedMeta> metacollection
private Map<String, CollectedMeta>() metamap
private Map<String, CollectedMeta> metamap
private String comment
private int level
private String gatheredpath
@ -1002,13 +1002,14 @@ class MetaInfo extends GISJsonSerialised {
ii.maxdepth - 1)
def results = othermeta.walkrelated_v0_1(nextii)
ii.metacollection = results.metacollection
ii.metamap = results.metamap
ii.comment = results.comment
} else {
script.error("There is non v0.1 format related meta info under v0.1 related meta info")
}
}
}
return [ 'metacollection' : ii.metacollection, 'comment': ii.comment ]
return [ 'metacollection' : ii.metacollection, 'metamap' : ii.metamap, 'comment': ii.comment ]
}
def walkrelated(IterationInfo ii) {
@ -1031,6 +1032,7 @@ class MetaInfo extends GISJsonSerialised {
ii.maxdepth - 1)
def results = childmetainfo.childmeta.walkrelated(nextii)
ii.metacollection = results.metacollection
ii.metamap = results.metamap
ii.comment = results.comment
}
} else if (!relatedmetainfo.format || relatedmetainfo.format == '0.1') {
@ -1045,11 +1047,12 @@ class MetaInfo extends GISJsonSerialised {
ii.maxdepth - 1)
def results = othermeta.walkrelated_v0_1(nextii)
ii.metacollection = results.metacollection
ii.metamap = results.metamap
ii.comment = results.comment
}
}
}
return [ 'metacollection' : ii.metacollection, 'comment': ii.comment ]
return [ 'metacollection' : ii.metacollection, 'metamap' : ii.metamap, 'comment': ii.comment ]
}
def allrelatedmeta(String metapath = '') {,