code: public static Optional<IRI> getContainer(final IRI identifier) {
          if (identifier.getIRIString().equals(TRELLIS_DATA_PREFIX)) {
              return Optional.empty();
          }
          final String path = identifier.getIRIString().substring(TRELLIS_DATA_PREFIX.length());
          final int index = Math.max(path.lastIndexOf('/'), 0);
          return Optional.of(rdf.createIRI(TRELLIS_DATA_PREFIX + path.substring(0, index)));
      }
docs: Get the structural-logical container for this resource.
  
  @param identifier the resource identifier
  @return a container, if one exists. Only the root resource would return empty here.