public void inherit(SDDocumentType type) {
        if (type == null) return;
        if (type.getName().equals(this.getName()))
            throw new IllegalArgumentException("Document type '" + getName() + "' cannot inherit itself");
        if (! inheritedTypes.containsKey(type.getDocumentName())) {
            inheritedTypes.put(type.getDocumentName(), type);
        }
    }
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 schema check for type ID collisions in this search definition
config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java