Package org.apache.maven.metadata.v4
Class MetadataStaxWriter
java.lang.Object
org.apache.maven.metadata.v4.MetadataStaxWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface
(package private) static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setFileComment
(String fileComment) Method setFileComment.void
setNamespace
(String namespace) Method setNamespace.void
setSchemaLocation
(String schemaLocation) Method setSchemaLocation.void
write
(OutputStream stream, Metadata metadata) Method write.void
Method write.private void
writeAttr
(String attrName, String value, XMLStreamWriter serializer) private void
writeDom
(XmlNode dom, XMLStreamWriter serializer) private <T> void
writeList
(String tagName, boolean flat, List<T> list, XMLStreamWriter serializer, MetadataStaxWriter.ElementWriter<T> writer) private <T> void
writeList
(String tagName, List<T> list, XMLStreamWriter serializer, MetadataStaxWriter.ElementWriter<T> writer) private void
writeMetadata
(String tagName, Metadata metadata, XMLStreamWriter serializer) private void
writePlugin
(String tagName, Plugin plugin, XMLStreamWriter serializer) private <T> void
writeProperties
(String tagName, Map<String, String> props, XMLStreamWriter serializer) private void
writeSnapshot
(String tagName, Snapshot snapshot, XMLStreamWriter serializer) private void
writeSnapshotVersion
(String tagName, SnapshotVersion snapshotVersion, XMLStreamWriter serializer) private void
writeTag
(String tagName, String defaultValue, String value, XMLStreamWriter serializer) private void
writeVersioning
(String tagName, Versioning versioning, XMLStreamWriter serializer)
-
Field Details
-
NAMESPACE
Default namespace.- See Also:
-
SCHEMA_LOCATION
Default schemaLocation.- See Also:
-
namespace
Field namespace. -
schemaLocation
Field schemaLocation. -
fileComment
Field fileComment.
-
-
Constructor Details
-
MetadataStaxWriter
public MetadataStaxWriter()
-
-
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.
-
write
Method write.- Parameters:
writer
- a writer objectmetadata
- a Metadata object- Throws:
IOException
- IOException if anyXMLStreamException
-
write
Method write.- Parameters:
stream
- a stream objectmetadata
- a Metadata object- Throws:
IOException
- IOException if anyXMLStreamException
-
writeMetadata
private void writeMetadata(String tagName, Metadata metadata, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeVersioning
private void writeVersioning(String tagName, Versioning versioning, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeSnapshot
private void writeSnapshot(String tagName, Snapshot snapshot, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeSnapshotVersion
private void writeSnapshotVersion(String tagName, SnapshotVersion snapshotVersion, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePlugin
private void writePlugin(String tagName, Plugin plugin, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeList
private <T> void writeList(String tagName, List<T> list, XMLStreamWriter serializer, MetadataStaxWriter.ElementWriter<T> writer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeList
private <T> void writeList(String tagName, boolean flat, List<T> list, XMLStreamWriter serializer, MetadataStaxWriter.ElementWriter<T> writer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeProperties
private <T> void writeProperties(String tagName, Map<String, String> props, XMLStreamWriter serializer) 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) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeAttr
private void writeAttr(String attrName, String value, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-