Package org.apache.creadur.whisker.model
Class ByOrganisation
java.lang.Object
org.apache.creadur.whisker.model.ByOrganisation
- All Implemented Interfaces:
Comparable<ByOrganisation>
,ContentElement
Relates the responsible group or individual to one
or more resources.
-
Constructor Summary
ConstructorDescriptionByOrganisation
(Organisation organisation, Collection<Resource> resources) Links an individual or group to the resources for which they have responsibility. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Accepts a visitor.int
compareTo
(ByOrganisation other) Delegates to organisation.boolean
Equal iff organisations are equal.getId()
Gets the primary identifier for the individual or group responsible.getName()
Gets the name of the individual or group responsible.Gets the organisation representing the individual or group responible for the linked resources.Gets the resource for which the linked individual or group is responsible.getURL()
Gets the primary URL for the individual or group responsible.final int
hashCode()
Based on organisation.toString()
Describes object suitably for logging.
-
Constructor Details
-
ByOrganisation
Links an individual or group to the resources for which they have responsibility.- Parameters:
resources
- not nullorganisation
- not null
-
-
Method Details
-
getName
Gets the name of the individual or group responsible.- Returns:
- not null
-
getURL
Gets the primary URL for the individual or group responsible.- Returns:
- not null
-
getId
Gets the primary identifier for the individual or group responsible.- Returns:
- not null
-
getResources
Gets the resource for which the linked individual or group is responsible.- Returns:
- not null, possibly empty
-
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. -
equals
Equal iff organisations are equal. -
compareTo
Delegates to organisation.- Specified by:
compareTo
in interfaceComparable<ByOrganisation>
- Parameters:
other
- possibly null- Returns:
Organisation.compareTo(Organisation)
- See Also:
-
accept
Accepts a visitor.- Specified by:
accept
in interfaceContentElement
- Parameters:
visitor
- possibly null
-
toString
Describes object suitably for logging.
-