Class ScheduleDocumentWriter
- java.lang.Object
-
- com._1c.g5.v8.dt.export.xml.writer.ExportXmlStreamWriter
-
- com._1c.g5.v8.dt.export.xml.writer.ExternalPropertiesDocumentWriter
-
- com._1c.g5.v8.dt.schedule.export.xml.writer.ScheduleDocumentWriter
-
- All Implemented Interfaces:
AutoCloseable
public class ScheduleDocumentWriter extends ExternalPropertiesDocumentWriter
XmlStreamWriter for schedule objects
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.export.xml.writer.ExportXmlStreamWriter
charactersExportConvertOption, ENCODING, INDENT_STRING, LINE_END, xmlWriter
-
-
Constructor Summary
Constructors Constructor Description ScheduleDocumentWriter(OutputStream outputStream)
Constructor of XmlStreamWriter for schedule objects with prettyPrint and utf-8 encoding
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDocument()
Write xml document header with namespacesvoid
writeAttribute(String attributeName, Object value)
Write attribute with name and value.void
writeDateAttribute(String attributeName, Date date)
Write attribute with date value in format:"yyyy-MM-dd"
<T extends org.eclipse.emf.common.util.Enumerator>
voidwriteMonthsElement(QName elementName, List<Months> list, boolean writeEmpty)
Write element with selected list of months numbers sequencevoid
writeTimeAttribute(String attributeName, Date time)
Write attribute with time value in format:"HH:mm:ss"
<T extends org.eclipse.emf.common.util.Enumerator>
voidwriteWeekDaysElement(QName elementName, List<WeekDays> list, boolean writeEmpty)
Write element with selected list of days numbers sequence-
Methods inherited from class com._1c.g5.v8.dt.export.xml.writer.ExportXmlStreamWriter
addKnownPrefix, beginDocument, close, decreaseIndent, getIndent, getNewPrefix, getPrefix, getXmlWriter, increaseIndent, optimizeQName, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeCharacters, writeDefaultNamespace, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEndElement, writeInlineEndElement, writeLineFeed, writeNamespace, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement, writeTextElement, writeTextElement
-
-
-
-
Constructor Detail
-
ScheduleDocumentWriter
public ScheduleDocumentWriter(OutputStream outputStream) throws XMLStreamException, FactoryConfigurationError
Constructor of XmlStreamWriter for schedule objects with prettyPrint and utf-8 encoding- Parameters:
outputStream
- the stream to write to- Throws:
XMLStreamException
FactoryConfigurationError
- if an instance ofXMLOutputFactory
cannot be loaded
-
-
Method Detail
-
beginDocument
public void beginDocument() throws XMLStreamException
Description copied from class:ExportXmlStreamWriter
Write xml document header with namespaces- Overrides:
beginDocument
in classExternalPropertiesDocumentWriter
- Throws:
XMLStreamException
- if an error occurred of write in stream
-
writeDateAttribute
public void writeDateAttribute(String attributeName, Date date) throws XMLStreamException, ExportException
Write attribute with date value in format:"yyyy-MM-dd"
- Parameters:
attributeName
- the name of writing attributedate
- the date to write- Throws:
XMLStreamException
ExportException
-
writeTimeAttribute
public void writeTimeAttribute(String attributeName, Date time) throws XMLStreamException, ExportException
Write attribute with time value in format:"HH:mm:ss"
- Parameters:
attributeName
- the name of writing attributetime
- the time to write- Throws:
XMLStreamException
ExportException
-
writeAttribute
public void writeAttribute(String attributeName, Object value) throws XMLStreamException, ExportException
Write attribute with name and value.- Overrides:
writeAttribute
in classExportXmlStreamWriter
- Parameters:
attributeName
- the name of writing attributevalue
- the value to write- Throws:
XMLStreamException
ExportException
- if an error occurred of write invalid data
-
writeWeekDaysElement
public <T extends org.eclipse.emf.common.util.Enumerator> void writeWeekDaysElement(QName elementName, List<WeekDays> list, boolean writeEmpty) throws XMLStreamException
Write element with selected list of days numbers sequence- Parameters:
elementName
- the xml element namelist
- of days to writewriteEmpty
- write empty element if true or nothing if false- Throws:
XMLStreamException
-
writeMonthsElement
public <T extends org.eclipse.emf.common.util.Enumerator> void writeMonthsElement(QName elementName, List<Months> list, boolean writeEmpty) throws XMLStreamException
Write element with selected list of months numbers sequence- Parameters:
elementName
- the xml element namelist
- of months to writewriteEmpty
- write empty element if true or nothing if false- Throws:
XMLStreamException
-
-