Package org.apache.xmlbeans.impl.values

Examples of org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException


                {
                    result[i] = Integer.parseInt(dimString);
                }
                catch (Exception e)
                {
                    throw new XmlValueOutOfRangeException("Malformed integer in SOAP array index");
                }
            }
        }
        return result;
    }
View Full Code Here


     */
    public SOAPArrayType(String s, PrefixResolver m)
    {
        int firstbrace = s.indexOf('[');
        if (firstbrace < 0)
            throw new XmlValueOutOfRangeException();

        // grab the QName
        String firstpart = XmlWhitespace.collapse(s.substring(0, firstbrace), XmlWhitespace.WS_COLLAPSE);
        int firstcolon = firstpart.indexOf(':');
        String prefix = "";
        if (firstcolon >= 0)
            prefix = firstpart.substring(0, firstcolon);

        String uri = m.getNamespaceForPrefix(prefix);
        if (uri == null)
            throw new XmlValueOutOfRangeException();

        _type = QNameHelper.forLNS(firstpart.substring(firstcolon + 1), uri);

        initDimensions(s, firstbrace);
    }
View Full Code Here

                    {
                        _dimensions[i] = Integer.parseInt(dimStrings[i]);
                    }
                    catch (Exception e)
                    {
                        throw new XmlValueOutOfRangeException();
                    }
                }
            }
        }
        else
View Full Code Here

        int lastbrace = -1;
        for (int i = firstbrace; i >= 0; )
        {
            lastbrace = s.indexOf(']', i);
            if (lastbrace < 0)
                throw new XmlValueOutOfRangeException();
            braces.add(s.substring(i + 1, lastbrace));
            i = s.indexOf('[', lastbrace);
        }

        String trailer = s.substring(lastbrace + 1);
        if (!XmlWhitespace.isAllSpace(trailer))
            throw new XmlValueOutOfRangeException();

        // now fill in rank array
        _ranks = new int[braces.size() - 1];
        for (int i = 0; i < _ranks.length; i++)
        {
            String commas = (String)braces.get(i);
            int commacount = 0;
            for (int j = 0; j < commas.length(); j++)
            {
                char ch = commas.charAt(j);
                if (ch == ',')
                    commacount += 1;
                else if (!XmlWhitespace.isSpace(ch))
                    throw new XmlValueOutOfRangeException();
            }
            _ranks[i] = commacount + 1;
        }

        // finally fill in dimension array
View Full Code Here

                {
                    dimensions[i] = Integer.parseInt(dimStrings[i]);
                }
                catch (Exception e)
                {
                    throw new XmlValueOutOfRangeException();
                }
            }
        }
        SOAPArrayType sot = new SOAPArrayType();
        sot._ranks = ranks;
View Full Code Here

                {
                    result[i] = Integer.parseInt(dimString);
                }
                catch (Exception e)
                {
                    throw new XmlValueOutOfRangeException("Malformed integer in SOAP array index");
                }
            }
        }
        return result;
    }
View Full Code Here

     */
    public SOAPArrayType(String s, PrefixResolver m)
    {
        int firstbrace = s.indexOf('[');
        if (firstbrace < 0)
            throw new XmlValueOutOfRangeException();

        // grab the QName
        String firstpart = XmlWhitespace.collapse(s.substring(0, firstbrace), XmlWhitespace.WS_COLLAPSE);
        int firstcolon = firstpart.indexOf(':');
        String prefix = "";
        if (firstcolon >= 0)
            prefix = firstpart.substring(0, firstcolon);

        String uri = m.getNamespaceForPrefix(prefix);
        if (uri == null)
            throw new XmlValueOutOfRangeException();

        _type = QNameHelper.forLNS(firstpart.substring(firstcolon + 1), uri);

        initDimensions(s, firstbrace);
    }
View Full Code Here

                    {
                        _dimensions[i] = Integer.parseInt(dimStrings[i]);
                    }
                    catch (Exception e)
                    {
                        throw new XmlValueOutOfRangeException();
                    }
                }
            }
        }
        else
View Full Code Here

        int lastbrace = -1;
        for (int i = firstbrace; i >= 0; )
        {
            lastbrace = s.indexOf(']', i);
            if (lastbrace < 0)
                throw new XmlValueOutOfRangeException();
            braces.add(s.substring(i + 1, lastbrace));
            i = s.indexOf('[', lastbrace);
        }

        String trailer = s.substring(lastbrace + 1);
        if (!XmlWhitespace.isAllSpace(trailer))
            throw new XmlValueOutOfRangeException();

        // now fill in rank array
        _ranks = new int[braces.size() - 1];
        for (int i = 0; i < _ranks.length; i++)
        {
            String commas = (String)braces.get(i);
            int commacount = 0;
            for (int j = 0; j < commas.length(); j++)
            {
                char ch = commas.charAt(j);
                if (ch == ',')
                    commacount += 1;
                else if (!XmlWhitespace.isSpace(ch))
                    throw new XmlValueOutOfRangeException();
            }
            _ranks[i] = commacount + 1;
        }

        // finally fill in dimension array
View Full Code Here

                {
                    dimensions[i] = Integer.parseInt(dimStrings[i]);
                }
                catch (Exception e)
                {
                    throw new XmlValueOutOfRangeException();
                }
            }
        }
        SOAPArrayType sot = new SOAPArrayType();
        sot._ranks = ranks;
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.