Esempio n. 1
0
        /// <summary>
        /// Copy constructor.<br>
        /// Initializes the components list with a deep copy of the source components list. </summary>
        /// <param name="source"> a field instance to copy
        /// @since 7.7 </param>
        public static Field29A newInstance(Field29A source)
        {
            Field29A cp = new Field29A();

            cp.Components = new List <>(source.Components);
            return(cp);
        }
Esempio n. 2
0
        public static Field29A fromJson(string json)
        {
            Field29A   field      = new Field29A();
            JsonParser parser     = new JsonParser();
            JsonObject jsonObject = (JsonObject)parser.parse(json);

            if (jsonObject.get("narrative") != null)
            {
                field.Component1 = jsonObject.get("narrative").AsString;
            }
            if (jsonObject.get("narrative2") != null)
            {
                field.Component2 = jsonObject.get("narrative2").AsString;
            }
            if (jsonObject.get("narrative3") != null)
            {
                field.Component3 = jsonObject.get("narrative3").AsString;
            }
            if (jsonObject.get("narrative4") != null)
            {
                field.Component4 = jsonObject.get("narrative4").AsString;
            }
            return(field);
        }
Esempio n. 3
0
        public virtual IList <string> getLinesBetween(int start, int end, int offset)
        {
            Field29A cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, start, end, offset)));
        }
Esempio n. 4
0
        public virtual IList <string> getLines(int offset)
        {
            Field29A cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, null, null, offset)));
        }
Esempio n. 5
0
        public virtual string getLine(int line, int offset)
        {
            Field29A cp = newInstance(this);

            return(getLine(cp, line, null, offset));
        }