Handle v0.1 imported associated meta

This commit is contained in:
Dan Hawkins 2021-12-17 18:28:34 +00:00
commit f44dc09dab

View file

@ -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
}