Beispiel #1
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            IList <string> lines = SwiftParseUtils.getLines(value);

            if (lines.Count == 0)
            {
                return;
            }
            Component1 = lines[0];
            if (lines.Count > 1)
            {
                setComponent2(lines[1]);
            }
            if (lines.Count > 2)
            {
                string toparse = lines[2];
                if (toparse != null && toparse.Length >= 4)
                {
                    setComponent3(StringUtils.Substring(toparse, 0, 4));
                    if (toparse.Length > 4)
                    {
                        setComponent4(StringUtils.Substring(toparse, 4 - toparse));
                    }
                }
                else
                {
                    setComponent3(toparse);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(3);
            Component1 = SwiftParseUtils.getTokenFirst(value, ":", "/");
            Component2 = SwiftParseUtils.getTokenSecond(value, "/");
            Component3 = SwiftParseUtils.getTokenThirdLast(value, "/");
        }
Beispiel #3
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            IList <string> lines = SwiftParseUtils.getLines(value);

            SwiftParseUtils.setComponentsFromLines(this, 1, null, 0, lines);
        }
Beispiel #4
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            if (value != null)
            {
                string left;
                string right = null;
                if (value.IndexOf('/') >= 0)
                {
                    left  = SwiftParseUtils.getTokenFirst(value, "/");
                    right = SwiftParseUtils.getTokenSecondLast(value, "/");
                }
                else
                {
                    left = value;
                }
                Component1 = SwiftParseUtils.getAlphaPrefix(left);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String second = getComponent1() == null ? left : org.apache.commons.lang3.StringUtils.substringAfter(left, getComponent1());
                string second = Component1 == null ? left : StringUtils.substringAfter(left, Component1);
                setComponent2(second);
                if (right != null)
                {
                    setComponent3(SwiftParseUtils.getTokenFirst(right, "/"));
                    Component4 = SwiftParseUtils.getTokenSecondLast(right, "/");
                }
            }
        }
Beispiel #5
0
        public virtual Field29B setNarrative(string value)
        {
            IList <string> lines = SwiftParseUtils.getLines(value);

            SwiftParseUtils.setComponentsFromLines(this, 1, 4, 0, lines);
            return(this);
        }
Beispiel #6
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            if (value != null)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String toparse = com.prowidesoftware.swift.model.field.SwiftParseUtils.getAlphaPrefix(value);
                string toparse = SwiftParseUtils.getAlphaPrefix(value);
                if (toparse != null && toparse.Length > 0)
                {
                    if (toparse.Length > 0)
                    {
                        Component1 = StringUtils.Substring(toparse, 0, 1);
                        if (toparse.Length >= 4)
                        {
                            Component2 = StringUtils.Substring(toparse, 1, 4);
                            if (toparse.Length > 4)
                            {
                                Component3 = StringUtils.Substring(toparse, 4 - toparse);
                            }
                        }
                        else
                        {
                            Component2 = StringUtils.Substring(toparse, 1 - toparse);
                        }
                    }
                }
                setComponent4(SwiftParseUtils.getNumericSuffix(value));
            }
        }
Beispiel #7
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(5);
            Component1 = SwiftParseUtils.getTokenFirst(value, null, "/");
            Component2 = SwiftParseUtils.getTokenSecond(value, "/");
            string toparse = SwiftParseUtils.getTokenThirdLast(value, "/");

            if (toparse != null)
            {
                if (toparse.Length < 5)
                {
                    Component3 = toparse;
                }
                if (toparse.Length >= 5)
                {
                    Component3 = StringUtils.Substring(toparse, 0, 5);
                }
                if (toparse.Length > 5 && toparse.Length < 9)
                {
                    Component4 = StringUtils.Substring(toparse, 5 - toparse);
                }
                if (toparse.Length >= 9)
                {
                    Component4 = StringUtils.Substring(toparse, 5, 9);
                }
                if (toparse.Length > 9)
                {
                    Component5 = StringUtils.Substring(toparse, 9 - toparse);
                }
            }
        }
Beispiel #8
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(3);
            Component1 = SwiftParseUtils.getTokenFirst(value, ":", "//");
            string toparse = SwiftParseUtils.getTokenSecondLast(value, "//");

            Component2 = SwiftParseUtils.getTokenFirst(toparse, "/");
            setComponent3(SwiftParseUtils.getTokenSecondLast(toparse, "/"));
        }
Beispiel #9
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(3);
            Component1 = SwiftParseUtils.getTokenFirst(value, ":", "//");
            string toparse = SwiftParseUtils.getTokenSecondLast(value, "//");

            setComponent2(SwiftParseUtils.getAlphaPrefix(toparse));
            setComponent3(SwiftParseUtils.getNumericSuffix(toparse));
        }
