Class XmlSerializer
- java.lang.Object
- 
- com._1c.g5.modeling.xml.serializer.XmlSerializer
 
- 
- All Implemented Interfaces:
- IXmlSerializer
 - Direct Known Subclasses:
- XmiSerializer
 
 public class XmlSerializer extends Object implements IXmlSerializer Сериализирует модель с учетом форматирования
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classXmlSerializer.EClassFeaturePairПараEClassиEStructuralFeaturestatic classXmlSerializer.EObjectFeaturePairПараEObjectиEStructuralFeature
 - 
Field SummaryFields Modifier and Type Field Description protected org.eclipse.emf.ecore.EClassanySimpleTypeprotected org.eclipse.emf.ecore.EClassanyTypeprotected ICrossReferenceSerializercrossReferenceSerializerprotected booleandeclareSchemaLocationprotected booleandeclareSchemaLocationImplementationprotected booleandeclareXMLprotected booleandeclareXSIprotected XmlStringBuilderdocprotected org.eclipse.emf.ecore.xmi.XMLResource.ElementHandlerelementHandlerprotected Stringencodingprotected Escapeescapeprotected EscapeescapeURIprotected org.eclipse.emf.ecore.util.ExtendedMetaDataextendedMetaDataprotected LookupfeatureTableprotected intflushThresholdprotected org.eclipse.emf.ecore.xmi.XMLHelperhelperprotected StringidAttributeNameprotected StringidAttributeNSprotected static intINDEX_LOOKUPprotected booleankeepAttributeLocationprotected booleanlastElementIsOpenprotected org.eclipse.emf.ecore.xmi.XMLResource.XMLMapmapprotected static StringNAMESPACES_PREFIX_MAPprotected Map<?,?>optionsprotected org.eclipse.emf.ecore.xmi.XMLResource.ResourceEntityHandlerresourceEntityHandlerprotected booleansaveTypeInfoprotected Map<XmlSerializer.EObjectFeaturePair,Integer>usesManyFeatureprotected static StringXMI_TAG_NSprotected FormattingXmlResourcexmlResourceprotected org.eclipse.emf.ecore.EPackagexmlSchemaTypePackageprotected org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfoxmlTypeInfoprotected StringxmlVersionprotected static StringXSI_NO_NAMESPACE_SCHEMA_LOCATIONprotected static StringXSI_SCHEMA_LOCATIONprotected static StringXSI_TYPE_NSprotected static StringXSI_XMLNS
 - 
