Handle v0.1 imported associated meta

This commit is contained in:
Dan Hawkins 2021-12-17 18:03:19 +00:00
commit d93eb4bc23

View file

@ -600,10 +600,12 @@ class MetaInfo extends GISJsonSerialised {
abstract class RelatedMetaInfo extends GISJsonSerialised implements IRelatedMetaInfo {
private String format
private String offsetpath
RelatedMetaInfo(script, format) {
RelatedMetaInfo(script, format, offsetpath) {
super(script)
this.format = format
this.offsetpath = offsetpath
}
abstract void deserialiseJson(rawmeta)
@ -612,15 +614,17 @@ class MetaInfo extends GISJsonSerialised {
String format() {
return format
}
String getoffsetpath() {
return offsetpath
}
}
class RelatedMetaInfo_v0_1 extends RelatedMetaInfo {
String offsetpath
MetaInfo meta
private MetaInfo meta
RelatedMetaInfo_v0_1(script, offsetpath = "", MetaInfo meta = null) {
super(script, '0.1')
this.offsetpath = offsetpath
super(script, '0.1', offsetpath)
this.meta = meta
}
@ -638,16 +642,16 @@ class MetaInfo extends GISJsonSerialised {
]
return data
}
String get
}
class RelatedMetaInfo_v0_2 extends RelatedMetaInfo {
private String importpath
private String offsetpath
RelatedMetaInfo_v0_2(script, importpath = "", offsetpath = "") {
super(script, '0.2')
super(script, '0.2', offsetpath)
this.importpath = importpath
this.offsetpath = offsetpath
}
void deserialiseJson(rawmeta) {
@ -1009,6 +1013,7 @@ class MetaInfo extends GISJsonSerialised {
results.metacollection.add(new CollectedMeta(this, gatheredpath, gatheredmetapath))
results.comment += "${level} ".padRight(level * 4) + globalreleasetag() + '\n'
for (relatedmetainfo in associatedmeta) {
script.echo("Related meta info: ${relatedmetainfo.offsetpath} format: ${relatedmetainfo.format}")
if (relatedmetainfo.format == '0.2') {
def childmetainfo = openchildmeta(gatheredpath, gatheredmetapath, relatedmetainfo)
if (childmetainfo.imported) {