code: public static Link buildConstraintLink(final ConstraintViolationException e,
                                             final ServletContext context,
                                             final UriInfo uriInfo) {
  
          String path = context.getContextPath();
          if (path.equals("/")) {
              path = "";
          }
  
          final String constraintURI = uriInfo == null ? "" : String.format("%s://%s%s%s%s.rdf",
                  uriInfo.getBaseUri().getScheme(), uriInfo.getBaseUri().getAuthority(), path,
                  CONSTRAINT_DIR, e.getClass().toString().substring(e.getClass().toString().lastIndexOf('.') + 1));
          return Link.fromUri(constraintURI).rel(CONSTRAINED_BY.getURI()).build();
      }
docs: Creates a constrainedBy link header with the appropriate RDF URL for the exception.
  
  @param e ConstraintViolationException Exception which implements the buildContraintUri method.
  @param context ServletContext ServletContext that we're running in.
  @param uriInfo UriInfo UriInfo from the ExceptionMapper.
  @return Link A http://www.w3.org/ns/ldp#constrainedBy link header