Constructor SummaryConstructors Constructor Description XmlSerializer()XmlSerializer(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddNamespaceDeclarations()protected voidcollectNamespaceDeclarations(Map<String,String> newNameSpacesMap)protected StringconvertURI(String uri)protected StringgetContainmentReferenceName(IModelNode node)protected StringgetDatatypeValue(Object value, org.eclipse.emf.ecore.EStructuralFeature f, boolean isAttribute)org.eclipse.emf.ecore.xmi.XMLHelpergetHelper()protected StringgetHREFValue(org.eclipse.emf.ecore.EReference r, org.eclipse.emf.ecore.EObject value)protected StringgetIDREFValue(org.eclipse.emf.ecore.EObject value)protected StringgetModelNodeName(IModelNode node)protected StringgetNonContainmentReferenceName(NonContainmentReferenceNode node)Map<?,?>getOptions()voidinit(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)protected booleanisDuplicateURI(String nsURI)voidsave(OutputStream outputStream)voidsave(org.eclipse.emf.ecore.xmi.XMLResource resource, OutputStream outputStream, Map<?,?> options)protected voidsaveTypeAttribute(NamespaceNode node, boolean rightWS)voidsetFormater(IFormatter formater)voidsetHelper(org.eclipse.emf.ecore.xmi.XMLHelper helper)voidsetOptions(Map<?,?> options)protected voidstartElement(String elementName)booleantraverse(INode node)voidwrite(Writer os)voidwriteAscii(OutputStream os)protected voidwriteNamespaceNode(NamespaceNode node, boolean rightWS)
 
- 
- 
- 
Field Detail- 
INDEX_LOOKUPprotected static final int INDEX_LOOKUP - See Also:
- Constant Field Values
 
 - 
XSI_TYPE_NSprotected static final String XSI_TYPE_NS - See Also:
- Constant Field Values
 
 - 
XSI_XMLNSprotected static final String XSI_XMLNS - See Also:
- Constant Field Values
 
 - 
XSI_SCHEMA_LOCATIONprotected static final String XSI_SCHEMA_LOCATION - See Also:
- Constant Field Values
 
 - 
XSI_NO_NAMESPACE_SCHEMA_LOCATIONprotected static final String XSI_NO_NAMESPACE_SCHEMA_LOCATION - See Also:
- Constant Field Values
 
 - 
XMI_TAG_NSprotected static final String XMI_TAG_NS - See Also:
- Constant Field Values
 
 - 
NAMESPACES_PREFIX_MAPprotected static final String NAMESPACES_PREFIX_MAP - See Also:
- Constant Field Values
 
 - 
optionsprotected Map<?,?> options 
 - 
helperprotected org.eclipse.emf.ecore.xmi.XMLHelper helper 
 - 
docprotected XmlStringBuilder doc 
 - 
xmlResourceprotected FormattingXmlResource xmlResource 
 - 
declareXSIprotected boolean declareXSI 
 - 
declareXMLprotected boolean declareXML 
 - 
saveTypeInfoprotected boolean saveTypeInfo 
 - 
keepAttributeLocationprotected boolean keepAttributeLocation 
 - 
lastElementIsOpenprotected boolean lastElementIsOpen 
 - 
xmlTypeInfoprotected org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo xmlTypeInfo 
 - 
escapeprotected Escape escape 
 - 
escapeURIprotected Escape escapeURI 
 - 
featureTableprotected Lookup featureTable 
 - 
encodingprotected String encoding 
 - 
xmlVersionprotected String xmlVersion 
 - 
idAttributeNameprotected String idAttributeName 
 - 
idAttributeNSprotected String idAttributeNS 
 - 
declareSchemaLocationprotected boolean declareSchemaLocation 
 - 
declareSchemaLocationImplementationprotected boolean declareSchemaLocationImplementation 
 - 
xmlSchemaTypePackageprotected org.eclipse.emf.ecore.EPackage xmlSchemaTypePackage 
 - 
extendedMetaDataprotected org.eclipse.emf.ecore.util.ExtendedMetaData extendedMetaData 
 - 
anySimpleTypeprotected org.eclipse.emf.ecore.EClass anySimpleType 
 - 
anyTypeprotected org.eclipse.emf.ecore.EClass anyType 
 - 
mapprotected org.eclipse.emf.ecore.xmi.XMLResource.XMLMap map 
 - 
elementHandlerprotected org.eclipse.emf.ecore.xmi.XMLResource.ElementHandler elementHandler 
 - 
resourceEntityHandlerprotected org.eclipse.emf.ecore.xmi.XMLResource.ResourceEntityHandler resourceEntityHandler 
 - 
usesManyFeatureprotected Map<XmlSerializer.EObjectFeaturePair,Integer> usesManyFeature 
 - 
flushThresholdprotected int flushThreshold 
 - 
crossReferenceSerializer@Inject(optional=true) protected ICrossReferenceSerializer crossReferenceSerializer 
 
- 
 - 
Constructor Detail- 
XmlSerializerpublic XmlSerializer() 
 - 
XmlSerializerpublic XmlSerializer(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)
 
- 
 - 
Method Detail- 
initpublic void init(org.eclipse.emf.ecore.xmi.XMLHelper helper, Map<?,?> options)- Specified by:
- initin interface- IXmlSerializer
 
 - 
setFormaterpublic void setFormater(IFormatter formater) - Specified by:
- setFormaterin interface- IXmlSerializer
 
 - 
getHelperpublic org.eclipse.emf.ecore.xmi.XMLHelper getHelper() 
 - 
setHelperpublic void setHelper(org.eclipse.emf.ecore.xmi.XMLHelper helper) 
 - 
getOptionspublic Map<?,?> getOptions() 
 - 
setOptionspublic void setOptions(Map<?,?> options) 
 - 
savepublic void save(OutputStream outputStream) throws IOException - Specified by:
- savein interface- IXmlSerializer
- Throws:
- IOException
 
 - 
savepublic void save(org.eclipse.emf.ecore.xmi.XMLResource resource, OutputStream outputStream, Map<?,?> options) throws IOException- Specified by:
- savein interface- IXmlSerializer
- Throws:
- IOException
 
 - 
writepublic void write(Writer os) throws IOException - Throws:
- IOException
 
 - 
writeAsciipublic void writeAscii(OutputStream os) throws IOException - Throws:
- IOException
 
 - 
traversepublic boolean traverse(INode node) 
 - 
getContainmentReferenceNameprotected String getContainmentReferenceName(IModelNode node) 
 - 
getNonContainmentReferenceNameprotected String getNonContainmentReferenceName(NonContainmentReferenceNode node) 
 - 
getModelNodeNameprotected String getModelNodeName(IModelNode node) 
 - 
addNamespaceDeclarationsprotected void addNamespaceDeclarations() 
 - 
collectNamespaceDeclarationsprotected void collectNamespaceDeclarations(Map<String,String> newNameSpacesMap) 
 - 
isDuplicateURIprotected boolean isDuplicateURI(String nsURI) 
 - 
startElementprotected void startElement(String elementName) 
 - 
saveTypeAttributeprotected void saveTypeAttribute(NamespaceNode node, boolean rightWS) 
 - 
writeNamespaceNodeprotected void writeNamespaceNode(NamespaceNode node, boolean rightWS) 
 - 
getDatatypeValueprotected String getDatatypeValue(Object value, org.eclipse.emf.ecore.EStructuralFeature f, boolean isAttribute) 
 - 
getIDREFValueprotected String getIDREFValue(org.eclipse.emf.ecore.EObject value) 
 - 
getHREFValueprotected String getHREFValue(org.eclipse.emf.ecore.EReference r, org.eclipse.emf.ecore.EObject value) 
 
- 
 
-