You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
4.3 KiB
134 lines
4.3 KiB
package com.fr.plugin.shdcmap.data; |
|
|
|
import com.fr.extended.chart.AbstractDataConfig; |
|
import com.fr.extended.chart.ExtendedField; |
|
import com.fr.stable.AssistUtils; |
|
import com.fr.stable.xml.XMLPrintWriter; |
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
/** |
|
* @author duan.jingliang |
|
* @date 2020/11/13 |
|
*/ |
|
public class CustomDataConfig extends AbstractDataConfig { |
|
|
|
private ExtendedField code = new ExtendedField(); |
|
private ExtendedField name = new ExtendedField(); |
|
private ExtendedField type = new ExtendedField(); |
|
private ExtendedField icon = new ExtendedField(); |
|
private ExtendedField coords = new ExtendedField(); |
|
private ExtendedField convert = new ExtendedField(); |
|
|
|
|
|
@Override |
|
protected void readAttr(XMLableReader xmLableReader) { |
|
readExtendedField(code, "code", xmLableReader); |
|
readExtendedField(name, "name", xmLableReader); |
|
readExtendedField(type, "type", xmLableReader); |
|
readExtendedField(icon, "icon", xmLableReader); |
|
readExtendedField(coords, "coords", xmLableReader); |
|
readExtendedField(convert, "convert", xmLableReader); |
|
} |
|
|
|
@Override |
|
protected void writeAttr(XMLPrintWriter xmlPrintWriter) { |
|
writeExtendedField(code, "code", xmlPrintWriter); |
|
writeExtendedField(name, "name", xmlPrintWriter); |
|
writeExtendedField(type, "type", xmlPrintWriter); |
|
writeExtendedField(icon, "icon", xmlPrintWriter); |
|
writeExtendedField(coords, "coords", xmlPrintWriter); |
|
writeExtendedField(convert, "convert", xmlPrintWriter); |
|
} |
|
|
|
@Override |
|
public ExtendedField[] dataSetFields() { |
|
return new ExtendedField[]{ |
|
code, |
|
name, |
|
type, |
|
icon, |
|
coords, |
|
convert |
|
}; |
|
} |
|
|
|
@Override |
|
public CustomDataConfig clone() throws CloneNotSupportedException { |
|
CustomDataConfig result = new CustomDataConfig(); |
|
result.setCode(this.getCode().clone()); |
|
result.setName(this.getName().clone()); |
|
result.setType(this.getType().clone()); |
|
result.setIcon(this.getIcon().clone()); |
|
result.setCoords(this.getCoords().clone()); |
|
result.setConvert(this.getConvert().clone()); |
|
return result; |
|
} |
|
|
|
@Override |
|
public int hashCode() { |
|
return super.hashCode() + AssistUtils.hashCode(this.getCode(),this.getName(),this.getType(),this.getIcon(),this.getCoords(),this.getConvert()); |
|
} |
|
|
|
@Override |
|
public boolean equals(Object obj) { |
|
return obj instanceof CustomDataConfig |
|
&& AssistUtils.equals(this.getCode(), ((CustomDataConfig) obj).getCode()) |
|
&& AssistUtils.equals(this.getName(), ((CustomDataConfig) obj).getName()) |
|
&& AssistUtils.equals(this.getType(), ((CustomDataConfig) obj).getType()) |
|
&& AssistUtils.equals(this.getIcon(), ((CustomDataConfig) obj).getIcon()) |
|
&& AssistUtils.equals(this.getCoords(), ((CustomDataConfig) obj).getCoords()) |
|
&& AssistUtils.equals(this.getConvert(), ((CustomDataConfig) obj).getConvert()) |
|
&& AssistUtils.equals(this.getCustomFields(), ((CustomDataConfig) obj).getCustomFields()) |
|
&& AssistUtils.equals(this.getCustomNameField(), ((CustomDataConfig) obj).getCustomNameField()) |
|
&& AssistUtils.equals(this.getCustomValueField(), ((CustomDataConfig) obj).getCustomValueField()) |
|
; |
|
} |
|
|
|
public ExtendedField getName() { |
|
return name; |
|
} |
|
|
|
public void setName(ExtendedField name) { |
|
this.name = name; |
|
} |
|
|
|
public ExtendedField getType() { |
|
return type; |
|
} |
|
|
|
public void setType(ExtendedField type) { |
|
this.type = type; |
|
} |
|
|
|
public ExtendedField getIcon() { |
|
return icon; |
|
} |
|
|
|
public void setIcon(ExtendedField icon) { |
|
this.icon = icon; |
|
} |
|
|
|
public ExtendedField getCode() { |
|
return code; |
|
} |
|
|
|
public void setCode(ExtendedField code) { |
|
this.code = code; |
|
} |
|
|
|
public ExtendedField getCoords() { |
|
return coords; |
|
} |
|
|
|
public void setCoords(ExtendedField coords) { |
|
this.coords = coords; |
|
} |
|
|
|
public ExtendedField getConvert() { |
|
return convert; |
|
} |
|
|
|
public void setConvert(ExtendedField convert) { |
|
this.convert = convert; |
|
} |
|
}
|
|
|