primaryLicense
Finds the primary license for the given document from the given licenses.
- Parameters:
document
- not nulllicenses
- not null- Returns:
- not null
build(InputStream xmlStream)
build(org.jdom2.Document document)
byOrganisation(org.jdom2.Element byOrganisation,
Map<String,Organisation> organisationsById)
byOrganisation(org.jdom2.Element element,
Organisation organisation)
collectByOrganisations(org.jdom2.Element parent,
Map<String,Organisation> map)
collectContents(org.jdom2.Document document,
Map<String,License> licenses,
Map<String,Organisation> organisations)
collectResources(org.jdom2.Element element)
license(org.jdom2.Element element)
mapLicenses(org.jdom2.Document document)
mapNotices(org.jdom2.Document document)
mapOrganisations(org.jdom2.Document document)
organisation(org.jdom2.Element element)
organisation(org.jdom2.Element element,
Map<String,Organisation> organisationsById)
parameters(org.jdom2.Element element)
primaryCopyrightNotice(org.jdom2.Document document)
primaryLicense(org.jdom2.Document document,
Map<String,License> licenses)
primaryNotice(org.jdom2.Document document)
primaryOrganisationId(org.jdom2.Document document)
publicDomain(Map<String,Organisation> organisations,
org.jdom2.Element parent)
resource(org.jdom2.Element element)
withinDirectory(org.jdom2.Element element,
Map<String,License> licenses,
Map<String,Organisation> organisations)
withLicense(org.jdom2.Element element,
Map<String,License> licenses,
Map<String,Organisation> organisations)
withLicenses(Map<String,License> licenses,
Map<String,Organisation> organisations,
org.jdom2.Element parent)
element
- not nullUnexpectedElementException
- when element is not named 'resource'element
- , not nullOrganisation
not nullUnexpectedElementException
- when element is not named 'organisation'element
- JDOM element to collect.element
- modelled ByOrganisation, not nullorganisationsById
- organisations identified, not nullMissingIDException
- when the linked organisation is not found in the given mapelement
- not nullorganisation
- not nullbyOrganisation
- not nullorganisationsById
- not nullMissingIDException
- when the linked organisation is not found in the given mapparent
- not nullmap
- not nullelement
- not nullelement
- not nulllicenses
- not nullMissingIDException
- when referenced license isn't found in the collectionelement
- not nulllicenses
- not nullorganisations
- not nullMissingIDException
- when referenced license isn't found in the collectionelement
- not nullDuplicateElementException
- when two parameters shared the same namelicenses
- not nullorganisations
- not nullparent
- not nullorganisations
- not nullparent
- not nullelement
- not nulllicenses
- not nullorganisations
- not nulldocument
- , not nulldocument
- , not nulldocument
- not nulllicenses
- not nulldocument
- not nulldocument
- , not nulldocument
- , not nulldocument
- , not nulldocument
- not nulllicenses
- not nullorganisations
- not nullDuplicateElementException
- when directory names are not uniquedocument
- not nullorg.jdom2.JDOMException
IOException