code: @Override
      public Map<String, SegmentData> getTRSegments(String trId,
          DocumentType type, String documentId, String language)
              throws ServiceException {
          if (trId == null || trId.isEmpty()) {
              throw new IllegalArgumentException("Non-empty trId must be specified.");
          }
          if (documentId == null || documentId.isEmpty()) {
              throw new IllegalArgumentException("Non-empty documentId must be specified.");
          }
          if (language == null || language.isEmpty()) {
              throw new IllegalArgumentException("Non-empty languageId must be specified.");
          }
  
          GetSegmentsResponse resp = invokeApiJson(
                  "GET",
                  escapePathSegment(account.getInstanceId()) + "/v2/doc-trs/"
                      + escapePathSegment(trId) + "/" + type.toString().toLowerCase() + "/"
                      + escapePathSegment(documentId) + "/" + language,
                  null,
                  GetSegmentsResponse.class);
  
          if (resp.getStatus() == Status.ERROR) {
              throw new ServiceException(resp.getMessage());
          }
  
          Map<String, SegmentData> resultEntries = new TreeMap<String, SegmentData>();
          if (resp.segments != null && !resp.segments.isEmpty()) {
              for (Entry<String, RestSegmentData> entry : resp.segments.entrySet()) {
                  resultEntries.put(entry.getKey(),
                          new SegmentDataImpl(entry.getValue()));
              }
          }
          return resultEntries;
      }
docs: /* (non-Javadoc)
  @see com.ibm.g11n.pipeline.client.ServiceClient#getTRSegments(java.lang.String, com.ibm.g11n.pipeline.client.DocumentType, java.lang.String, java.lang.String)