Beispiel #10
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(2);
            IList <string> lines = SwiftParseUtils.getLines(value);

            if (lines.Count > 0)
            {
                Component1 = lines[0];
                if (lines.Count > 1)
                {
                    setComponent2(lines[1]);
                }
            }
        }
Beispiel #11
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            IList <string> lines = SwiftParseUtils.getLines(value);

            if (lines.Count > 0)
            {
                setComponent1(SwiftParseUtils.getTokenFirst(lines[0], "/", "/"));
                Component2 = SwiftParseUtils.getTokenSecondLast(lines[0], "/", "/");
                if (lines.Count > 1)
                {
                    setComponent3(SwiftParseUtils.getTokenFirst(lines[1], "/", "/"));
                    Component4 = SwiftParseUtils.getTokenSecondLast(lines[1], "/", "/");
                }
            }
        }
Beispiel #12
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            Component1 = SwiftParseUtils.getTokenFirst(value, null, "/");
            string toparse = SwiftParseUtils.getTokenSecondLast(value, "/");

            if (StringUtils.isNotBlank(toparse))
            {
                Component2 = SwiftParseUtils.getTokenFirst(toparse, null, "/");
                string toparse2 = SwiftParseUtils.getTokenSecondLast(toparse, "/");
                if (StringUtils.isNotBlank(toparse2))
                {
                    Component3 = SwiftParseUtils.getTokenFirst(toparse2, null, "/");
                    setComponent4(SwiftParseUtils.getTokenSecondLast(toparse2, "/"));
                }
            }
        }
Beispiel #13
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(3);
            IList <string> lines = SwiftParseUtils.getLines(value);

            if (lines.Count > 0)
            {
                setComponent1(lines[0]);
                if (lines.Count > 1)
                {
                    Component2 = lines[1];
                }
                if (lines.Count > 2)
                {
                    Component3 = lines[2];
                }
            }
        }
Beispiel #14
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            Component1 = SwiftParseUtils.getTokenFirst(value, ":", "//");
            string toparse = SwiftParseUtils.getTokenSecondLast(value, "//");
            string alpha   = SwiftParseUtils.getAlphaPrefix(toparse);

            if (alpha != null && alpha.Length >= 4)
            {
                //optional letter
                Component2 = StringUtils.Substring(alpha, 0, 1);
                //remaining string
                setComponent3(StringUtils.Substring(alpha, 1 - alpha));
            }
            else if (toparse != null && toparse.Length >= 3)
            {
                //optional letter not present
                setComponent3(alpha);
            }
            setComponent4(SwiftParseUtils.getNumericSuffix(toparse));
        }
Beispiel #15
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(4);
            Component1 = SwiftParseUtils.getTokenFirst(value, "/", "/");
            string toparse = SwiftParseUtils.getTokenSecondLast(SwiftParseUtils.removePrefix(value, "/"), "/");

            if (toparse != null)
            {
                if (toparse.Length >= 4)
                {
                    setComponent2(StringUtils.Substring(toparse, 0, 4));
                }
                if (toparse.Length >= 5)
                {
                    Component3 = StringUtils.Substring(toparse, 4, 5);
                }
                if (toparse.Length > 5)
                {
                    setComponent4(StringUtils.Substring(toparse, 5 - toparse));
                }
            }
        }
Beispiel #16
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(1);
            Component1 = SwiftParseUtils.getTokenFirst(value, "/", null);
        }
Beispiel #17
0
        public virtual IList <string> getLinesBetween(int start, int end, int offset)
        {
            Field29B cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, start, end, offset)));
        }
Beispiel #18
0
        public virtual IList <string> getLines(int offset)
        {
            Field29B cp = newInstance(this);

            return(SwiftParseUtils.getLines(getLine(cp, null, null, offset)));
        }
Beispiel #19
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(2);
            setComponent1(SwiftParseUtils.getTokenFirst(value, "/"));
            setComponent2(SwiftParseUtils.getTokenSecond(value, "/"));
        }
Beispiel #20
0
        /// <summary>
        /// Parses the parameter value into the internal components structure.
        /// <br>
        /// Used to update all components from a full new value, as an alternative
        /// to setting individual components. Previous component values are overwritten.
        /// </summary>
        /// <param name="value"> complete field value including separators and CRLF
        /// @since 7.8 </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public void parse(final String value)
        public override void parse(string value)
        {
            init(2);
            Component1 = SwiftParseUtils.getAlphaPrefix(value);
            setComponent2(SwiftParseUtils.getNumericSuffix(value));
        }