Class XmlSerializer

  • All Implemented Interfaces:
    IXmlSerializer
    Direct Known Subclasses:
    XmiSerializer

    public class XmlSerializer
    extends Object
    implements IXmlSerializer
    Сериализирует модель с учетом форматирования
    • Field Detail

      • options

        protected Map<?,​?> options
      • helper

        protected org.eclipse.emf.ecore.xmi.XMLHelper helper
      • declareXSI

        protected boolean declareXSI
      • declareXML

        protected boolean declareXML
      • saveTypeInfo

        protected boolean saveTypeInfo
      • keepAttributeLocation

        protected boolean keepAttributeLocation
      • lastElementIsOpen

        protected boolean lastElementIsOpen
      • xmlTypeInfo

        protected org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo xmlTypeInfo
      • escape

        protected Escape escape
      • escapeURI

        protected Escape escapeURI
      • featureTable

        protected Lookup featureTable
      • encoding

        protected String encoding
      • xmlVersion

        protected String xmlVersion
      • idAttributeName

        protected String idAttributeName
      • idAttributeNS

        protected String idAttributeNS
      • declareSchemaLocation

        protected boolean declareSchemaLocation
      • declareSchemaLocationImplementation

        protected boolean declareSchemaLocationImplementation
      • xmlSchemaTypePackage

        protected org.eclipse.emf.ecore.EPackage xmlSchemaTypePackage
      • extendedMetaData

        protected org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData
      • anySimpleType

        protected org.eclipse.emf.ecore.EClass anySimpleType
      • anyType

        protected org.eclipse.emf.ecore.EClass anyType
      • map

        protected org.eclipse.emf.ecore.xmi.XMLResource.XMLMap map
      • elementHandler

        protected org.eclipse.emf.ecore.xmi.XMLResource.ElementHandler elementHandler
      • resourceEntityHandler

        protected org.eclipse.emf.ecore.xmi.XMLResource.ResourceEntityHandler resourceEntityHandler
      • flushThreshold

        protected int flushThreshold
    • Constructor Detail

      • XmlSerializer

        public XmlSerializer()
      • XmlSerializer

        public XmlSerializer​(org.eclipse.emf.ecore.xmi.XMLHelper helper,
                             Map<?,​?> options)
    • Method Detail

      • init

        public void init​(org.eclipse.emf.ecore.xmi.XMLHelper helper,
                         Map<?,​?> options)
        Specified by:
        init in interface IXmlSerializer
      • getHelper

        public org.eclipse.emf.ecore.xmi.XMLHelper getHelper()
      • setHelper

        public void setHelper​(org.eclipse.emf.ecore.xmi.XMLHelper helper)
      • getOptions

        public Map<?,​?> getOptions()
      • setOptions

        public void setOptions​(Map<?,​?> options)
      • traverse

        public boolean traverse​(INode node)
      • getContainmentReferenceName

        protected String getContainmentReferenceName​(IModelNode node)
      • addNamespaceDeclarations

        protected void addNamespaceDeclarations()
      • collectNamespaceDeclarations

        protected void collectNamespaceDeclarations​(Map<String,​String> newNameSpacesMap)
      • isDuplicateURI

        protected boolean isDuplicateURI​(String nsURI)
      • startElement

        protected void startElement​(String elementName)
      • saveTypeAttribute

        protected void saveTypeAttribute​(NamespaceNode node,
                                         boolean rightWS)
      • writeNamespaceNode

        protected void writeNamespaceNode​(NamespaceNode node,
                                          boolean rightWS)
      • getDatatypeValue

        protected String getDatatypeValue​(Object value,
                                          org.eclipse.emf.ecore.EStructuralFeature f,
                                          boolean isAttribute)
      • getIDREFValue

        protected String getIDREFValue​(org.eclipse.emf.ecore.EObject value)
      • getHREFValue

        protected String getHREFValue​(org.eclipse.emf.ecore.EReference r,
                                      org.eclipse.emf.ecore.EObject value)