public class MavenJDOMWriter extends Object
Constructor and Description |
---|
MavenJDOMWriter() |
Modifier and Type | Method and Description |
---|---|
protected org.jdom2.Element |
findAndReplaceProperties(Counter counter,
org.jdom2.Element parent,
String name,
Map props)
Method findAndReplaceProperties
|
protected org.jdom2.Element |
findAndReplaceSimpleElement(Counter counter,
org.jdom2.Element parent,
String name,
String text,
String defaultValue)
Method findAndReplaceSimpleElement
|
protected org.jdom2.Element |
findAndReplaceSimpleLists(Counter counter,
org.jdom2.Element parent,
Collection<String> list,
String parentName,
String childName)
Method findAndReplaceSimpleLists
|
protected org.jdom2.Element |
findAndReplaceXpp3DOM(Counter counter,
org.jdom2.Element parent,
String name,
Xpp3Dom dom)
Method findAndReplaceXpp3DOM
|
protected void |
insertAtPreferredLocation(org.jdom2.Element parent,
org.jdom2.Element child,
Counter counter)
Method insertAtPreferredLocation
|
protected void |
iterateContributor(Counter counter,
org.jdom2.Element parent,
Collection<Contributor> list,
String parentTag,
String childTag)
Method iterateContributor
|
protected void |
iterateDependency(Counter counter,
org.jdom2.Element parent,
Collection<Dependency> list,
String parentTag,
String childTag)
Method iterateDependency
|
protected void |
iterateDeveloper(Counter counter,
org.jdom2.Element parent,
Collection<Developer> list,
String parentTag,
String childTag)
Method iterateDeveloper
|
protected void |
iterateExclusion(Counter counter,
org.jdom2.Element parent,
Collection<Exclusion> list,
String parentTag,
String childTag)
Method iterateExclusion
|
protected void |
iterateExtension(Counter counter,
org.jdom2.Element parent,
Collection<Extension> list,
String parentTag,
String childTag)
Method iterateExtension
|
protected void |
iterateLicense(Counter counter,
org.jdom2.Element parent,
Collection<License> list,
String parentTag,
String childTag)
Method iterateLicense
|
protected void |
iterateMailingList(Counter counter,
org.jdom2.Element parent,
Collection<MailingList> list,
String parentTag,
String childTag)
Method iterateMailingList
|
protected void |
iterateNotifier(Counter counter,
org.jdom2.Element parent,
Collection<Notifier> list,
String parentTag,
String childTag)
Method iterateNotifier
|
protected void |
iteratePlugin(Counter counter,
org.jdom2.Element parent,
Collection<Plugin> list,
String parentTag,
String childTag)
Method iteratePlugin
|
protected void |
iteratePluginExecution(Counter counter,
org.jdom2.Element parent,
Collection<PluginExecution> list,
String parentTag,
String childTag)
Method iteratePluginExecution
|
protected void |
iterateProfile(Counter counter,
org.jdom2.Element parent,
Collection<Profile> list,
String parentTag,
String childTag)
Method iterateProfile
|
protected void |
iterateReportPlugin(Counter counter,
org.jdom2.Element parent,
Collection<ReportPlugin> list,
String parentTag,
String childTag)
Method iterateReportPlugin
|
protected void |
iterateReportSet(Counter counter,
org.jdom2.Element parent,
Collection<ReportSet> list,
String parentTag,
String childTag)
Method iterateReportSet
|
protected void |
iterateRepository(Counter counter,
org.jdom2.Element parent,
Collection<Repository> list,
String parentTag,
String childTag)
Method iterateRepository
|
protected void |
iterateResource(Counter counter,
org.jdom2.Element parent,
Collection<Resource> list,
String parentTag,
String childTag)
Method iterateResource
|
protected void |
replaceXpp3DOM(org.jdom2.Element parent,
Xpp3Dom parentDom,
Counter counter)
Method replaceXpp3DOM
|
protected void |
updateActivationFile(ActivationFile value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateActivationFile
|
protected void |
updateActivationOS(ActivationOS value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateActivationOS
|
protected void |
updateActivationProperty(ActivationProperty value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateActivationProperty
|
protected void |
updateBuild(Build value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateBuild
|
protected void |
updateBuildBase(BuildBase value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateBuildBase
|
protected void |
updateCiManagement(CiManagement value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateCiManagement
|
protected void |
updateConfigurationContainer(ConfigurationContainer value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateConfigurationContainer
|
protected void |
updateContributor(Contributor value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateContributor
|
protected void |
updateDependency(Dependency value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateDependency
|
protected void |
updateDependencyManagement(DependencyManagement value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateDependencyManagement
|
protected void |
updateDeploymentRepository(DeploymentRepository value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateDeploymentRepository
|
protected void |
updateDeveloper(Developer value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateDeveloper
|
protected void |
updateDistributionManagement(DistributionManagement value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateDistributionManagement
|
protected org.jdom2.Element |
updateElement(Counter counter,
org.jdom2.Element parent,
String name,
boolean shouldExist)
Method updateElement
|
protected void |
updateExclusion(Exclusion value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateExclusion
|
protected void |
updateExtension(Extension value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateExtension
|
protected void |
updateFileSet(FileSet value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateFileSet
|
protected void |
updateIssueManagement(IssueManagement value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateIssueManagement
|
protected void |
updateLicense(License value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateLicense
|
protected void |
updateMailingList(MailingList value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateMailingList
|
protected void |
updateModel(Model value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateModel
|
protected void |
updateModelBase(ModelBase value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateModelBase
|
protected void |
updateNotifier(Notifier value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateNotifier
|
protected void |
updateOrganization(Organization value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateOrganization
|
protected void |
updateParent(Parent value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateParent
|
protected void |
updatePatternSet(PatternSet value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePatternSet
|
protected void |
updatePlugin(Plugin value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePlugin
|
protected void |
updatePluginConfiguration(PluginConfiguration value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePluginConfiguration
|
protected void |
updatePluginContainer(PluginContainer value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePluginContainer
|
protected void |
updatePluginExecution(PluginExecution value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePluginExecution
|
protected void |
updatePluginManagement(PluginManagement value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePluginManagement
|
protected void |
updatePrerequisites(Prerequisites value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updatePrerequisites
|
protected void |
updateProfile(Profile value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateProfile
|
protected void |
updateRelocation(Relocation value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateRelocation
|
protected void |
updateReporting(Reporting value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateReporting
|
protected void |
updateReportPlugin(ReportPlugin value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateReportPlugin
|
protected void |
updateReportSet(ReportSet value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateReportSet
|
protected void |
updateRepository(Repository value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateRepository
|
protected void |
updateRepositoryBase(RepositoryBase value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateRepositoryBase
|
protected void |
updateRepositoryPolicy(RepositoryPolicy value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateRepositoryPolicy
|
protected void |
updateResource(Resource value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateResource
|
protected void |
updateScm(Scm value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateScm
|
protected void |
updateSite(Site value,
String xmlTag,
Counter counter,
org.jdom2.Element element)
Method updateSite
|
void |
write(Model project,
org.jdom2.Document document,
OutputStream stream)
Deprecated.
|
void |
write(Model project,
org.jdom2.Document document,
OutputStreamWriter writer)
Method write
|
void |
write(Model project,
org.jdom2.Document document,
Writer writer,
org.jdom2.output.Format jdomFormat)
Method write
|
protected org.jdom2.Element findAndReplaceProperties(Counter counter, org.jdom2.Element parent, String name, Map props)
protected org.jdom2.Element findAndReplaceSimpleElement(Counter counter, org.jdom2.Element parent, String name, String text, String defaultValue)
counter
- Counter
defaultValue
- The default value.text
- The text.name
- The name.parent
- The parent.Element
protected org.jdom2.Element findAndReplaceSimpleLists(Counter counter, org.jdom2.Element parent, Collection<String> list, String parentName, String childName)
counter
- Counter
childName
- The childNameparentName
- The parentNamelist
- The list of elements.parent
- The parent.Element
protected org.jdom2.Element findAndReplaceXpp3DOM(Counter counter, org.jdom2.Element parent, String name, Xpp3Dom dom)
protected void insertAtPreferredLocation(org.jdom2.Element parent, org.jdom2.Element child, Counter counter)
parent
- The parent.counter
- Counter
child
- Element
protected void iterateContributor(Counter counter, org.jdom2.Element parent, Collection<Contributor> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateDependency(Counter counter, org.jdom2.Element parent, Collection<Dependency> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateDeveloper(Counter counter, org.jdom2.Element parent, Collection<Developer> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateExclusion(Counter counter, org.jdom2.Element parent, Collection<Exclusion> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateExtension(Counter counter, org.jdom2.Element parent, Collection<Extension> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateLicense(Counter counter, org.jdom2.Element parent, Collection<License> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateMailingList(Counter counter, org.jdom2.Element parent, Collection<MailingList> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateNotifier(Counter counter, org.jdom2.Element parent, Collection<Notifier> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iteratePlugin(Counter counter, org.jdom2.Element parent, Collection<Plugin> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iteratePluginExecution(Counter counter, org.jdom2.Element parent, Collection<PluginExecution> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateProfile(Counter counter, org.jdom2.Element parent, Collection<Profile> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateReportPlugin(Counter counter, org.jdom2.Element parent, Collection<ReportPlugin> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateReportSet(Counter counter, org.jdom2.Element parent, Collection<ReportSet> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateRepository(Counter counter, org.jdom2.Element parent, Collection<Repository> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void iterateResource(Counter counter, org.jdom2.Element parent, Collection<Resource> list, String parentTag, String childTag)
counter
- Counter
childTag
- The childTagparentTag
- The parentTaglist
- The list of elements.parent
- The parent.protected void replaceXpp3DOM(org.jdom2.Element parent, Xpp3Dom parentDom, Counter counter)
parent
- The parent.counter
- Counter
parentDom
- Element
protected void updateActivationFile(ActivationFile value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateActivationProperty(ActivationProperty value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateBuild(Build value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateBuildBase(BuildBase value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateCiManagement(CiManagement value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateConfigurationContainer(ConfigurationContainer value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateContributor(Contributor value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateDependency(Dependency value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateDependencyManagement(DependencyManagement value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateDeploymentRepository(DeploymentRepository value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateDeveloper(Developer value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected org.jdom2.Element updateElement(Counter counter, org.jdom2.Element parent, String name, boolean shouldExist)
counter
- Counter
shouldExist
- should exist.name
- The name.parent
- The parent.Element
protected void updateExclusion(Exclusion value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateExtension(Extension value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateFileSet(FileSet value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateIssueManagement(IssueManagement value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateLicense(License value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateMailingList(MailingList value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateModel(Model value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateModelBase(ModelBase value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateNotifier(Notifier value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateOrganization(Organization value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateParent(Parent value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePatternSet(PatternSet value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePlugin(Plugin value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePluginConfiguration(PluginConfiguration value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePluginExecution(PluginExecution value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePluginManagement(PluginManagement value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updatePrerequisites(Prerequisites value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateProfile(Profile value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateRelocation(Relocation value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateReportPlugin(ReportPlugin value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateReportSet(ReportSet value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateReporting(Reporting value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateRepository(Repository value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateRepositoryBase(RepositoryBase value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateRepositoryPolicy(RepositoryPolicy value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateResource(Resource value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateScm(Scm value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.protected void updateSite(Site value, String xmlTag, Counter counter, org.jdom2.Element element)
value
- The value.element
- Element
counter
- Counter
xmlTag
- The XMLTag.public void write(Model project, org.jdom2.Document document, OutputStream stream) throws IOException
project
- Model
stream
- OutputStream
document
- Document
IOException
- in case of an error.public void write(Model project, org.jdom2.Document document, OutputStreamWriter writer) throws IOException
project
- Model
writer
- OutputStreamWriter
document
- Document
IOException
- in case of an error.public void write(Model project, org.jdom2.Document document, Writer writer, org.jdom2.output.Format jdomFormat) throws IOException
project
- Model
jdomFormat
- Format
writer
- Writer
document
- Document
IOException
- in case of an error.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.