Class MidpointYAMLGenerator

java.lang.Object
com.fasterxml.jackson.core.JsonGenerator
com.fasterxml.jackson.core.base.GeneratorBase
com.fasterxml.jackson.dataformat.yaml.YAMLGenerator
com.evolveum.midpoint.prism.impl.lex.json.yaml.MidpointYAMLGenerator
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, Closeable, Flushable, AutoCloseable

public class MidpointYAMLGenerator extends com.fasterxml.jackson.dataformat.yaml.YAMLGenerator
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.dataformat.yaml.YAMLGenerator

    com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature
  • Field Summary

    Fields inherited from class com.fasterxml.jackson.dataformat.yaml.YAMLGenerator

    _docVersion, _emitter, _formatFeatures, _ioContext, _objectId, _outputOptions, _quotingChecker, _rootValueCount, _typeId, _writer, MAX_INT_AS_LONG, MIN_INT_AS_LONG, PLAIN_NUMBER_P, TAG_BINARY

    Fields inherited from class com.fasterxml.jackson.core.base.GeneratorBase

    _cfgNumbersAsStrings, _closed, _features, _objectCodec, _writeContext, DERIVED_FEATURES_MASK, MAX_BIG_DECIMAL_SCALE, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST, WRITE_BINARY, WRITE_BOOLEAN, WRITE_NULL, WRITE_NUMBER, WRITE_RAW, WRITE_STRING

    Fields inherited from class com.fasterxml.jackson.core.JsonGenerator

    _cfgPrettyPrinter, DEFAULT_BINARY_WRITE_CAPABILITIES, DEFAULT_TEXTUAL_WRITE_CAPABILITIES, DEFAULT_WRITE_CAPABILITIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    MidpointYAMLGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, int jsonFeatures, int yamlFeatures, com.fasterxml.jackson.core.ObjectCodec codec, Writer out, org.yaml.snakeyaml.DumperOptions.Version version)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.yaml.snakeyaml.events.ScalarEvent
    _scalarEvent(String value, org.yaml.snakeyaml.DumperOptions.ScalarStyle style)
     
    void
     
    void
    Brutal hack, as default behavior has lead to the following: - !<http://midpoint.evolveum.com/xml/ns/public/model/scripting-3/SearchExpressionType> !<http://midpoint.evolveum.com/xml/ns/public/model/scripting-3/SearchExpressionType> '@element': "http://midpoint.evolveum.com/xml/ns/public/model/scripting-3#search" (so we need to explicitly reset typeId after writing it)

    Methods inherited from class com.fasterxml.jackson.dataformat.yaml.YAMLGenerator

    _emit, _emitEndDocument, _emitStartDocument, _lf, _releaseBuffers, _verifyValueWrite, _writeScalar, buildDumperOptions, canUseSchema, canWriteFormattedNumbers, canWriteObjectId, canWriteTypeId, close, configure, disable, enable, flush, getFormatFeatures, getOutputBuffered, getOutputTarget, getWriteCapabilities, isEnabled, overrideFormatFeatures, setPrettyPrinter, useDefaultPrettyPrinter, version, writeBinary, writeBoolean, writeEndArray, writeEndObject, writeFieldId, writeFieldName, writeFieldName, writeNull, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeObjectId, writeObjectRef, writeRaw, writeRaw, writeRaw, writeRaw, writeRawUTF8String, writeRawValue, writeRawValue, writeRawValue, writeStartArray, writeStartObject, writeString, writeString, writeString, writeTypeId, writeUTF8String

    Methods inherited from class com.fasterxml.jackson.core.base.GeneratorBase

    _asString, _checkRangeBoundsForByteArray, _checkRangeBoundsForCharArray, _checkRangeBoundsForString, _checkStdFeatureChanges, _constructDefaultPrettyPrinter, _decodeSurrogate, disable, enable, getCodec, getCurrentValue, getFeatureMask, getOutputContext, isClosed, isEnabled, overrideStdFeatures, setCodec, setCurrentValue, setFeatureMask, writeBinary, writeObject, writeRawValue, writeStartObject, writeTree

    Methods inherited from class com.fasterxml.jackson.core.JsonGenerator

    _copyCurrentContents, _reportError, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, assignCurrentValue, canOmitFields, canWriteBinaryNatively, configure, copyCurrentEvent, copyCurrentStructure, currentValue, getCharacterEscapes, getHighestEscapedChar, getPrettyPrinter, getSchema, isEnabled, setCharacterEscapes, setHighestNonEscapedChar, setRootValueSeparator, setSchema, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeEmbeddedObject, writeNullField, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeOmittedField, writePOJO, writePOJOField, writeRaw, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeString, writeStringField, writeTypePrefix, writeTypeSuffix

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MidpointYAMLGenerator

      public MidpointYAMLGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, int jsonFeatures, int yamlFeatures, com.fasterxml.jackson.core.ObjectCodec codec, Writer out, org.yaml.snakeyaml.DumperOptions.Version version) throws IOException
      Throws:
      IOException
  • Method Details

    • resetTypeId

      public void resetTypeId()
      Brutal hack, as default behavior has lead to the following: - !<http://midpoint.evolveum.com/xml/ns/public/model/scripting-3/SearchExpressionType> !<http://midpoint.evolveum.com/xml/ns/public/model/scripting-3/SearchExpressionType> '@element': "http://midpoint.evolveum.com/xml/ns/public/model/scripting-3#search" (so we need to explicitly reset typeId after writing it)
    • _scalarEvent

      protected org.yaml.snakeyaml.events.ScalarEvent _scalarEvent(String value, org.yaml.snakeyaml.DumperOptions.ScalarStyle style)
      Overrides:
      _scalarEvent in class com.fasterxml.jackson.dataformat.yaml.YAMLGenerator
    • newDocument

      public void newDocument() throws IOException
      Throws:
      IOException