Class SimpleFeatureElementWriter<T extends org.eclipse.emf.ecore.EObject>
- java.lang.Object
-
- com._1c.g5.v8.dt.chart.export.xml.writer.SimpleFeatureElementWriter<T>
-
- All Implemented Interfaces:
ISpecifiedElementWriter
- Direct Known Subclasses:
ChartAxisWriter
,ChartColorPaletteDescriptionWriter
,ChartReferenceBandsWriter
,ChartReferenceBandWriter
,ChartReferenceLinesWriter
,ChartReferenceLineWriter
,ChartScaleWriter
,DendrogramContentWriter
,DendrogramDimensionValueWriter
,DendrogramElementsWriter
,DendrogramLinksWriter
,DendrogramLinkValueWriter
,DoubleRectWriter
,GanttChartBackgroundIntervalsWriter
,GanttChartCollectItemWriter
,GanttChartCollectWriter
,GanttChartIntervalWriter
,GanttChartLinkWriter
,GanttChartPointDimensionValueWriter
,GanttChartPointsWriter
,GanttChartPointValueContentWriter
,GanttChartSeriesDimensionValueWriter
,GanttChartSeriesValueContentWriter
,GanttChartSeriesWriter
,GanttChartValueWriter
,GaugeChartQualityBandWriter
,LabelAreaWriter
,PointPropertiesWriter
,RealDataItemWriter
,TimeScaleLabelsWriter
,TimeScaleLabelWriter
,TimeScaleLevelWriter
,TimeScaleWriter
,TrendlineWriter
public abstract class SimpleFeatureElementWriter<T extends org.eclipse.emf.ecore.EObject> extends Object implements ISpecifiedElementWriter
Base implementation ofISpecifiedElementWriter
Write value object(s) by subclass provided order
-
-
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 protected ISpecifiedElementWriter
featureWriter
protected IQNameProvider
nameProvider
-
Fields inherited from interface com._1c.g5.v8.dt.export.xml.writer.ISpecifiedElementWriter
SMART_ELEMENT_WRITER
-
-
Constructor Summary
Constructors Constructor Description SimpleFeatureElementWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
accessibleFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Returns that specified feature can be written by this writerprotected abstract List<org.eclipse.emf.ecore.EStructuralFeature>
getPropertyFeatureOrderList(Version version)
Ordered list of features to writeprotected boolean
isForceWriteEmptyFeature(boolean elementWriteEmpty, org.eclipse.emf.ecore.EStructuralFeature feature, Version version)
Returns that contained empty or default value in specified feature must be writtenvoid
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 rulesprotected void
writeMultiElement(ExportXmlStreamWriter writer, boolean writeEmpty, Version version, QName elementName, Collection<org.eclipse.emf.ecore.EObject> values)
Write many value elementsprotected void
writeSingleElement(ExportXmlStreamWriter writer, boolean writeEmpty, Version version, QName elementName, org.eclipse.emf.ecore.EObject value)
Write single value element
-
-
-
Field Detail
-
nameProvider
@Inject protected IQNameProvider nameProvider
-
featureWriter
@Inject protected ISpecifiedElementWriter featureWriter
-
-
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
-
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 benull
- 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 benull
- Returns:
- Ordered list of
EStructuralFeature
, nevernull
-
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 objectfeature
- the key feature, cannot benull
version
- the exporting projectVersion
, cannot benull
- 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 elementThis method can be overridden for specify custom rules writing
- Parameters:
writer
- the xmlExportXmlStreamWriter
, cannot benull
writeEmpty
- write empty element iftrue
or nothing iffalse
version
- the exporting projectVersion
, cannot benull
elementName
- the element name, cannot benull
value
- the object to write, cannot benull
- Throws:
XMLStreamException
ExportException
-
writeMultiElement
protected void writeMultiElement(ExportXmlStreamWriter writer, boolean writeEmpty, Version version, QName elementName, Collection<org.eclipse.emf.ecore.EObject> values) throws XMLStreamException, ExportException
Write many value elementsThis method can be overridden for specify custom rules writing. As default used
writeSingleElement(ExportXmlStreamWriter, boolean, Version, QName, EObject)
for each value from given collection- Parameters:
writer
- the xmlExportXmlStreamWriter
, cannot benull
writeEmpty
- write empty element iftrue
or nothing iffalse
version
- the exporting projectVersion
, cannot benull
elementName
- the element name, cannot benull
values
- the collection of objects to write, cannot benull
- Throws:
XMLStreamException
ExportException
- See Also:
writeSingleElement(ExportXmlStreamWriter, boolean, Version, QName, EObject)
-
-