Package org.apache.creadur.whisker.model
Class LicenseAndOrganisationCollator
java.lang.Object
org.apache.creadur.whisker.model.Visitor
org.apache.creadur.whisker.model.LicenseAndOrganisationCollator
Collates licenses and organisations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the licenses collected.Gets the organisations collected.boolean
isOnlyLicense
(License license) Was this the only license collected?boolean
isOnlyOrganisation
(String primaryOrganisationId) Is there only one organisation collected with the given id?toString()
Something useful for logging.boolean
Don't traverse resources.void
visit
(ByOrganisation byOrganisation) VisitsByOrganisation
.void
visit
(WithLicense license) VisitsWithLicense
.Methods inherited from class org.apache.creadur.whisker.model.Visitor
traverseByOrganisation, traversePublicDomain, traverseWithLicense, visit, visit
-
Constructor Details
-
LicenseAndOrganisationCollator
public LicenseAndOrganisationCollator()
-
-
Method Details
-
getLicenses
Gets the licenses collected.- Returns:
- not null
-
getOrganisation
Gets the organisations collected.- Returns:
- not null
-
traverseResource
public boolean traverseResource()Don't traverse resources.- Overrides:
traverseResource
in classVisitor
- Returns:
- false
- See Also:
-
visit
VisitsWithLicense
. -
isOnlyLicense
Was this the only license collected?- Parameters:
license
- not null- Returns:
- true when the collection contains just this license, false when no licenses or any other licenses were collected
-
visit
VisitsByOrganisation
. -
toString
Something useful for logging. -
isOnlyOrganisation
Is there only one organisation collected with the given id?- Parameters:
primaryOrganisationId
- not null- Returns:
- true when only one organisation has been collected and it has the given id
-