From f44dc09dab4eb08b89c14298c0cc9032dd3ed355 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 17 Dec 2021 18:28:34 +0000 Subject: [PATCH] Handle v0.1 imported associated meta --- meta/folder.groovy | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meta/folder.groovy b/meta/folder.groovy index 7dd4521..cccc456 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -600,7 +600,7 @@ class MetaInfo extends GISJsonSerialised { abstract class RelatedMetaInfo extends GISJsonSerialised implements IRelatedMetaInfo { private String format - protected String offsetpath + private String offsetpath RelatedMetaInfo(script, format, offsetpath) { super(script) @@ -618,6 +618,10 @@ class MetaInfo extends GISJsonSerialised { String getoffsetpath() { return offsetpath } + + void setoffsetoffsetpath(String offsetpath) { + this.offsetpath = offsetpath + } } class RelatedMetaInfo_v0_1 extends RelatedMetaInfo { @@ -629,7 +633,7 @@ class MetaInfo extends GISJsonSerialised { } void deserialiseJson(rawmeta) { - offsetpath = rawmeta['offsetpath'] + setoffsetoffsetpath(rawmeta['offsetpath']) meta = new MetaInfo(script) meta.deserialiseJson(rawmeta['meta']) } @@ -637,7 +641,7 @@ class MetaInfo extends GISJsonSerialised { LinkedHashMap serialisationdata() { def data = [ 'format' : format, - 'offsetpath' : offsetpath, + 'offsetpath' : getoffsetpath(), 'meta' : meta.serialisationdata(), ] return data @@ -656,13 +660,13 @@ class MetaInfo extends GISJsonSerialised { void deserialiseJson(rawmeta) { //format = rawmeta['format'] - offsetpath = rawmeta['offsetpath'] + setoffsetoffsetpath(rawmeta['offsetpath']) } LinkedHashMap serialisationdata() { def data = [ 'format' : format, - 'offsetpath' : offsetpath, + 'offsetpath' : getoffsetpath(), ] return data }