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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<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.
    boolean
    Hook for public domain.
    void
    visit(org.apache.creadur.whisker.model.Resource resource)
    Accepts a visit to a resource.
    void
    visit(org.apache.creadur.whisker.model.WithinDirectory directory)
    Accepts a directory visit.
    void
    visit(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResourceSourceAuditor

      public ResourceSourceAuditor()
  • Method Details

    • traversePublicDomain

      public boolean traversePublicDomain()
      Hook for public domain.
      Overrides:
      traversePublicDomain in class org.apache.creadur.whisker.model.Visitor
      Returns:
      false (no need to traverse public domain)
      See Also:
      • Visitor.traversePublicDomain()
    • 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:
      visit in class org.apache.creadur.whisker.model.Visitor
      Parameters:
      directory - not null
      See Also:
      • Visitor.visit(WithinDirectory)
    • visit

      public void visit(org.apache.creadur.whisker.model.WithLicense license)
      Accepts a license visit.
      Overrides:
      visit in class org.apache.creadur.whisker.model.Visitor
      Parameters:
      license - not null
      See Also:
      • Visitor.visit(WithLicense)
    • visit

      public void visit(org.apache.creadur.whisker.model.Resource resource)
      Accepts a visit to a resource.
      Overrides:
      visit in class org.apache.creadur.whisker.model.Visitor
      Parameters:
      resource - not null
      See Also:
      • Visitor.visit(Resource)
    • getResourcesRequiringSourceLinks

      public Collection<org.apache.creadur.whisker.model.Resource> getResourcesRequiringSourceLinks()
      Gets those resources visited which require source links.
      Returns:
      not null, possibly empty