src/main/java/com/theoryinpractise/halbuilder5/ResourceRepresentation.java
public ResourceRepresentation<V> withNamespace(String namespace, String href) {
    if (!rels.containsKey("curies")) {
      rels = rels.put("curies", Rels.collection("curies"));
    }

    final NamespaceManager updatedNamespaceManager =
        namespaceManager.withNamespace(namespace, href);
    return new ResourceRepresentation<>(
        content, links, rels, updatedNamespaceManager, value, resources);
  }
public ResourceRepresentation<V> withNamespace(String namespace, String href) {
    if (!rels.containsKey("curies")) {
      rels = rels.put("curies", Rels.collection("curies"));
    }

    final NamespaceManager updatedNamespaceManager =
        namespaceManager.withNamespace(namespace, href);
    return new ResourceRepresentation<>(
        content, links, rels, updatedNamespaceManager, value, resources);
  }
Adds a new namespace.

@param namespace The CURIE prefix for the namespace being added.
@param href The target href of the namespace being added. This may be relative to the
resourceFactories baseref
@return A new instance of a PersistentRepresentation with the namespace included.