private Encoding.Presence mapPresence(final Presence presence)
    {
        Encoding.Presence encodingPresence = Encoding.Presence.REQUIRED;

        if (null != presence)
        {
            switch (presence)
            {
                case OPTIONAL:
                    encodingPresence = Encoding.Presence.OPTIONAL;
                    break;

                case CONSTANT:
                    encodingPresence = Encoding.Presence.CONSTANT;
                    break;

                default:
                    break;
            }
        }

        return encodingPresence;
    }
Generate a complete {@link uk.co.real_logic.sbe.ir.Ir} for a given schema.

@param schema from which the {@link uk.co.real_logic.sbe.ir.Ir} should be generated.
@return complete {@link uk.co.real_logic.sbe.ir.Ir} for a given schema.
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/IrGenerator.java