protected void validateId(Schema schema) {
        if (schema == null) return;
        if (schema.getDocument(getName()) == null) return;
        SDDocumentType doc = schema.getDocument();
        throw new IllegalArgumentException("Failed creating document type '" + getName() + "', " +
                                           "document type '" + doc.getName() + "' already uses ID '" + doc.getName() + "'");
    }
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