@SuppressWarnings("deprecation") private void setNewType(DocumentType type) { header = type.contentStruct().createFieldValue(); body = type.getBodyType().createFieldValue(); }
/** * Creates a new document type. * The document type id will be generated as a hash from the document type name. * * @param name The name of the new document type * @param search check for type ID collisions in this search definition */ @SuppressWarnings("deprecation") public SDDocumentType(String name, Search search) { docType = new DocumentType(name); docType.contentStruct().setCompressionConfig(new CompressionConfig()); docType.getBodyType().setCompressionConfig(new CompressionConfig()); validateId(search); inherit(VESPA_DOCUMENT); }
document.getDocumentType().getBodyType().setCompressionConfig(cfg);
NewDocumentType dt = new NewDocumentType(new NewDocumentType.Name(sdoc.getName()), sdoc.getDocumentType().contentStruct(), sdoc.getDocumentType().getBodyType(), sdoc.getFieldSets(), convertDocumentReferencesToNames(sdoc.getDocumentReferences())); handleStruct(dt, sdoc.getDocumentType().getBodyType());
name(dt.getName()). headerstruct(dt.contentStruct().getId()). bodystruct(dt.getBodyType().getId()); for (DocumentType inherited : dt.getInheritedTypes()) { doc.inherits(new Datatype.Documenttype.Inherits.Builder().name(inherited.getName()));