code: private String resolveSubjectToDatastream(String subject) throws ServerException{
          String pidURI = PID.toURI(m_obj.getPid());
          if (subject.startsWith(pidURI)) {
              if (subject.length() == pidURI.length()) {
                  return "RELS-EXT";
              }
              if (subject.charAt(pidURI.length()) == '/') {
                  return "RELS-INT";
              }
          }
          throw new GeneralException("Cannot determine which relationship datastream to update for subject " + subject + ".  Relationship subjects must be the URI of the object or the URI of a datastream within the object.");
      }
docs: from the relationship subject, determine which datastream to modify etc