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 }