Package org.apache.maven.model.v4
Class MavenStaxWriter
java.lang.Object
org.apache.maven.model.v4.MavenStaxWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private String
Field fileComment.private String
Field namespace.private static final String
Default namespace.private static final String
Default schemaLocation.private String
Field schemaLocation.protected Function
<InputLocation, String> Field stringFormatter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setAddLocationInformation
(boolean addLocationInformation) Method setAddLocationInformation.void
setFileComment
(String fileComment) Method setFileComment.void
setNamespace
(String namespace) Method setNamespace.void
setSchemaLocation
(String schemaLocation) Method setSchemaLocation.void
setStringFormatter
(Function<InputLocation, String> stringFormatter) Method setStringFormatter.protected String
toString
(InputLocation location) Method toString.void
write
(OutputStream stream, Model model) Method write.void
Method write.private void
writeActivation
(String tagName, Activation activation, XMLStreamWriter serializer) private void
writeActivationFile
(String tagName, ActivationFile activationFile, XMLStreamWriter serializer) private void
writeActivationOS
(String tagName, ActivationOS activationOS, XMLStreamWriter serializer) private void
writeActivationProperty
(String tagName, ActivationProperty activationProperty, XMLStreamWriter serializer) private void
writeAttr
(String attrName, String value, XMLStreamWriter serializer) private void
writeBuild
(String tagName, Build build, XMLStreamWriter serializer) private void
writeBuildBase
(String tagName, BuildBase buildBase, XMLStreamWriter serializer) private void
writeCiManagement
(String tagName, CiManagement ciManagement, XMLStreamWriter serializer) private void
writeConfigurationContainer
(String tagName, ConfigurationContainer configurationContainer, XMLStreamWriter serializer) private void
writeContributor
(String tagName, Contributor contributor, XMLStreamWriter serializer) private void
writeDependency
(String tagName, Dependency dependency, XMLStreamWriter serializer) private void
writeDependencyManagement
(String tagName, DependencyManagement dependencyManagement, XMLStreamWriter serializer) private void
writeDeploymentRepository
(String tagName, DeploymentRepository deploymentRepository, XMLStreamWriter serializer) private void
writeDeveloper
(String tagName, Developer developer, XMLStreamWriter serializer) private void
writeDistributionManagement
(String tagName, DistributionManagement distributionManagement, XMLStreamWriter serializer) private void
writeDom
(XmlNode dom, XMLStreamWriter serializer) private void
writeExclusion
(String tagName, Exclusion exclusion, XMLStreamWriter serializer) private void
writeExtension
(String tagName, Extension extension, XMLStreamWriter serializer) private void
writeFileSet
(String tagName, FileSet fileSet, XMLStreamWriter serializer) private void
writeIssueManagement
(String tagName, IssueManagement issueManagement, XMLStreamWriter serializer) private void
writeLicense
(String tagName, License license, XMLStreamWriter serializer) private <T> void
writeList
(String tagName, boolean flat, List<T> list, XMLStreamWriter serializer, InputLocationTracker locationTracker, MavenStaxWriter.ElementWriter<T> writer) private <T> void
writeList
(String tagName, List<T> list, XMLStreamWriter serializer, InputLocationTracker locationTracker, MavenStaxWriter.ElementWriter<T> writer) protected void
writeLocationTracking
(InputLocationTracker locationTracker, Object key, XMLStreamWriter serializer) Method writeLocationTracking.private void
writeMailingList
(String tagName, MailingList mailingList, XMLStreamWriter serializer) private void
writeModel
(String tagName, Model model, XMLStreamWriter serializer) private void
writeModelBase
(String tagName, ModelBase modelBase, XMLStreamWriter serializer) private void
writeNotifier
(String tagName, Notifier notifier, XMLStreamWriter serializer) private void
writeOrganization
(String tagName, Organization organization, XMLStreamWriter serializer) private void
writeParent
(String tagName, Parent parent, XMLStreamWriter serializer) private void
writePatternSet
(String tagName, PatternSet patternSet, XMLStreamWriter serializer) private void
writePlugin
(String tagName, Plugin plugin, XMLStreamWriter serializer) private void
writePluginConfiguration
(String tagName, PluginConfiguration pluginConfiguration, XMLStreamWriter serializer) private void
writePluginContainer
(String tagName, PluginContainer pluginContainer, XMLStreamWriter serializer) private void
writePluginExecution
(String tagName, PluginExecution pluginExecution, XMLStreamWriter serializer) private void
writePluginManagement
(String tagName, PluginManagement pluginManagement, XMLStreamWriter serializer) private void
writePrerequisites
(String tagName, Prerequisites prerequisites, XMLStreamWriter serializer) private void
writeProfile
(String tagName, Profile profile, XMLStreamWriter serializer) private <T> void
writeProperties
(String tagName, Map<String, String> props, XMLStreamWriter serializer, InputLocationTracker locationTracker) private void
writeRelocation
(String tagName, Relocation relocation, XMLStreamWriter serializer) private void
writeReporting
(String tagName, Reporting reporting, XMLStreamWriter serializer) private void
writeReportPlugin
(String tagName, ReportPlugin reportPlugin, XMLStreamWriter serializer) private void
writeReportSet
(String tagName, ReportSet reportSet, XMLStreamWriter serializer) private void
writeRepository
(String tagName, Repository repository, XMLStreamWriter serializer) private void
writeRepositoryBase
(String tagName, RepositoryBase repositoryBase, XMLStreamWriter serializer) private void
writeRepositoryPolicy
(String tagName, RepositoryPolicy repositoryPolicy, XMLStreamWriter serializer) private void
writeResource
(String tagName, Resource resource, XMLStreamWriter serializer) private void
writeScm
(String tagName, Scm scm, XMLStreamWriter serializer) private void
writeSite
(String tagName, Site site, XMLStreamWriter serializer) private void
writeTag
(String tagName, String defaultValue, String value, XMLStreamWriter serializer, InputLocationTracker locationTracker)
-
Field Details
-
NAMESPACE
Default namespace.- See Also:
-
SCHEMA_LOCATION
Default schemaLocation.- See Also:
-
namespace
Field namespace. -
schemaLocation
Field schemaLocation. -
fileComment
Field fileComment. -
addLocationInformation
private boolean addLocationInformation -
stringFormatter
Field stringFormatter.
-
-
Constructor Details
-
MavenStaxWriter
public MavenStaxWriter()
-
-
Method Details
-
setNamespace
Method setNamespace.- Parameters:
namespace
- the namespace to use.
-
setSchemaLocation
Method setSchemaLocation.- Parameters:
schemaLocation
- the schema location to use.
-
setFileComment
Method setFileComment.- Parameters:
fileComment
- a fileComment object.
-
setAddLocationInformation
public void setAddLocationInformation(boolean addLocationInformation) Method setAddLocationInformation. -
setStringFormatter
Method setStringFormatter.- Parameters:
stringFormatter
-
-
write
Method write.- Parameters:
writer
- a writer objectmodel
- a Model object- Throws:
IOException
- IOException if anyXMLStreamException
-
write
Method write.- Parameters:
stream
- a stream objectmodel
- a Model object- Throws:
IOException
- IOException if anyXMLStreamException
-
writeModel
private void writeModel(String tagName, Model model, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeModelBase
private void writeModelBase(String tagName, ModelBase modelBase, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePluginContainer
private void writePluginContainer(String tagName, PluginContainer pluginContainer, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePluginConfiguration
private void writePluginConfiguration(String tagName, PluginConfiguration pluginConfiguration, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeBuildBase
private void writeBuildBase(String tagName, BuildBase buildBase, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeBuild
private void writeBuild(String tagName, Build build, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeCiManagement
private void writeCiManagement(String tagName, CiManagement ciManagement, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeNotifier
private void writeNotifier(String tagName, Notifier notifier, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeContributor
private void writeContributor(String tagName, Contributor contributor, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeDependency
private void writeDependency(String tagName, Dependency dependency, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeDeveloper
private void writeDeveloper(String tagName, Developer developer, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeExclusion
private void writeExclusion(String tagName, Exclusion exclusion, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeIssueManagement
private void writeIssueManagement(String tagName, IssueManagement issueManagement, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeDistributionManagement
private void writeDistributionManagement(String tagName, DistributionManagement distributionManagement, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeLicense
private void writeLicense(String tagName, License license, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeMailingList
private void writeMailingList(String tagName, MailingList mailingList, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeOrganization
private void writeOrganization(String tagName, Organization organization, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePatternSet
private void writePatternSet(String tagName, PatternSet patternSet, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeParent
private void writeParent(String tagName, Parent parent, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeScm
private void writeScm(String tagName, Scm scm, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeFileSet
private void writeFileSet(String tagName, FileSet fileSet, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeResource
private void writeResource(String tagName, Resource resource, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeRepositoryBase
private void writeRepositoryBase(String tagName, RepositoryBase repositoryBase, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeRepository
private void writeRepository(String tagName, Repository repository, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeDeploymentRepository
private void writeDeploymentRepository(String tagName, DeploymentRepository deploymentRepository, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeRepositoryPolicy
private void writeRepositoryPolicy(String tagName, RepositoryPolicy repositoryPolicy, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeSite
private void writeSite(String tagName, Site site, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeConfigurationContainer
private void writeConfigurationContainer(String tagName, ConfigurationContainer configurationContainer, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePlugin
private void writePlugin(String tagName, Plugin plugin, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePluginExecution
private void writePluginExecution(String tagName, PluginExecution pluginExecution, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeDependencyManagement
private void writeDependencyManagement(String tagName, DependencyManagement dependencyManagement, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePluginManagement
private void writePluginManagement(String tagName, PluginManagement pluginManagement, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeReporting
private void writeReporting(String tagName, Reporting reporting, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeProfile
private void writeProfile(String tagName, Profile profile, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeActivation
private void writeActivation(String tagName, Activation activation, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeActivationProperty
private void writeActivationProperty(String tagName, ActivationProperty activationProperty, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeActivationOS
private void writeActivationOS(String tagName, ActivationOS activationOS, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeActivationFile
private void writeActivationFile(String tagName, ActivationFile activationFile, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeReportPlugin
private void writeReportPlugin(String tagName, ReportPlugin reportPlugin, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeReportSet
private void writeReportSet(String tagName, ReportSet reportSet, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePrerequisites
private void writePrerequisites(String tagName, Prerequisites prerequisites, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeRelocation
private void writeRelocation(String tagName, Relocation relocation, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeExtension
private void writeExtension(String tagName, Extension extension, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeList
private <T> void writeList(String tagName, List<T> list, XMLStreamWriter serializer, InputLocationTracker locationTracker, MavenStaxWriter.ElementWriter<T> writer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeList
private <T> void writeList(String tagName, boolean flat, List<T> list, XMLStreamWriter serializer, InputLocationTracker locationTracker, MavenStaxWriter.ElementWriter<T> writer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeProperties
private <T> void writeProperties(String tagName, Map<String, String> props, XMLStreamWriter serializer, InputLocationTracker locationTracker) throws IOException, XMLStreamException- Throws:
IOException
XMLStreamException
-
writeDom
private void writeDom(XmlNode dom, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeTag
private void writeTag(String tagName, String defaultValue, String value, XMLStreamWriter serializer, InputLocationTracker locationTracker) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeAttr
private void writeAttr(String attrName, String value, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeLocationTracking
protected void writeLocationTracking(InputLocationTracker locationTracker, Object key, XMLStreamWriter serializer) throws IOException, XMLStreamException Method writeLocationTracking.- Parameters:
locationTracker
-key
-serializer
-- Throws:
IOException
XMLStreamException
-
toString
Method toString.- Parameters:
location
-- Returns:
- String
-