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 String
DB_COPIES_XML_NAMESPACE
static String
DCS_APEARANCE_TEMPLATE_XML_NAMESPACE
static String
DCS_APEARANCE_TEMPLATE_XML_NAMESPACE_PREFIX
static String
DCS_AREA_TEMPLATE_XML_NAMESPACE
static String
DCS_AREA_TEMPLATE_XML_NAMESPACE_PREFIX
static String
DCS_COMMON_XML_NAMESPACE
static String
DCS_COMMON_XML_NAMESPACE_PREFIX
static String
DCS_CORE_XML_NAMESPACE
static String
DCS_CORE_XML_NAMESPACE_PREFIX
static String
DCS_SCHEMA_XML_NAMESPACE
static String
DCS_SETTINGS_XML_NAMESPACE
static String
DCS_SETTINGS_XML_NAMESPACE_PREFIX
static String
SPREADSHEET_XML_NAMESPACE
static String
SPREADSHEET_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 aIDtProject
instead
-
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 aIDtProject
insteadConstructor.- Parameters:
resource
- dcs resource, can not benull
resourceLookup
- 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 benull
resource
- dcs resource, can not benull
resourceLookup
- 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:
XMLStreamException
ExportException
- if export processing errors
-
serializeXML
public void serializeXML(org.eclipse.emf.ecore.EObject eObject, OutputStream outputStream, String lineSeparator, IDtProject dtProject) throws XMLStreamException, ExportException
SerializesEObject
in xml stream.- Parameters:
eObject
- theEObject
instance, cannot benull
outputStream
- the output stream, cannot benull
definedTypes
- The set of defined types mapped to the defined type symlink, can benull
- Throws:
XMLStreamException
ExportException
- 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:
XMLStreamException
ExportException
- if export processing errors
-
serializeXML
public void serializeXML(DataCompositionAppearanceTemplate appearanceTemplate, OutputStream outputStream, Map<String,UUID> definedTypes, String lineSeparator) throws XMLStreamException, ExportException
SerializesDataCompositionAppearanceTemplate
in xml stream.- Parameters:
appearanceTemplate
- theDataCompositionAppearanceTemplate
instance, cannot benull
outputStream
- the output stream, cannot benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
readSchema
public DataCompositionSchema readSchema(XMLStreamReader reader) throws XMLStreamException, ExportException
Прочитать схему- Parameters:
reader
-- Returns:
- схема
- Throws:
XMLStreamException
ExportException
- 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 benull
schema
- The target schema. May benull
elementName
- The name of the element. May not benull
version
- The platform version. May not benull
definedTypes
- The set of configuration defined types mapped to teir UUIDs. May not benull
- Throws:
XMLStreamException
ExportException
-
readSettings
public DataCompositionSettings readSettings(XMLStreamReader reader) throws XMLStreamException, ExportException
Прочитать настройки- Parameters:
reader
-- Returns:
- настройки
- Throws:
XMLStreamException
ExportException
- 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:
XMLStreamException
ExportException
- if export processing errors
-
writeDcsscaResource
public void writeDcsscaResource(ExportXmlStreamWriter writer, DataCompositionConditionalAppearance appearance) throws XMLStreamException, ExportException
write ConditionalAppearance in xml stream- Parameters:
writer
- theExportXmlStreamWriter
appearance
- theDataCompositionConditionalAppearance
objectelementName
- the name of xml element- Throws:
XMLStreamException
ExportException
- if export processing errors
-
readConditionalAppearance
public DataCompositionConditionalAppearance readConditionalAppearance(XMLStreamReader reader) throws XMLStreamException, ExportException
Read ConditionalAppearance from xml- Parameters:
reader
- theXMLStreamReader
- Returns:
- the
DataCompositionConditionalAppearance
instance - Throws:
XMLStreamException
ExportException
- if export processing errors
-
writeConditionalAppearance
public void writeConditionalAppearance(ExportXmlStreamWriter writer, DataCompositionConditionalAppearance appearance, QName elementName) throws XMLStreamException, ExportException
write ConditionalAppearance in xml stream- Parameters:
writer
- theExportXmlStreamWriter
appearance
- theDataCompositionConditionalAppearance
objectelementName
- the name of xml element- Throws:
XMLStreamException
ExportException
- if export processing errors
-
readAppearanceTemplate
public DataCompositionAppearanceTemplate readAppearanceTemplate(XMLStreamReader reader) throws XMLStreamException, ExportException
ReadsDataCompositionAppearanceTemplate
from xml.- Parameters:
reader
- theXMLStreamReader
, cannot benull
- Returns:
- the
DataCompositionAppearanceTemplate
instance, cannot benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
writeAppearanceTemplate
public void writeAppearanceTemplate(ExportXmlStreamWriter writer, DataCompositionAppearanceTemplate appearanceTemplate, QName elementName, Map<String,UUID> definedTypes) throws XMLStreamException, ExportException
WritesDataCompositionAppearanceTemplate
in xml stream.- Parameters:
writer
- theExportXmlStreamWriter
, cannot benull
appearanceTemplate
- theDataCompositionAppearanceTemplate
instance, cannot benull
elementName
- the name of xml element, cannot benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
readDataSetField
public DataSetField readDataSetField(XMLStreamReader reader, Version version) throws XMLStreamException, ExportException
ReadsDataSetField
from xml.- Parameters:
reader
- theXMLStreamReader
, cannot benull
version
- actual platformVersion
, cannot benull
- Returns:
- the
DataSetField
instance, cannot benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
readCalculatedField
public DataCompositionSchemaCalculatedField readCalculatedField(XMLStreamReader reader, Version version) throws XMLStreamException, ExportException
ReadsDataCompositionSchemaCalculatedField
from xml.- Parameters:
reader
- theXMLStreamReader
, cannot benull
version
- actual platformVersion
, cannot benull
- Returns:
- the
DataCompositionSchemaCalculatedField
instance, cannot benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
readParameter
public DataCompositionSchemaParameter readParameter(XMLStreamReader reader, Version version) throws XMLStreamException, ExportException
ReadsDataCompositionSchemaParameter
from xml.- Parameters:
reader
- theXMLStreamReader
, cannot benull
version
- actual platformVersion
, cannot benull
- Returns:
- the
DataCompositionSchemaParameter
instance, cannot benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
writeDataSetField
public void writeDataSetField(ExportXmlStreamWriter writer, DataSetField field, QName elementName, IDtProject project) throws XMLStreamException, ExportException
WritesDataSetField
in xml stream.- Parameters:
writer
- theExportXmlStreamWriter
, cannot benull
field
- theDataCompositionAppearanceTemplate
instance, cannot benull
elementName
- the name of xml element, cannot benull
project
- actualIDtProject
for getting definedTypes form it, can benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
writeCalculatedField
public void writeCalculatedField(ExportXmlStreamWriter writer, DataCompositionSchemaCalculatedField field, QName elementName, IDtProject project) throws XMLStreamException, ExportException
WritesDataCompositionSchemaCalculatedField
in xml stream.- Parameters:
writer
- theExportXmlStreamWriter
, cannot benull
field
- theDataCompositionAppearanceTemplate
instance, cannot benull
elementName
- the name of xml element, cannot benull
project
- actualIDtProject
for getting definedTypes form it, can benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
writeParameter
public void writeParameter(ExportXmlStreamWriter writer, DataCompositionSchemaParameter parameter, QName elementName, IDtProject project) throws XMLStreamException, ExportException
WritesDataCompositionSchemaParameter
in xml stream.- Parameters:
writer
- theExportXmlStreamWriter
, cannot benull
field
- theDataCompositionAppearanceTemplate
instance, cannot benull
elementName
- the name of xml element, cannot benull
project
- actualIDtProject
for getting definedTypes form it, can benull
- Throws:
XMLStreamException
ExportException
- if export processing errors
-
-