Package org.apache.xmlbeans.impl.newstore2

Examples of org.apache.xmlbeans.impl.newstore2.Locale$SaxHandler


        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory();

        _locations = new Locations( this );

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption( XmlOptions.VALIDATE_ON_SET );
       
View Full Code Here


        return _saaj == null ? new TextNode( this ) : new SaajTextNode( this );
    }

    CdataNode createCdataNode ( )
    {
        return _saaj == null ? new CdataNode( this ) : new SaajCdataNode( this );
    }
View Full Code Here

    {
        assert node.getDom() != null && node.getDom().locale() == _locale;

        moveToDom( node.getDom() );

        CharNode n;

        _xobj.ensureOccupancy();

        n = _xobj._charNodesValue =
            updateCharNodes( _locale, _xobj, _xobj._charNodesValue, _xobj._cchValue );
View Full Code Here

        assert isPositioned();
        assert !isRoot();

        Xobj x = getDenormal();

        CharNode nodes;

        if (_posTemp >= x.posAfter())
        {
            nodes = x._charNodesAfter =
                updateCharNodes( _locale, x, x._charNodesAfter, x._cchAfter );
View Full Code Here

    private static CharNode updateCharNodes ( Locale l, Xobj x, CharNode nodes, int cch )
    {
        assert nodes == null || nodes.locale() == l;

        CharNode node = nodes;
        int i = 0;

        while ( node != null && cch > 0 )
        {
            assert node.getDom() == x;

            if (node._cch > cch)
                node._cch = cch;

            node._off = i;
            i += node._cch;
            cch -= node._cch;

            node = node._next;
        }

        if (cch <= 0)
        {
            for ( ; node != null ; node = node._next )
            {
                assert node.getDom() == x;

                if (node._cch != 0)
                    node._cch = 0;

                node._off = i;
            }
        }
        else
        {
            node = l.createTextNode();
            node.setDom( (Dom) x );
            node._cch = cch;
            node._off = i;
            nodes = CharNode.appendNode( nodes, node );
        }
View Full Code Here

    public static Document parse ( String s )
        throws XmlException
    {
        Locale l = newLocale();

        Dom d;

        if (l.noSync())         { l.enter(); try { d = l.load( s ); } finally { l.exit(); } }
        else synchronized ( l ) { l.enter(); try { d = l.load( s ); } finally { l.exit(); } }

        return (Document) d;
View Full Code Here

    public static Document parse ( String s, XmlOptions options )
        throws XmlException
    {
        Locale l = newLocale();

        Dom d;

        if (l.noSync())         { l.enter(); try { d = l.load( s, options ); } finally { l.exit(); } }
        else synchronized ( l ) { l.enter(); try { d = l.load( s, options ); } finally { l.exit(); } }

        return (Document) d;
View Full Code Here

    public static Document parse ( String s, Saaj saaj )
        throws XmlException
    {
        Locale l = newLocale( saaj );

        Dom d;

        if (l.noSync())         { l.enter(); try { d = l.load( s ); } finally { l.exit(); } }
        else synchronized ( l ) { l.enter(); try { d = l.load( s ); } finally { l.exit(); } }

        return (Document) d;
View Full Code Here

    public static Document parse ( InputStream is, XmlOptions options )
        throws XmlException, IOException
    {
        Locale l = newLocale();

        Dom d;

        if (l.noSync())         { l.enter(); try { d = l.load( is, options ); } finally { l.exit(); } }
        else synchronized ( l ) { l.enter(); try { d = l.load( is, options ); } finally { l.exit(); } }

        return (Document) d;
View Full Code Here

    public static Document parse ( InputStream is, Saaj saaj )
        throws XmlException, IOException
    {
        Locale l = newLocale( saaj );

        Dom d;

        if (l.noSync())         { l.enter(); try { d = l.load( is ); } finally { l.exit(); } }
        else synchronized ( l ) { l.enter(); try { d = l.load( is ); } finally { l.exit(); } }

        return (Document) d;
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.impl.newstore2.Locale$SaxHandler

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.