Class XdtoToXsdSerializer

java.lang.Object
com._1c.g5.v8.dt.xdto.model.resource.AbstractXdtoSerializer
com._1c.g5.v8.dt.xdto.resource.XdtoToXsdSerializer

public class XdtoToXsdSerializer extends AbstractXdtoSerializer
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 Details

  • Constructor Details

    • XdtoToXsdSerializer

      public XdtoToXsdSerializer()
      Constructs a new instance.
  • Method Details

    • exportToXsd

      public void exportToXsd(XdtoResource resource, OutputStream outputStream) throws IOException
      Exports 1st resource element to the xsd format
      Parameters:
      resource - XdtoResource for exporting, can't be null and should have one root element
      outputStream - stream for writing xsd format, can't be null
      Throws:
      IOException - if I/O or xml exception were occurred
    • exportToXsd

      public void exportToXsd(Package pack, OutputStream outputStream) throws IOException
      Exports package to the xsd format.
      Parameters:
      pack - Package for exporting, can't be null
      outputStream - stream for writing xsd format, can't be null
      Throws:
      IOException - if I/O or xml exception is occurred
    • exportToXsd

      public void exportToXsd(Package pack, Path path) throws IOException
      Exports package to the xsd format.
      Parameters:
      pack - Package for exporting, can't be null
      path - Path to the file for writing xsd format, can't be null
      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 object Package
      Parameters:
      resource - XdtoResource for creating Package, can't be null
      inputStream - stream for reading xsd scheme content, can't be null
      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 object Package
      Parameters:
      reader - actual XMLStreamReader for reading xml structure text, can't be null
      container - object for setting Package, can't be null
      featureToSet - EStructuralFeature for setting Package, can't be null
      Returns:
      read Package, never null
      Throws:
      XMLStreamException - if invalid xml structure was found