code: def corelinkformat(resource):
          
          msg = "<" + resource.path + ">;"
          assert(isinstance(resource, Resource))
          keys = sorted(list(resource.attributes.keys()))
          for k in keys:
              method = getattr(resource, defines.corelinkformat[k], None)
              if method is not None and method != "":
                  v = method
                  msg = msg[:-1] + ";" + str(v) + ","
              else:
                  v = resource.attributes[k]
                  if v is not None:
                      msg = msg[:-1] + ";" + k + "=" + v + ","
          return msg
docs: Return a formatted string representation of the corelinkformat in the tree.
  
          :return: the string