code: private void validateAgainstContentModel(ValidationResult result,
                                               String cm,
                                               ObjectInfo object) {
          String contentModelPid;
          if (cm.startsWith("info:fedora/")){
              contentModelPid = cm.substring(12);
          } else{
              result.addNote(ValidationResultNotation
                      .unrecognizedContentModelUri(cm));
              return;
          }
  
          try {
              ContentModelInfo contentModel =
                      objectSource.getContentModelInfo(contentModelPid);
              if (contentModel == null) {
                  result.addNote(ValidationResultNotation
                          .contentModelNotFound(contentModelPid));
              } else {
                  for (DsTypeModel typeModel : contentModel.getTypeModels()) {
                      confirmMatchForDsTypeModel(result,
                                                 typeModel,
                                                 contentModelPid,
                                                 object);
                  }
              }
          } catch (ObjectSourceException e) {
              result.addNote(ValidationResultNotation
                      .errorFetchingContentModel(contentModelPid, e));
              return;
          } catch (InvalidContentModelException e) {
              result.addNote(ValidationResultNotation.contentModelNotValid(e));
          }
      }
docs: <p>
  Validate each content model relation.
  </p>
  <p>
  If the content model relation doesn't point to an object PID, note that
  and give up. Same if no object is found at that PID.
  </p>
  <p>
  If we find an actual content model object, verify that the original
  object satisfies the content model.
  </p>