Package org.apache.rat.configuration
Class XMLConfigurationReader
java.lang.Object
org.apache.rat.configuration.XMLConfigurationReader
- All Implemented Interfaces:
LicenseReader
,MatcherReader
A class that reads the XML configuration file format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Merge the new document into the document that this reader processes is building.void
addLicenses
(URI uri) Adds a URI to the set of files to be read.void
addMatchers
(URI uri) Adds a URI to the set of files to be read.Reads the configuration and extracts the list of approved licenses.void
Read xml from a reader.void
Read the uris and extract the DOM information to create new objects.Reads the configuration and extracts instances of ILicenseFamily.Reads the configuration and extracts instances of ILicense.void
Reads the configuration and MatcherBuilder classes and adds them to Readers.
-
Constructor Details
-
XMLConfigurationReader
public XMLConfigurationReader()Constructs the XML configuration reader.
-
-
Method Details
-
addLicenses
Description copied from interface:LicenseReader
Adds a URI to the set of files to be read.- Specified by:
addLicenses
in interfaceLicenseReader
- Parameters:
uri
- the URI to read.
-
read
Read xml from a reader.- Parameters:
reader
- the reader to read XML from.
-
read
Read the uris and extract the DOM information to create new objects.- Parameters:
uris
- The URIs to read.
-
add
Merge the new document into the document that this reader processes is building.- Parameters:
newDoc
- the Document to merge.
-
readLicenses
Description copied from interface:LicenseReader
Reads the configuration and extracts instances of ILicense.- Specified by:
readLicenses
in interfaceLicenseReader
- Returns:
- A collection of ILicense.
-
readFamilies
Description copied from interface:LicenseReader
Reads the configuration and extracts instances of ILicenseFamily.- Specified by:
readFamilies
in interfaceLicenseReader
- Returns:
- A collection of ILicenseFamily.
-
approvedLicenseId
Description copied from interface:LicenseReader
Reads the configuration and extracts the list of approved licenses.- Specified by:
approvedLicenseId
in interfaceLicenseReader
- Returns:
- The list of approved licenses specified in the configuration or an empty list if none specified.
-
readMatcherBuilders
public void readMatcherBuilders()Description copied from interface:MatcherReader
Reads the configuration and MatcherBuilder classes and adds them to Readers.- Specified by:
readMatcherBuilders
in interfaceMatcherReader
-
addMatchers
Description copied from interface:MatcherReader
Adds a URI to the set of files to be read.- Specified by:
addMatchers
in interfaceMatcherReader
- Parameters:
uri
- the URI to read.
-