Class ReferenceWriter
- java.lang.Object
-
- com._1c.g5.v8.dt.export.xml.writer.ReferenceWriter
-
- All Implemented Interfaces:
ISpecifiedElementWriter
public class ReferenceWriter extends Object implements ISpecifiedElementWriter
Specified writer for reference feature
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.export.xml.writer.ISpecifiedElementWriter
ISpecifiedElementWriter.ZeroWriter
-
-
Field Summary
Fields Modifier and Type Field Description IQNameProvider
nameProvider
-
Fields inherited from interface com._1c.g5.v8.dt.export.xml.writer.ISpecifiedElementWriter
SMART_ELEMENT_WRITER
-
-
Constructor Summary
Constructors Constructor Description ReferenceWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getReferenceRepresentation(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference feature, org.eclipse.emf.ecore.EObject value)
The string representation of an object reference to write in xmlvoid
write(ExportXmlStreamWriter writer, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, boolean writeEmpty, Version version)
Write value from eObject-feature reference by specified rules
-
-
-
Field Detail
-
nameProvider
@Inject public IQNameProvider nameProvider
-
-
Method Detail
-
write
public void write(ExportXmlStreamWriter writer, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, boolean writeEmpty, Version version) throws XMLStreamException, ExportException
Description copied from interface:ISpecifiedElementWriter
Write value from eObject-feature reference by specified rules- Specified by:
write
in interfaceISpecifiedElementWriter
- Parameters:
writer
- the xmlExportXmlStreamWriter
, cannot benull
eObject
- context object, cannot benull
feature
- theEStructuralFeature
, cannot benull
writeEmpty
- write empty element iftrue
or nothing iffalse
version
- the exporting projectVersion
, cannot benull
- Throws:
XMLStreamException
- if unexpected processing errorsExportException
- if export processing errors
-
getReferenceRepresentation
public String getReferenceRepresentation(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference feature, org.eclipse.emf.ecore.EObject value)
The string representation of an object reference to write in xml- Parameters:
context
- the context object, cannot benull
)feature
- the target object reference, cannot benull
)value
- the target object string representation for, cannot benull
)- Returns:
- string representation, or
null
if cannot create valid reprecentation of given reference
-
-