private Builder override(Builder __superior) { if (__superior.id != null) id(__superior.id); if (__superior.name != null) name(__superior.name); if (__superior.version != null) version(__superior.version); if (__superior.headerstruct != null) headerstruct(__superior.headerstruct); if (__superior.bodystruct != null) bodystruct(__superior.bodystruct); if (!__superior.inherits.isEmpty()) inherits.addAll(__superior.inherits); if (!__superior.datatype.isEmpty()) datatype.addAll(__superior.datatype); if (!__superior.annotationtype.isEmpty()) annotationtype.addAll(__superior.annotationtype); fieldsets(__superior.fieldsets); if (!__superior.referencetype.isEmpty()) referencetype.addAll(__superior.referencetype); return this; }
public Builder(Documenttype config) { id(config.id()); name(config.name()); version(config.version()); headerstruct(config.headerstruct()); bodystruct(config.bodystruct()); for (Inherits i : config.inherits()) { inherits(new Inherits.Builder(i)); } for (Datatype d : config.datatype()) { datatype(new Datatype.Builder(d)); } for (Annotationtype a : config.annotationtype()) { annotationtype(new Annotationtype.Builder(a)); } for (Map.Entry<String, Fieldsets> __entry : config.fieldsets().entrySet()) { fieldsets(__entry.getKey(), new Fieldsets.Builder(__entry.getValue())); } for (Referencetype r : config.referencetype()) { referencetype(new Referencetype.Builder(r)); } }
private void buildConfig(FieldSet fs, DocumenttypesConfig.Documenttype.Builder db) { db.fieldsets(fs.getName(), new DocumenttypesConfig.Documenttype.Fieldsets.Builder().fields(fs.getFieldNames())); }