Package com._1c.g5.v8.dt.dcs.util
Class DcsV8Serializer
- java.lang.Object
-
- com._1c.g5.v8.dt.dcs.util.DcsV8Serializer
-
public class DcsV8Serializer extends Object
Сериализатор/десериализатор схемы компоновки данных в платформенный xml
-
-
Field Summary
Fields Modifier and Type Field Description static StringDB_COPIES_XML_NAMESPACEstatic StringDCS_APEARANCE_TEMPLATE_XML_NAMESPACEstatic StringDCS_APEARANCE_TEMPLATE_XML_NAMESPACE_PREFIXstatic StringDCS_AREA_TEMPLATE_XML_NAMESPACEstatic StringDCS_AREA_TEMPLATE_XML_NAMESPACE_PREFIXstatic StringDCS_COMMON_XML_NAMESPACEstatic StringDCS_COMMON_XML_NAMESPACE_PREFIXstatic StringDCS_CORE_XML_NAMESPACEstatic StringDCS_CORE_XML_NAMESPACE_PREFIXstatic StringDCS_SCHEMA_XML_NAMESPACEstatic StringDCS_SETTINGS_XML_NAMESPACEstatic StringDCS_SETTINGS_XML_NAMESPACE_PREFIXstatic StringSPREADSHEET_XML_NAMESPACEstatic StringSPREADSHEET_XML_NAMESPACE_PREFIX
-
Constructor Summary
Constructors Constructor Description DcsV8Serializer(IDtProject dtProject, Version version, IResourceLookup resourceLookup)Constructor.DcsV8Serializer(IDtProject dtProject, org.eclipse.emf.ecore.resource.Resource resource, IResourceLookup resourceLookup)Constructor.DcsV8Serializer(IResourceLookup resourceLookup)Constructor.DcsV8Serializer(org.eclipse.emf.ecore.resource.Resource resource, IResourceLookup resourceLookup)Deprecated.Use constructor with aIDtProjectinstead
-
Method Summary
-
-
-
Field Detail
-
DCS_SCHEMA_XML_NAMESPACE
public static final String DCS_SCHEMA_XML_NAMESPACE
- See Also:
- Constant Field Values
-
DCS_COMMON_XML_NAMESPACE
public static final String DCS_COMMON_XML_NAMESPACE
- See Also:
- Constant Field Values
-
DCS_COMMON_XML_NAMESPACE_PREFIX
public static final String DCS_COMMON_XML_NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
DCS_CORE_XML_NAMESPACE
public static final String DCS_CORE_XML_NAMESPACE
- See Also:
- Constant Field Values
-
DCS_CORE_XML_NAMESPACE_PREFIX
public static final String DCS_CORE_XML_NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
DCS_SETTINGS_XML_NAMESPACE
public static final String DCS_SETTINGS_XML_NAMESPACE
- See Also:
- Constant Field Values
-
DCS_SETTINGS_XML_NAMESPACE_PREFIX
public static final String DCS_SETTINGS_XML_NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
DCS_AREA_TEMPLATE_XML_NAMESPACE
public static final String DCS_AREA_TEMPLATE_XML_NAMESPACE
- See Also:
- Constant Field Values
-
DCS_AREA_TEMPLATE_XML_NAMESPACE_PREFIX
public static final String DCS_AREA_TEMPLATE_XML_NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
DCS_APEARANCE_TEMPLATE_XML_NAMESPACE
public static final String DCS_APEARANCE_TEMPLATE_XML_NAMESPACE
- See Also:
- Constant Field Values
-
DCS_APEARANCE_TEMPLATE_XML_NAMESPACE_PREFIX
public static final String DCS_APEARANCE_TEMPLATE_XML_NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
DB_COPIES_XML_NAMESPACE
public static final String DB_COPIES_XML_NAMESPACE
- See Also:
- Constant Field Values
-
SPREADSHEET_XML_NAMESPACE
public static final String SPREADSHEET_XML_NAMESPACE
- See Also:
- Constant Field Values
-
SPREADSHEET_XML_NAMESPACE_PREFIX
public static final String SPREADSHEET_XML_NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DcsV8Serializer
@Inject public DcsV8Serializer(IResourceLookup resourceLookup)
Constructor.- Parameters:
resourceLookup- the resource lookup, can not benull
-
DcsV8Serializer
@Deprecated public DcsV8Serializer(org.eclipse.emf.ecore.resource.Resource resource, IResourceLookup resourceLookup)
Deprecated.Use constructor with aIDtProjectinsteadConstructor.- Parameters:
resource- dcs resource, can not benullresourceLookup- the resource lookup, can not benull
-
DcsV8Serializer
public DcsV8Serializer(IDtProject dtProject, org.eclipse.emf.ecore.resource.Resource resource, IResourceLookup resourceLookup)
Constructor.- Parameters:
dtProject- The target IDtProject, can not benullresource- dcs resource, can not benullresourceLookup- the resource lookup, can not benull
-
DcsV8Serializer
public DcsV8Serializer(IDtProject dtProject, Version version, IResourceLookup resourceLookup)
Constructor.- Parameters:
resourceLookup- the resource lookup, can not benull
-
-
Method Detail
-
deserializeXML
public DataCompositionSchema deserializeXML(InputStream inputStream) throws XMLStreamException, ExportException
Десериализовать схему компоновки данных из файла xml- Parameters:
inputStream- файл- Returns:
- схема
- Throws:
XMLStreamExceptionExportException- if export processing errors
-
serializeXML
public void serializeXML(org.eclipse.emf.ecore.EObject eObject, OutputStream outputStream, String lineSeparator, IDtProject dtProject) throws XMLStreamException, ExportExceptionSerializesEObjectin xml stream.- Parameters:
eObject- theEObjectinstance, cannot benulloutputStream- the output stream, cannot benulldefinedTypes- The set of defined types mapped to the defined type symlink, can benull- Throws:
XMLStreamExceptionExportException- if export processing errors
-
serializeXML
public void serializeXML(DataCompositionSchema schema, OutputStream outputStream, Map<String,UUID> definedTypes, String lineSeparator) throws XMLStreamException, ExportException
Сериализовать схему компоновки данных в файл xml- Parameters:
\u0441\u0445\u0435\u043c\u0430-outputStream- файл- Throws:
XMLStreamExceptionExportException- if export processing errors
-
serializeXML
public void serializeXML(DataCompositionAppearanceTemplate appearanceTemplate, OutputStream outputStream, Map<String,UUID> definedTypes, String lineSeparator) throws XMLStreamException, ExportException
SerializesDataCompositionAppearanceTemplatein xml stream.- Parameters:
appearanceTemplate- theDataCompositionAppearanceTemplateinstance, cannot benulloutputStream- the output stream, cannot benull- Throws:
XMLStreamExceptionExportException- if export processing errors
-
readSchema
public DataCompositionSchema readSchema(XMLStreamReader reader) throws XMLStreamException, ExportException
Прочитать схему- Parameters:
reader-- Returns:
- схема
- Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeSchema
public void writeSchema(ExportXmlStreamWriter writer, DataCompositionSchema schema, QName elementName, Version version, Map<String,UUID> definedTypes) throws XMLStreamException, ExportException
Writes the schema- Parameters:
writer- The target writer. May not benullschema- The target schema. May benullelementName- The name of the element. May not benullversion- The platform version. May not benulldefinedTypes- The set of configuration defined types mapped to teir UUIDs. May not benull- Throws:
XMLStreamExceptionExportException
-
readSettings
public DataCompositionSettings readSettings(XMLStreamReader reader) throws XMLStreamException, ExportException
Прочитать настройки- Parameters:
reader-- Returns:
- настройки
- Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeSettings
public void writeSettings(ExportXmlStreamWriter writer, DataCompositionSettings settings, QName elementName, IDtProject project) throws XMLStreamException, ExportException
Записать настройки- Parameters:
writer-settings- настройкиelementName- имя элемента xml- Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeDcsscaResource
public void writeDcsscaResource(ExportXmlStreamWriter writer, DataCompositionConditionalAppearance appearance) throws XMLStreamException, ExportException
write ConditionalAppearance in xml stream- Parameters:
writer- theExportXmlStreamWriterappearance- theDataCompositionConditionalAppearanceobjectelementName- the name of xml element- Throws:
XMLStreamExceptionExportException- if export processing errors
-
readConditionalAppearance
public DataCompositionConditionalAppearance readConditionalAppearance(XMLStreamReader reader) throws XMLStreamException, ExportException
Read ConditionalAppearance from xml- Parameters:
reader- theXMLStreamReader- Returns:
- the
DataCompositionConditionalAppearanceinstance - Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeConditionalAppearance
public void writeConditionalAppearance(ExportXmlStreamWriter writer, DataCompositionConditionalAppearance appearance, QName elementName) throws XMLStreamException, ExportException
write ConditionalAppearance in xml stream- Parameters:
writer- theExportXmlStreamWriterappearance- theDataCompositionConditionalAppearanceobjectelementName- the name of xml element- Throws:
XMLStreamExceptionExportException- if export processing errors
-
readAppearanceTemplate
public DataCompositionAppearanceTemplate readAppearanceTemplate(XMLStreamReader reader) throws XMLStreamException, ExportException
ReadsDataCompositionAppearanceTemplatefrom xml.- Parameters:
reader- theXMLStreamReader, cannot benull- Returns:
- the
DataCompositionAppearanceTemplateinstance, cannot benull - Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeAppearanceTemplate
public void writeAppearanceTemplate(ExportXmlStreamWriter writer, DataCompositionAppearanceTemplate appearanceTemplate, QName elementName, Map<String,UUID> definedTypes) throws XMLStreamException, ExportException
WritesDataCompositionAppearanceTemplatein xml stream.- Parameters:
writer- theExportXmlStreamWriter, cannot benullappearanceTemplate- theDataCompositionAppearanceTemplateinstance, cannot benullelementName- the name of xml element, cannot benull- Throws:
XMLStreamExceptionExportException- if export processing errors
-
readDataSetField
public DataSetField readDataSetField(XMLStreamReader reader, Version version) throws XMLStreamException, ExportException
ReadsDataSetFieldfrom xml.- Parameters:
reader- theXMLStreamReader, cannot benullversion- actual platformVersion, cannot benull- Returns:
- the
DataSetFieldinstance, cannot benull - Throws:
XMLStreamExceptionExportException- if export processing errors
-
readCalculatedField
public DataCompositionSchemaCalculatedField readCalculatedField(XMLStreamReader reader, Version version) throws XMLStreamException, ExportException
ReadsDataCompositionSchemaCalculatedFieldfrom xml.- Parameters:
reader- theXMLStreamReader, cannot benullversion- actual platformVersion, cannot benull- Returns:
- the
DataCompositionSchemaCalculatedFieldinstance, cannot benull - Throws:
XMLStreamExceptionExportException- if export processing errors
-
readParameter
public DataCompositionSchemaParameter readParameter(XMLStreamReader reader, Version version) throws XMLStreamException, ExportException
ReadsDataCompositionSchemaParameterfrom xml.- Parameters:
reader- theXMLStreamReader, cannot benullversion- actual platformVersion, cannot benull- Returns:
- the
DataCompositionSchemaParameterinstance, cannot benull - Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeDataSetField
public void writeDataSetField(ExportXmlStreamWriter writer, DataSetField field, QName elementName, IDtProject project) throws XMLStreamException, ExportException
WritesDataSetFieldin xml stream.- Parameters:
writer- theExportXmlStreamWriter, cannot benullfield- theDataCompositionAppearanceTemplateinstance, cannot benullelementName- the name of xml element, cannot benullproject- actualIDtProjectfor getting definedTypes form it, can benull- Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeCalculatedField
public void writeCalculatedField(ExportXmlStreamWriter writer, DataCompositionSchemaCalculatedField field, QName elementName, IDtProject project) throws XMLStreamException, ExportException
WritesDataCompositionSchemaCalculatedFieldin xml stream.- Parameters:
writer- theExportXmlStreamWriter, cannot benullfield- theDataCompositionAppearanceTemplateinstance, cannot benullelementName- the name of xml element, cannot benullproject- actualIDtProjectfor getting definedTypes form it, can benull- Throws:
XMLStreamExceptionExportException- if export processing errors
-
writeParameter
public void writeParameter(ExportXmlStreamWriter writer, DataCompositionSchemaParameter parameter, QName elementName, IDtProject project) throws XMLStreamException, ExportException
WritesDataCompositionSchemaParameterin xml stream.- Parameters:
writer- theExportXmlStreamWriter, cannot benullfield- theDataCompositionAppearanceTemplateinstance, cannot benullelementName- the name of xml element, cannot benullproject- actualIDtProjectfor getting definedTypes form it, can benull- Throws:
XMLStreamExceptionExportException- if export processing errors
-
-