Class SimpleFeatureElementWriter<T extends org.eclipse.emf.ecore.EObject>

    • Constructor Detail

      • SimpleFeatureElementWriter

        public SimpleFeatureElementWriter()
    • Method Detail

      • accessibleFeature

        protected abstract boolean accessibleFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Returns that specified feature can be written by this writer
        Parameters:
        feature - the key feature, cannot be null
        Returns:
        true if this writer accessible for given feature, false in otherwise
      • getPropertyFeatureOrderList

        protected abstract List<org.eclipse.emf.ecore.EStructuralFeature> getPropertyFeatureOrderList​(Version version)
        Ordered list of features to write
        Parameters:
        version - the runtime version, cannot be null
        Returns:
        Ordered list of EStructuralFeature, never null
      • isForceWriteEmptyFeature

        protected boolean isForceWriteEmptyFeature​(boolean elementWriteEmpty,
                                                   org.eclipse.emf.ecore.EStructuralFeature feature,
                                                   Version version)
        Returns that contained empty or default value in specified feature must be written
        Parameters:
        elementWriteEmpty - the common write empty value for context object
        feature - the key feature, cannot be null
        version - the exporting project Version, cannot be null
        Returns:
        true to force writing feature with empty or default value, false otherwise
      • writeSingleElement

        protected void writeSingleElement​(ExportXmlStreamWriter writer,
                                          boolean writeEmpty,
                                          Version version,
                                          QName elementName,
                                          org.eclipse.emf.ecore.EObject value)
                                   throws XMLStreamException,
                                          ExportException
        Write single value element

        This method can be overridden for specify custom rules writing

        Parameters:
        writer - the xml ExportXmlStreamWriter, cannot be null
        writeEmpty - write empty element if true or nothing if false
        version - the exporting project Version, cannot be null
        elementName - the element name, cannot be null
        value - the object to write, cannot be null
        Throws:
        XMLStreamException
        ExportException