Class ResourceSourceAuditor
java.lang.Object
org.apache.creadur.whisker.model.Visitor
org.apache.creadur.whisker.app.analysis.ResourceSourceAuditor
public final class ResourceSourceAuditor
extends org.apache.creadur.whisker.model.Visitor
Collects resource source details.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.apache.commons.lang3.tuple.Pair<org.apache.creadur.whisker.model.WithinDirectory, org.apache.creadur.whisker.model.Resource>> Gets the resources missing source collected during visits.Collection<org.apache.creadur.whisker.model.Resource> Gets those resources visited which require source links.Collection<org.apache.commons.lang3.tuple.Pair<org.apache.creadur.whisker.model.WithinDirectory, org.apache.creadur.whisker.model.Resource>> Gets the resources with source collected during visits.booleanHook for public domain.voidvisit(org.apache.creadur.whisker.model.Resource resource) Accepts a visit to a resource.voidvisit(org.apache.creadur.whisker.model.WithinDirectory directory) Accepts a directory visit.voidvisit(org.apache.creadur.whisker.model.WithLicense license) Accepts a license visit.Methods inherited from class org.apache.creadur.whisker.model.Visitor
traverseByOrganisation, traverseResource, traverseWithLicense, visit
-
Constructor Details
-
ResourceSourceAuditor
public ResourceSourceAuditor()
-
-
Method Details
-
traversePublicDomain
public boolean traversePublicDomain()Hook for public domain.- Overrides:
traversePublicDomainin classorg.apache.creadur.whisker.model.Visitor- Returns:
- false (no need to traverse public domain)
- See Also:
-
getResourcesWithSource
public Collection<org.apache.commons.lang3.tuple.Pair<org.apache.creadur.whisker.model.WithinDirectory, org.apache.creadur.whisker.model.Resource>> getResourcesWithSource()Gets the resources with source collected during visits.- Returns:
- the resourcesWithSource, not null
-
getResourcesMissingSource
public Collection<org.apache.commons.lang3.tuple.Pair<org.apache.creadur.whisker.model.WithinDirectory, org.apache.creadur.whisker.model.Resource>> getResourcesMissingSource()Gets the resources missing source collected during visits.- Returns:
- the resourcesMissingSource not null
-
visit
public void visit(org.apache.creadur.whisker.model.WithinDirectory directory) Accepts a directory visit.- Overrides:
visitin classorg.apache.creadur.whisker.model.Visitor- Parameters:
directory- not null- See Also:
-
visit
public void visit(org.apache.creadur.whisker.model.WithLicense license) Accepts a license visit.- Overrides:
visitin classorg.apache.creadur.whisker.model.Visitor- Parameters:
license- not null- See Also:
-
visit
public void visit(org.apache.creadur.whisker.model.Resource resource) Accepts a visit to a resource.- Overrides:
visitin classorg.apache.creadur.whisker.model.Visitor- Parameters:
resource- not null- See Also:
-
getResourcesRequiringSourceLinks
Gets those resources visited which require source links.- Returns:
- not null, possibly empty
-