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);
-
-
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 providedeClass
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 providedeClass
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 providedeClass
content.- Parameters:
document
- the XML document parsed fromfile
, cannot benull
path
- the file path with XML document, cannot benull
eClass
- the class to read object with, cannot benull
version
- the version of importing 1C:Enterprise XML files, cannot benull
- Returns:
- the
XmlReaderResult
as importing result with the providedeClass
content, nevernull
- 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 providedeClass
content.- Parameters:
document
- the XML document parsed fromfile
, cannot benull
path
- the file path with XML document, cannot benull
eClass
- the class to read object with, cannot benull
feature
- the context feature containingeClass
, cannot benull
version
- the version of importing 1C:Enterprise XML files, cannot benull
- Returns:
- the
XmlReaderResult
as importing result with the providedeClass
content, nevernull
- Throws:
IOException
- if an I/O error occurred
-
-