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 SpreadsheetDocumentdeserializeXML(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)LoadsTypeItems and creates a map where key is the TypeItem.name and value is the type item object itself.static voidserializeXML(SpreadsheetDocument sheet, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator, LazyUriEncoder uriEncoder, OutputStream outputStream)WritesSpreadsheetDocumentto XMLstatic voidserializeXML(SpreadsheetDocument sheet, OutputStream outputStream)WritesSpreadsheetDocumentto XMLstatic voidserializeXML(SpreadsheetDocument sheet, OutputStream outputStream, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator)WritesSpreadsheetDocumentto 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 benullresource-Resource, may benullin case non-standalone documentruntimeVersion- current runtime version, must not benullcompatibilityMode- currentCompatibilityMode, can benullif 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)
WritesSpreadsheetDocumentto XML- Parameters:
sheet-SpreadsheetDocumentfor serialization, cannot benullruntimeVersion- actualVersionof the project corresponding to the document, cannot benullcompatibilityMode- currentCompatibilityMode, can benullif there is no information about itlineSeparator- the line separator to use, cannot benulluriEncoder- actualLazyUriEncoderfor getting text for unresolved refrences, cannot benulloutputStream- stream for writing, cannot benull
-
serializeXML
public static void serializeXML(SpreadsheetDocument sheet, OutputStream outputStream)
WritesSpreadsheetDocumentto XML- Parameters:
sheet-SpreadsheetDocumentfor serialization, cannot benulloutputStream- stream for writing, cannot benull
-
serializeXML
public static void serializeXML(SpreadsheetDocument sheet, OutputStream outputStream, Version runtimeVersion, CompatibilityMode compatibilityMode, String lineSeparator)
WritesSpreadsheetDocumentto XML- Parameters:
sheet-SpreadsheetDocumentfor serialization, cannot benulloutputStream- stream for writing, cannot benullruntimeVersion- target version of the runtime, cannot benullcompatibilityMode- currentCompatibilityMode, can benullif 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)
LoadsTypeItems and creates a map where key is the TypeItem.name and value is the type item object itself.- Parameters:
resource- theResource, cannot benull.globalScopeProvider- theIGlobalScopeProviderinstance, cannot benull.slicePredicateService- theIIndexSlicePredicateServiceinstance, cannot benull.- Returns:
- a types by type name map, never
null.
-
-