code: public static Address parse(String addressStr) {
          Address address = root();
  
          if (addressStr == null) {
              return address;
          }
  
          addressStr = addressStr.trim();
          if (addressStr.isEmpty()) {
              return address;
          }
  
          String[] resources = addressStr.split("/");
          for (String resource : resources) {
              resource = resource.trim();
              if (resource.isEmpty()) {
                  continue; // skip empty string - its usually due to first char in address being "/"
              }
              String[] typeAndName = resource.split("=");
              String type = typeAndName[0].trim();
              String name = (typeAndName.length == 2) ? typeAndName[1].trim() : "";
              address.add(type, name);
          }
  
          return address;
      }
docs: Parses a flat address string that has the syntax "/type1=name/type2=name/.../typeN=nameN".
  
  @param addressStr flat address string
  @return address