public final class XmlMetaWriter extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
DEFAULT_FILE_SEPARATOR
Default(UNIX) file separator.
|
private static java.util.regex.Pattern |
FILEPATH_CONVERSION
Compiled pattern for
. used for generating file paths from package names. |
private static java.lang.String |
XML_TAG_DESCRIPTION
Description tag of metadata XML files.
|
private static java.lang.String |
XML_TAG_NAME
Name tag of metadata XML files.
|
| Modifier | Constructor and Description |
|---|---|
private |
XmlMetaWriter()
Do no allow
XmlMetaWriter instances to be created. |
| Modifier and Type | Method and Description |
|---|---|
private static void |
createPropertySection(ModuleDetails moduleDetails,
org.w3c.dom.Element checkModule,
org.w3c.dom.Document doc)
Create the property section of the module detail object.
|
static void |
write(ModuleDetails moduleDetails)
Helper function to write module details to XML file.
|
private static void |
writeToFile(org.w3c.dom.Document document,
ModuleDetails moduleDetails)
Function to write the prepared document object into an XML file.
|
private static final java.util.regex.Pattern FILEPATH_CONVERSION
. used for generating file paths from package names.private static final java.lang.String XML_TAG_NAME
private static final java.lang.String XML_TAG_DESCRIPTION
private static final java.lang.String DEFAULT_FILE_SEPARATOR
private XmlMetaWriter()
XmlMetaWriter instances to be created.public static void write(ModuleDetails moduleDetails) throws javax.xml.transform.TransformerException, javax.xml.parsers.ParserConfigurationException
moduleDetails - module detailsjavax.xml.transform.TransformerException - if a transformer exception occursjavax.xml.parsers.ParserConfigurationException - if a parser configuration exception occursprivate static void createPropertySection(ModuleDetails moduleDetails, org.w3c.dom.Element checkModule, org.w3c.dom.Document doc)
moduleDetails - module detailscheckModule - root doc elementdoc - document objectprivate static void writeToFile(org.w3c.dom.Document document, ModuleDetails moduleDetails) throws javax.xml.transform.TransformerException
document - document updated with all module metadatamoduleDetails - the corresponding module details objectjavax.xml.transform.TransformerException - if a transformer exception occursCopyright © 2001-2022. All Rights Reserved.