org.apache.creadur.whisker.app.analysis
public class LicenseAnalyst extends Object
Constructor and Description |
---|
LicenseAnalyst()
Constructs empty analyst.
|
LicenseAnalyst(Collection<Directory> directories)
Analyse the given directories.
|
Modifier and Type | Method and Description |
---|---|
LicenseAnalyst |
analyse(Descriptor work)
Discover discrepancies between meta-data and source directories.
|
Collection<ResourceDescription> |
getDuplicates()
Gets duplicate resources.
|
Collection<ResourceDescription> |
getExtraLicenses()
Gets surplus licenses.
|
Collection<ResourceDescription> |
getIssues(ResourceDefinitionError ofType)
Gets issues by type.
|
Collection<ResourceDescription> |
getMissingLicenses()
Gets missing license.
|
Collection<ResourceDescription> |
getResourcesMissingSources()
Gets resources whose sources are missing.
|
boolean |
isValid()
Were any errors found?
|
String |
toString()
Describes suitably for logging.
|
Descriptor |
validate(Descriptor work)
Checks the descriptor against the source directories.
|
public LicenseAnalyst()
public LicenseAnalyst(Collection<Directory> directories)
directories
- not nullpublic LicenseAnalyst analyse(Descriptor work)
work
- not nullpublic boolean isValid()
public Descriptor validate(Descriptor work) throws ResourceDefinitionException
work
- not nullResourceDefinitionException
- when issues are foundpublic Collection<ResourceDescription> getResourcesMissingSources()
public Collection<ResourceDescription> getExtraLicenses()
public Collection<ResourceDescription> getMissingLicenses()
public Collection<ResourceDescription> getDuplicates()
public Collection<ResourceDescription> getIssues(ResourceDefinitionError ofType)
ofType
- not nullpublic String toString()
toString
in class Object
Object.toString()
Copyright © 2011-2013 Apache Software Foundation. All Rights Reserved.