java.lang.Object
java.lang.Record
org.gcube.informationsystem.resourceregistry.http.headers.link.LinkRelation
Record Components:
rel - the link relation type (e.g. "parent", "collection", "up", "type", "supertype", "first", "prev", "next")
targetUri - the absolute target URI of the related resource

public record LinkRelation(String rel, String targetUri) extends Record
A single RFC 8288 Link header relation accumulated by a PEP for the current request.
Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • LinkRelation

      public LinkRelation(String rel, String targetUri)
      Creates an instance of a LinkRelation record class.
      Parameters:
      rel - the value for the rel record component
      targetUri - the value for the targetUri record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rel

      public String rel()
      Returns the value of the rel record component.
      Returns:
      the value of the rel record component
    • targetUri

      public String targetUri()
      Returns the value of the targetUri record component.
      Returns:
      the value of the targetUri record component