code: protected int scoreServiceDocument(ODataRequestContext requestContext, MediaType requiredMediaType) {
          if (isServiceDocument(requestContext.getUri())) {
              int scoreByFormat = scoreByFormat(getFormatOption(requestContext.getUri()), requiredMediaType);
              int scoreByMediaType = scoreByMediaType(requestContext.getRequest().getAccept(), requiredMediaType);
              return max(scoreByFormat, scoreByMediaType);
          } else {
              return DEFAULT_SCORE;
          }
      }
docs: Calculate a score for a 'Service Document Renderer' based on
  a given OData request context and required media type.
  
  @param requestContext    The given OData request context.
  @param requiredMediaType The required media type.
  @return The calculated score.