Class AbstractXmlPartReader

    • Constructor Detail

      • AbstractXmlPartReader

        public AbstractXmlPartReader()
    • Method Detail

      • read

        public void read​(org.eclipse.emf.ecore.EObject context,
                         org.eclipse.emf.ecore.EStructuralFeature feature,
                         IXmlNode node,
                         Version version,
                         IXmlReadErrorCollector errorCollector)
        Read and convert node text content to value in context-feature
        Parameters:
        context - the context EObject, cannot be null
        feature - the EStructuralFeature, cannot be null
        node - the source IXmlNode, cannot be null
        version - the version of importing 1C:Enterprise XML files, cannot be null
        errorCollector - IXmlReadErrorCollector in which will be added error if it occur, cannot be null
      • setValue

        protected void setValue​(org.eclipse.emf.ecore.EObject context,
                                org.eclipse.emf.ecore.EStructuralFeature feature,
                                Object value,
                                String attributeName,
                                Version version,
                                IXmlReadErrorCollector errorCollector)
        Set value in context-feature
        Parameters:
        context - EObject
        feature - EStructuralFeature
        value - Object
        attributeName - the attribute name, can be null
        version - the version of importing 1C:Enterprise XML files, cannot be null
        errorCollector - IXmlReadErrorCollector in which will be added error if it occur, cannot be null
        See Also:
        XmlReadHelper#setValue(EObject, EStructuralFeature, Object, IXmlReadErrorCollector)
      • setRefers

        protected void setRefers​(org.eclipse.emf.ecore.EObject context,
                                 org.eclipse.emf.ecore.EReference feature,
                                 String ref,
                                 String attributeName,
                                 Version version,
                                 IXmlReadErrorCollector errorCollector)
        Create proxy object in "unresolved:/" scheme and set in model
        Parameters:
        context - EObject
        feature - EReference
        ref - String
        attributeName - the attribute name, can be null
        version - the version of importing 1C:Enterprise XML files, cannot be null
        errorCollector - IXmlReadErrorCollector in which will be added error if it occur, cannot be null
        See Also:
        XmlReadHelper#setRefers(EObject, EReference, String, IXmlReadErrorCollector)
      • getXmlElementRequiredMessage

        protected String getXmlElementRequiredMessage​(String path)
        Generate error message about required xml element
        Parameters:
        path - position of required xml node in document, cannot be null
        Returns:
        the error message, never null
      • getWrongAttributeValueMessage

        protected String getWrongAttributeValueMessage​(String value,
                                                       String path,
                                                       String attributeName)
        Generate error message about wrong attribute values in xml
        Parameters:
        value - the attribute value, can be null
        path - position of xml node in document, cannot be null
        attributeName - the name of attribute, cannot be null
        Returns:
        the error message, never null