Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlFactoryHook$ThreadContext


    //
    //

    public XmlObject newInstance ( SchemaType type, XmlOptions options )
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.newInstance( this, type, options );

        return createNewStore( type, options ).getObject();
    }
View Full Code Here


        return createNewStore( type, options ).getObject();
    }

    public XmlObject parse ( String xmlText, SchemaType type, XmlOptions options ) throws XmlException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.parse( this, xmlText, type, options );

        return createNewStore( null, options ).loadXml( xmlText, type, options );
    }
View Full Code Here

        return createNewStore( null, options ).loadXml( xmlText, type, options );
    }

    public XmlObject parse ( XMLInputStream xis, SchemaType type, XmlOptions options ) throws XmlException, XMLStreamException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.parse( this, xis, type, options );

        return createNewStore( null, options ).loadXml( xis, type, options );
    }
View Full Code Here

        }
    }

    public XmlObject parse ( InputStream jiois, SchemaType type, XmlOptions options ) throws XmlException, IOException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        DigestInputStream digestStream = null;
        setupDigest: if (options != null && options.hasOption(XmlOptions.LOAD_MESSAGE_DIGEST))
        {
            MessageDigest sha;
            try
            {
                sha = MessageDigest.getInstance("SHA");
            }
            catch (NoSuchAlgorithmException e)
            {
                break setupDigest;
            }

            digestStream = new DigestInputStream(jiois, sha);
            jiois = digestStream;
        }

        if (hook != null)
            return hook.parse( this, jiois, type, options );

        XmlObject result = createNewStore( null, options ).loadXml( jiois, type, options );

        if (digestStream != null)
            result.documentProperties().setMessageDigest(digestStream.getMessageDigest().digest());
View Full Code Here

        return result;
    }

    public XmlObject parse ( Reader jior, SchemaType type, XmlOptions options ) throws XmlException, IOException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.parse( this, jior, type, options );

        return createNewStore( null, options ).loadXml( jior, type, options );
    }
View Full Code Here

        return createNewStore( null, options ).loadXml( jior, type, options );
    }

    public XmlObject parse ( Node node, SchemaType type, XmlOptions options ) throws XmlException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.parse( this, node, type, options );

        return createNewStore( null, options ).loadXml( node, type, options );
    }
View Full Code Here

        return createNewStore( null, options ).loadXml( node, type, options );
    }

    public XmlSaxHandler newXmlSaxHandler ( SchemaType type, XmlOptions options )
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.newXmlSaxHandler( this, type, options );

        return createNewStore( null, options ).newSaxHandler( type, options );
    }
View Full Code Here

    //
    //

    public XmlObject newInstance ( SchemaType type, XmlOptions options )
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.newInstance( this, type, options );

        return createNewStore( type, options ).getObject();
    }
View Full Code Here

        return createNewStore( type, options ).getObject();
    }

    public XmlObject parse ( String xmlText, SchemaType type, XmlOptions options ) throws XmlException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.parse( this, xmlText, type, options );

        return createNewStore( null, options ).loadXml( xmlText, type, options );
    }
View Full Code Here

        return createNewStore( null, options ).loadXml( xmlText, type, options );
    }

    public XmlObject parse ( XMLInputStream xis, SchemaType type, XmlOptions options ) throws XmlException, XMLStreamException
    {
        XmlFactoryHook hook = XmlFactoryHook.ThreadContext.getHook();
        if (hook != null)
            return hook.parse( this, xis, type, options );

        return createNewStore( null, options ).loadXml( xis, type, options );
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.XmlFactoryHook$ThreadContext

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.