Package org.apache.creadur.whisker.model
Class WithinDirectory
java.lang.Object
org.apache.creadur.whisker.model.WithinDirectory
- All Implemented Interfaces:
Comparable<WithinDirectory>
,ContentElement
Links resources expected within a directory in the distribution
to licensing meta-data.
-
Constructor Summary
ConstructorDescriptionWithinDirectory
(String name, Collection<WithLicense> licenses, Collection<ByOrganisation> publicDomain) Constructs a description of a directory -
Method Summary
Modifier and TypeMethodDescriptionvoid
Accepts a visitor.int
compareTo
(WithinDirectory other) Based on name.boolean
Based on directory name.Gets resources contained, grouped by license applicable.getName()
Gets the name of the directory described.Gets resources in the public domain, grouped by the organisation responsible.int
hashCode()
Based on name.boolean
Does the directory described have the given name?
-
Constructor Details
-
WithinDirectory
public WithinDirectory(String name, Collection<WithLicense> licenses, Collection<ByOrganisation> publicDomain) Constructs a description of a directory- Parameters:
name
- directory name, not nulllicenses
- resources contained, grouped by license applicable, not nullpublicDomain
- resources in the public domain, grouped by responsible organisation
-
-
Method Details
-
getPublicDomain
Gets resources in the public domain, grouped by the organisation responsible.- Returns:
- not null
-
getName
Gets the name of the directory described.- Returns:
- not null
-
getLicenses
Gets resources contained, grouped by license applicable.- Returns:
- not null
-
hashCode
public int hashCode()Based on name. -
equals
Based on directory name. -
compareTo
Based on name.- Specified by:
compareTo
in interfaceComparable<WithinDirectory>
- Returns:
- based on name
- See Also:
-
isNamed
Does the directory described have the given name?- Parameters:
directoryName
- not null- Returns:
- true when the name match that of this directory, false otherwise
-
accept
Accepts a visitor.- Specified by:
accept
in interfaceContentElement
- Parameters:
visitor
- possibly null
-