Interface IXmlFileDelegatingReader


  • public interface IXmlFileDelegatingReader
    Delegating XML file reader that uses appropriate XML file reader based on registered XML file reader providers and use it to parse the provided files.

    Example of usage in importer node:

     File file = getSource().toFile();
     Version version = getImporterContext().getVersion();
    
     XmlReaderResult xmlReaderResult =
         getImporterContext().getXmlFileReader().read(file, FormPackage.Literals.FORM, version);
     
    See Also:
    IHierarchyImporterContext.getXmlFileReader()
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      XmlReaderResult read​(Path path, org.eclipse.emf.ecore.EClass eClass, Version version)
      Get an appropriate XML file reader and read XML file to the XML reader result with the provided eClass content.
      XmlReaderResult read​(Path path, org.eclipse.emf.ecore.EClass eClass, org.eclipse.emf.ecore.EStructuralFeature feature, Version version)
      Get an appropriate XML file reader and read XML file to the XML reader result with the provided eClass content.
    • Method Detail

      • read

        XmlReaderResult read​(Path path,
                             org.eclipse.emf.ecore.EClass eClass,
                             Version version)
                      throws IOException
        Get an appropriate XML file reader and read XML file to the XML reader result with the provided eClass content.
        Parameters:
        document - the XML document parsed from file, cannot be null
        path - the file path with XML document, cannot be null
        eClass - the class to read object with, cannot be null
        version - the version of importing 1C:Enterprise XML files, cannot be null
        Returns:
        the XmlReaderResult as importing result with the provided eClass content, never null
        Throws:
        IOException - if an I/O error occurred
      • read

        XmlReaderResult read​(Path path,
                             org.eclipse.emf.ecore.EClass eClass,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             Version version)
                      throws IOException
        Get an appropriate XML file reader and read XML file to the XML reader result with the provided eClass content.
        Parameters:
        document - the XML document parsed from file, cannot be null
        path - the file path with XML document, cannot be null
        eClass - the class to read object with, cannot be null
        feature - the context feature containing eClass, cannot be null
        version - the version of importing 1C:Enterprise XML files, cannot be null
        Returns:
        the XmlReaderResult as importing result with the provided eClass content, never null
        Throws:
        IOException - if an I/O error occurred