public final class XMLConfigurationReader extends Object implements LicenseReader, MatcherReader
Constructor and Description |
---|
XMLConfigurationReader()
Constructs the XML configuration reader.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Document newDoc)
Merge the new document into the document that this reader processes.
|
void |
addLicenses(URL url)
Adds a URL to the set of files to be read.
|
void |
addMatchers(URL url)
Adds a URL to the set of files to be read.
|
SortedSet<String> |
approvedLicenseId()
Reads the configuration and extracts the list of approved licenses.
|
Log |
getLog()
Returns the log the reader.
|
void |
read(Reader reader)
Read xml from a reader.
|
void |
read(URL... urls)
Read the urls and extract the DOM information to create new objects.
|
SortedSet<ILicenseFamily> |
readFamilies()
Reads the configuration and extracts instances of ILicenseFamily.
|
SortedSet<ILicense> |
readLicenses()
Reads the configuration and extracts instances of ILicense.
|
void |
readMatcherBuilders()
Reads the configuration and MatcherBuilder classes and adds them to Readers.
|
void |
setLog(Log log)
Sets the logger to use during parsing.
|
public XMLConfigurationReader()
public void setLog(Log log)
LicenseReader
setLog
in interface LicenseReader
log
- the log to use.public Log getLog()
DefaultLog.getInstance()
is returned.public void addLicenses(URL url)
LicenseReader
addLicenses
in interface LicenseReader
url
- the URL to read.public void read(Reader reader)
reader
- the reader to read XML from.public void read(URL... urls)
urls
- The URLs to read.public void add(Document newDoc)
newDoc
- the Document to merge.public SortedSet<ILicense> readLicenses()
LicenseReader
readLicenses
in interface LicenseReader
public SortedSet<ILicenseFamily> readFamilies()
LicenseReader
readFamilies
in interface LicenseReader
public SortedSet<String> approvedLicenseId()
LicenseReader
approvedLicenseId
in interface LicenseReader
public void readMatcherBuilders()
MatcherReader
readMatcherBuilders
in interface MatcherReader
public void addMatchers(URL url)
MatcherReader
addMatchers
in interface MatcherReader
url
- the URL to read.Copyright © 2006–2024 Apache Software Foundation. All rights reserved.