Package com._1c.g5.v8.dt.moxel.util
Class V8MoxelSerializer
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.util.V8MoxelSerializer
-
public class V8MoxelSerializer extends Object
Spreadsheet document xml serializer
-
-
Constructor Summary
Constructors Constructor Description V8MoxelSerializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SpreadsheetDocument
deserializeXML(InputStream inputStream, org.eclipse.emf.ecore.resource.Resource resource, Version runtimeVersion, CompatibilityMode compatibilityMode, Map<UUID,TypeItem> userDefinedTypes)
Load spreadsheet document from xml.static Map<String,TypeItem>
loadTypes(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.xtext.scoping.IGlobalScopeProvider globalScopeProvider, IIndexSlicePredicateService slicePredicateService)
LoadsTypeItem
s and creates a map where key is the TypeItem.name and value is the type item object itself.static void
serializeXML(SpreadsheetDocument sheet, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator, LazyUriEncoder uriEncoder, OutputStream outputStream)
WritesSpreadsheetDocument
to XMLstatic void
serializeXML(SpreadsheetDocument sheet, OutputStream outputStream)
WritesSpreadsheetDocument
to XMLstatic void
serializeXML(SpreadsheetDocument sheet, OutputStream outputStream, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator)
WritesSpreadsheetDocument
to XML
-
-
-
Method Detail
-
deserializeXML
public static SpreadsheetDocument deserializeXML(InputStream inputStream, org.eclipse.emf.ecore.resource.Resource resource, Version runtimeVersion, CompatibilityMode compatibilityMode, Map<UUID,TypeItem> userDefinedTypes)
Load spreadsheet document from xml.- Parameters:
inputStream
-InputStream
, must not benull
resource
-Resource
, may benull
in case non-standalone documentruntimeVersion
- current runtime version, must not benull
compatibilityMode
- currentCompatibilityMode
, can benull
if there is no information about ittypes
- the loaded types, cannot benull
.userDefinedTypes
- the loaded user defined types, cannot benull
.- Returns:
SpreadsheetDocument
-
serializeXML
public static void serializeXML(SpreadsheetDocument sheet, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator, LazyUriEncoder uriEncoder, OutputStream outputStream)
WritesSpreadsheetDocument
to XML- Parameters:
sheet
-SpreadsheetDocument
for serialization, cannot benull
runtimeVersion
- actualVersion
of the project corresponding to the document, cannot benull
compatibilityMode
- currentCompatibilityMode
, can benull
if there is no information about itlineSeparator
- the line separator to use, cannot benull
uriEncoder
- actualLazyUriEncoder
for getting text for unresolved refrences, cannot benull
outputStream
- stream for writing, cannot benull
-
serializeXML
public static void serializeXML(SpreadsheetDocument sheet, OutputStream outputStream)
WritesSpreadsheetDocument
to XML- Parameters:
sheet
-SpreadsheetDocument
for serialization, cannot benull
outputStream
- stream for writing, cannot benull
-
serializeXML
public static void serializeXML(SpreadsheetDocument sheet, OutputStream outputStream, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator)
WritesSpreadsheetDocument
to XML- Parameters:
sheet
-SpreadsheetDocument
for serialization, cannot benull
outputStream
- stream for writing, cannot benull
runtimeVersion
- target version of the runtime, cannot benull
compatibilityMode
- currentCompatibilityMode
, can benull
if there is no information about itlineSeparator
- the line separator to use, cannot benull
-
loadTypes
public static Map<String,TypeItem> loadTypes(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.xtext.scoping.IGlobalScopeProvider globalScopeProvider, IIndexSlicePredicateService slicePredicateService)
LoadsTypeItem
s and creates a map where key is the TypeItem.name and value is the type item object itself.- Parameters:
resource
- theResource
, cannot benull
.globalScopeProvider
- theIGlobalScopeProvider
instance, cannot benull
.slicePredicateService
- theIIndexSlicePredicateService
instance, cannot benull
.- Returns:
- a types by type name map, never
null
.
-
-