Package com._1c.g5.v8.dt.xdto.resource
Class XdtoToXsdSerializer
java.lang.Object
com._1c.g5.v8.dt.xdto.model.resource.AbstractXdtoSerializer
com._1c.g5.v8.dt.xdto.resource.XdtoToXsdSerializer
Special class for import/export XDTO Package content to the xsd scheme.
In platform native code see - src\xdto\src\XDTOSchemaSupportImpl.cpp: XDTOModelBuilder::createValueType, XDTOModelBuilder::createObjectType
-
Field Summary
FieldsFields inherited from class com._1c.g5.v8.dt.xdto.model.resource.AbstractXdtoSerializer
ABSTRACT, BASE, DEFAULT, ENCODING, ENUMERATION, FIXED, FORM, FRACTION_DIGITS, IMPORT, ITEM_TYPE, LENGTH, MAX_EXCLUSIVE, MAX_INCLUSIVE, MAX_LENGTH, MIN_EXCLUSIVE, MIN_INCLUSIVE, MIN_LENGTH, MIXED, NAME, NAMESPACE, NILLABLE, OPEN, PATTERN, REF, SCHEMA_LOCATION, TARGET_NAMESPACE, TOTAL_DIGITS, TYPE, WHITESPACE, XMLNS_PREFIX, XS_PREFIX, XS_URI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(XMLStreamReader reader, org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature featureToSet) Convert xsd scheme to Xdto objectPackage
void
exportToXsd
(Package pack, OutputStream outputStream) Exports package to the xsd format.void
exportToXsd
(Package pack, Path path) Exports package to the xsd format.void
exportToXsd
(XdtoResource resource, OutputStream outputStream) Exports 1st resource element to the xsd formatimportFromXsd
(XdtoResource resource, InputStream inputStream) Convert xsd scheme to Xdto objectPackage
Methods inherited from class com._1c.g5.v8.dt.xdto.model.resource.AbstractXdtoSerializer
convertLineEndings, createAttributeName, decreaceIndent, getNewPrefix, increaseIndent, writeFormatCharacters
-
Field Details
-
NS_PREFIX
- See Also:
-
SCHEMA
- See Also:
-
TNS_PREFIX
- See Also:
-
-
Constructor Details
-
XdtoToXsdSerializer
public XdtoToXsdSerializer()Constructs a new instance.
-
-
Method Details
-
exportToXsd
Exports 1st resource element to the xsd format- Parameters:
resource
-XdtoResource
for exporting, can't benull
and should have one root elementoutputStream
- stream for writing xsd format, can't benull
- Throws:
IOException
- if I/O or xml exception were occurred
-
exportToXsd
Exports package to the xsd format.- Parameters:
pack
-Package
for exporting, can't benull
outputStream
- stream for writing xsd format, can't benull
- Throws:
IOException
- if I/O or xml exception is occurred
-
exportToXsd
Exports package to the xsd format.- Parameters:
pack
-Package
for exporting, can't benull
path
-Path
to the file for writing xsd format, can't benull
- Throws:
IOException
- if I/O or xml exception is occurred
-
importFromXsd
public Collection<String> importFromXsd(XdtoResource resource, InputStream inputStream) throws IOException Convert xsd scheme to Xdto objectPackage
- Parameters:
resource
-XdtoResource
for creatingPackage
, can't benull
inputStream
- stream for reading xsd scheme content, can't benull
- Throws:
IOException
- if I/O or xml exception were occurred
-
deserialize
public Package deserialize(XMLStreamReader reader, org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature featureToSet) throws XMLStreamException Convert xsd scheme to Xdto objectPackage
- Parameters:
reader
- actualXMLStreamReader
for reading xml structure text, can't benull
container
- object for settingPackage
, can't benull
featureToSet
-EStructuralFeature
for settingPackage
, can't benull
- Returns:
- read
Package
, nevernull
- Throws:
XMLStreamException
- if invalid xml structure was found
-