Class AbstractXdtoSerializer
- java.lang.Object
- 
- com._1c.g5.v8.dt.xdto.model.resource.AbstractXdtoSerializer
 
- 
- Direct Known Subclasses:
- XdtoSerializer,- XdtoToXsdSerializer
 
 public class AbstractXdtoSerializer extends Object Provides common infrastructure for serialization/deserialization Xdto content to different format
- 
- 
Field SummaryFields Modifier and Type Field Description static StringABSTRACTstatic StringBASEstatic StringDEFAULTstatic StringENCODINGstatic StringENUMERATIONstatic StringFIXEDstatic StringFORMstatic StringFRACTION_DIGITSstatic StringIMPORTstatic StringITEM_TYPEstatic StringLENGTHstatic StringMAX_EXCLUSIVEstatic StringMAX_INCLUSIVEstatic StringMAX_LENGTHstatic StringMIN_EXCLUSIVEstatic StringMIN_INCLUSIVEstatic StringMIN_LENGTHstatic StringMIXEDstatic StringNAMEstatic StringNAMESPACEstatic StringNILLABLEstatic StringOPENstatic StringPATTERNstatic StringREFstatic StringSCHEMA_LOCATIONstatic StringTARGET_NAMESPACEstatic StringTOTAL_DIGITSstatic StringTYPEstatic StringWHITESPACEstatic StringXMLNS_PREFIXstatic StringXS_PREFIXstatic StringXS_URI
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractXdtoSerializer(String lineSeparator)Constructs a new instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconvertLineEndings(ByteArrayOutputStream os, OutputStream outputStream)Changes line endings of the xml file content.protected StringcreateAttributeName(String prefix, String localName)Creates attribute name with prefixprotected voiddecreaceIndent()Decreases actual formatting indentationprotected StringgetNewPrefix(String uri, XMLStreamWriter writer)Computes new prefix foruri.protected voidincreaseIndent()Increases actual formatting indentationprotected voidwriteFormatCharacters(XMLStreamWriter writer)Writes formatting characters
 
- 
- 
- 
Field Detail- 
ENCODINGpublic static final String ENCODING - See Also:
- Constant Field Values
 
 - 
XMLNS_PREFIXpublic static final String XMLNS_PREFIX - See Also:
- Constant Field Values
 
 - 
XS_URIpublic static final String XS_URI - See Also:
- Constant Field Values
 
 - 
XS_PREFIXpublic static final String XS_PREFIX - See Also:
- Constant Field Values
 
 - 
TARGET_NAMESPACEpublic static final String TARGET_NAMESPACE - See Also:
- Constant Field Values
 
 - 
IMPORTpublic static final String IMPORT - See Also:
- Constant Field Values
 
 - 
NAMESPACEpublic static final String NAMESPACE - See Also:
- Constant Field Values
 
 - 
NAMEpublic static final String NAME - See Also:
- Constant Field Values
 
 - 
SCHEMA_LOCATIONpublic static final String SCHEMA_LOCATION - See Also:
- Constant Field Values
 
 - 
REFpublic static final String REF - See Also:
- Constant Field Values
 
 - 
TYPEpublic static final String TYPE - See Also:
- Constant Field Values
 
 - 
DEFAULTpublic static final String DEFAULT - See Also:
- Constant Field Values
 
 - 
FIXEDpublic static final String FIXED - See Also:
- Constant Field Values
 
 - 
NILLABLEpublic static final String NILLABLE - See Also:
- Constant Field Values
 
 - 
FORMpublic static final String FORM - See Also:
- Constant Field Values
 
 - 
BASEpublic static final String BASE - See Also:
- Constant Field Values
 
 - 
LENGTHpublic static final String LENGTH - See Also:
- Constant Field Values
 
 - 
MIN_LENGTHpublic static final String MIN_LENGTH - See Also:
- Constant Field Values
 
 - 
MAX_LENGTHpublic static final String MAX_LENGTH - See Also:
- Constant Field Values
 
 - 
WHITESPACEpublic static final String WHITESPACE - See Also:
- Constant Field Values
 
 - 
MIN_INCLUSIVEpublic static final String MIN_INCLUSIVE - See Also:
- Constant Field Values
 
 - 
MIN_EXCLUSIVEpublic static final String MIN_EXCLUSIVE - See Also:
- Constant Field Values
 
 - 
MAX_INCLUSIVEpublic static final String MAX_INCLUSIVE - See Also:
- Constant Field Values
 
 - 
MAX_EXCLUSIVEpublic static final String MAX_EXCLUSIVE - See Also:
- Constant Field Values
 
 - 
TOTAL_DIGITSpublic static final String TOTAL_DIGITS - See Also:
- Constant Field Values
 
 - 
FRACTION_DIGITSpublic static final String FRACTION_DIGITS - See Also:
- Constant Field Values
 
 - 
PATTERNpublic static final String PATTERN - See Also:
- Constant Field Values
 
 - 
ENUMERATIONpublic static final String ENUMERATION - See Also:
- Constant Field Values
 
 - 
ABSTRACTpublic static final String ABSTRACT - See Also:
- Constant Field Values
 
 - 
MIXEDpublic static final String MIXED - See Also:
- Constant Field Values
 
 - 
OPENpublic static final String OPEN - See Also:
- Constant Field Values
 
 - 
ITEM_TYPEpublic static final String ITEM_TYPE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
AbstractXdtoSerializerprotected AbstractXdtoSerializer(String lineSeparator) Constructs a new instance.- Parameters:
- lineSeparator- line separator to use, can't be- null
 
 
- 
 - 
Method Detail- 
getNewPrefixprotected String getNewPrefix(String uri, XMLStreamWriter writer) throws XMLStreamException Computes new prefix foruri. Example: d1p2- Parameters:
- uri- uri for creating prefix, can't be- null
- writer- actual- XMLStreamWriter, can't be- null
- Returns:
- new prefix for uri. Example: d1p2, nevernull
- Throws:
- XMLStreamException- if creating prefix is not valid for current- XMLStreamWriter
 
 - 
decreaceIndentprotected void decreaceIndent() Decreases actual formatting indentation
 - 
increaseIndentprotected void increaseIndent() Increases actual formatting indentation
 - 
createAttributeNameprotected String createAttributeName(String prefix, String localName) Creates attribute name with prefix- Parameters:
- prefix- prefix for creating attribute name, can't be- null. If prefix equals to "xmlns" it isn't written
- localName- name of the attribute, can't be- null
- Returns:
- creating attribute name, never null
 
 - 
writeFormatCharactersprotected void writeFormatCharacters(XMLStreamWriter writer) throws XMLStreamException Writes formatting characters- Parameters:
- writer-- XMLStreamWriterfor writing formatting characters
- Throws:
- XMLStreamException- when xml errors were occurred
 
 - 
convertLineEndingsprotected void convertLineEndings(ByteArrayOutputStream os, OutputStream outputStream) throws IOException Changes line endings of the xml file content. Changes " " to "\r"- Parameters:
- os- stream with original xml content, can't be- null
- outputStream- stream for writing converting content, can't be- null
- Throws:
- IOException- if I/O exception was occurred
 
 
- 
 
-