Class ByOrganisation

java.lang.Object
org.apache.creadur.whisker.model.ByOrganisation
All Implemented Interfaces:
Comparable<ByOrganisation>, ContentElement

public class ByOrganisation extends Object implements Comparable<ByOrganisation>, ContentElement
Relates the responsible group or individual to one or more resources.
  • Constructor Details

    • ByOrganisation

      public ByOrganisation(Organisation organisation, Collection<Resource> resources)
      Links an individual or group to the resources for which they have responsibility.
      Parameters:
      resources - not null
      organisation - not null
  • Method Details

    • getName

      public String getName()
      Gets the name of the individual or group responsible.
      Returns:
      not null
    • getURL

      public String getURL()
      Gets the primary URL for the individual or group responsible.
      Returns:
      not null
    • getId

      public String getId()
      Gets the primary identifier for the individual or group responsible.
      Returns:
      not null
    • getResources

      public Collection<Resource> getResources()
      Gets the resource for which the linked individual or group is responsible.
      Returns:
      not null, possibly empty
    • getOrganisation

      public Organisation getOrganisation()
      Gets the organisation representing the individual or group responible for the linked resources.
      Returns:
      the organisation , not ull
    • hashCode

      public final int hashCode()
      Based on organisation.
      Overrides:
      hashCode in class Object
      Returns:
      hash based on organisation
      See Also:
    • equals

      public boolean equals(Object obj)
      Equal iff organisations are equal.
      Overrides:
      equals in class Object
      Parameters:
      obj - possibly null
      Returns:
      true when organisations are equal, false otherwise
      See Also:
    • compareTo

      public int compareTo(ByOrganisation other)
      Delegates to organisation.
      Specified by:
      compareTo in interface Comparable<ByOrganisation>
      Parameters:
      other - possibly null
      Returns:
      Organisation.compareTo(Organisation)
      See Also:
    • accept

      public void accept(Visitor visitor)
      Accepts a visitor.
      Specified by:
      accept in interface ContentElement
      Parameters:
      visitor - possibly null
    • toString

      public String toString()
      Describes object suitably for logging.
      Overrides:
      toString in class Object
      Returns:
      something suitable for logging