public SDDocumentType getType(NewDocumentType.Name name) {
        SDDocumentType type = ownedTypes.get(name);
        if (type == null) {
            for (SDDocumentType inherited : inheritedTypes.values()) {
                type = inherited.getType(name);
                if (type != null) {
                    return type;
                }
            }
        }
        return type;
    }
For adding structs defined in document scope

@param dt the struct to add
@return self, for chaining
config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java