Package org.exolab.castor.util

Examples of org.exolab.castor.util.DTDResolver


     * @param databaseURL URL string for JDO database mapping file.
     */
    public void setDatabase(final String databaseURL) throws DTXException {
        Unmarshaller unm = new Unmarshaller(Database.class);

        unm.setEntityResolver(new DTDResolver());

        try {
            _database = (Database) unm.unmarshal(
                    new InputSource(new URL(databaseURL).openStream()));
        } catch (Exception except) {
View Full Code Here


        _jdoConfBaseURL = source.getSystemId();
       
        CpactfConf cpactfconf = null;
        try {
            Unmarshaller unmarshaller = new Unmarshaller(CpactfConf.class);
            unmarshaller.setEntityResolver(new DTDResolver(null));
            cpactfconf = (CpactfConf) unmarshaller.unmarshal(source);
        } catch (MarshalException e) {
            throw new CPAConfigException(e);
        } catch (ValidationException e) {
            throw new CPAConfigException(e);
View Full Code Here

     * from within mapping files.
     *
     * @param resolver The entity resolver to use
     */
    public void setEntityResolver(final EntityResolver resolver) {
        _resolver = new DTDResolver(resolver);
    }
View Full Code Here

        // Load the JDO configuration file from the specified input source.
        JdoConf jdoConf = null;
       
        Unmarshaller unmarshaller = new Unmarshaller(JdoConf.class);
        try {
            unmarshaller.setEntityResolver(new DTDResolver(resolver));
            jdoConf = (JdoConf) unmarshaller.unmarshal(source);
        } catch (MarshalException e) {
            LOG.info(NOTE_096);
            throw new MappingException(e);
        } catch (ValidationException e) {
View Full Code Here

    public Mapping( ClassLoader loader )
    {
        if ( loader == null )
            loader = getClass().getClassLoader();
        _loader = loader;
        _resolver = new DTDResolver();
        _idResolver = new ClassMappingResolver();
    }
View Full Code Here

     *
     * @param resolver The entity resolver to use
     */
    public void setEntityResolver( EntityResolver resolver )
    {
        _resolver = new DTDResolver( resolver );
    }
View Full Code Here

            unmarshaller = new Unmarshaller (JdoConf.class);
            try {
               
                if (resolver == null)
                    unmarshaller.setEntityResolver (new DTDResolver());
                else
                    unmarshaller.setEntityResolver (new DTDResolver (resolver));
                   
                _jdoConf = (JdoConf) unmarshaller.unmarshal (source);
            }
            catch (MarshalException e) {
                throw new MappingException (e);
View Full Code Here

        try {
            // Load the JDO database configuration file from the specified
            // input source. If the database was already configured, ignore
            // this file (allowing multiple loadings).
            if ( resolver == null )
                unm.setEntityResolver( new DTDResolver() );
            else
                unm.setEntityResolver( new DTDResolver( resolver ) );
            database = (Database) unm.unmarshal( source );
            if ( _databases.get( database.getName() ) != null )
                return;

            // Complain if no database engine was specified, otherwise get
View Full Code Here

    public Mapping( ClassLoader loader )
    {
        if ( loader == null )
            loader = getClass().getClassLoader();
        _loader = loader;
        _resolver = new DTDResolver();
        _idResolver = new ClassMappingResolver();
    }
View Full Code Here

     *
     * @param resolver The entity resolver to use
     */
    public void setEntityResolver( EntityResolver resolver )
    {
        _resolver = new DTDResolver( resolver );
    }
View Full Code Here

TOP

Related Classes of org.exolab.castor.util.DTDResolver

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.