private Builder enablecompression(String __value) { return enablecompression(Boolean.valueOf(__value)); }
private void buildConfig(NewDocumentType documentType, DocumenttypesConfig.Builder builder) { if (documentType == VespaDocumentType.INSTANCE) { return; } DocumenttypesConfig.Documenttype.Builder db = new DocumenttypesConfig.Documenttype.Builder(); db. id(documentType.getId()). name(documentType.getName()). headerstruct(documentType.getHeader().getId()). bodystruct(documentType.getBody().getId()); Set<Integer> built = new HashSet<>(); for (NewDocumentType inherited : documentType.getInherited()) { db.inherits(new DocumenttypesConfig.Documenttype.Inherits.Builder().id(inherited.getId())); markAsBuilt(built, inherited.getAllTypes()); } for (DataType dt : documentType.getTypes()) { buildConfig(dt, db, built); } for (AnnotationType annotation : documentType.getAnnotations()) { DocumenttypesConfig.Documenttype.Annotationtype.Builder atb = new DocumenttypesConfig.Documenttype.Annotationtype.Builder(); db.annotationtype(atb); buildConfig(annotation, atb); } buildConfig(documentType.getFieldSets(), db); builder.documenttype(db); }
public static DocumenttypesConfig.Builder getDocumentTypesConfig(List<String> sds) { return new DocumentTypes().produce(getSearchBuilder(sds).getModel(), new DocumenttypesConfig.Builder()); }
private Builder override(Builder __superior) { if (__superior.enablecompression != null) enablecompression(__superior.enablecompression); if (!__superior.documenttype.isEmpty()) documenttype.addAll(__superior.documenttype); return this; }
public Builder(DocumenttypesConfig config) { enablecompression(config.enablecompression()); for (Documenttype d : config.documenttype()) { documenttype(new Documenttype.Builder(d)); } }