Examples of MappingLoader


Examples of org.exolab.castor.mapping.MappingLoader

            Mapping mapping = new Mapping();
            mapping.loadMapping(srcMapping);
            ClassDescriptorResolver classDescriptorResolver = ClassDescriptorResolverFactory
                    .createClassDescriptorResolver(BindingType.XML);
            MappingUnmarshaller mappingUnmarshaller = new MappingUnmarshaller();
            MappingLoader mappingLoader = mappingUnmarshaller.getMappingLoader(
                    mapping, BindingType.XML);
            classDescriptorResolver.setMappingLoader(mappingLoader);

            Unmarshaller unmarshaller = new Unmarshaller();
            unmarshaller
View Full Code Here

Examples of org.exolab.castor.mapping.MappingLoader

            LOG.warn(message);
            throw new IllegalStateException(message);
        }

        MappingUnmarshaller mum = new MappingUnmarshaller();
        MappingLoader resolver = mum.getMappingLoader(mapping, BindingType.XML);
        getInternalContext().getXMLClassDescriptorResolver().setMappingLoader(resolver);
    }
View Full Code Here

Examples of org.exolab.castor.mapping.MappingLoader

            throw ise;
        }
        this.classDescriptorResolver =
        ClassDescriptorResolverFactory.createClassDescriptorResolver(BindingType.XML);
     MappingUnmarshaller mappingUnmarshaller = new MappingUnmarshaller();
     MappingLoader mappingLoader = mappingUnmarshaller.getMappingLoader(mapping, BindingType.XML);
     classDescriptorResolver.setMappingLoader(mappingLoader);
    }
View Full Code Here

Examples of org.exolab.castor.mapping.MappingLoader

            throw ise;
        }
        this.classDescriptorResolver =
        ClassDescriptorResolverFactory.createClassDescriptorResolver(BindingType.XML);
     MappingUnmarshaller mappingUnmarshaller = new MappingUnmarshaller();
     MappingLoader mappingLoader = mappingUnmarshaller.getMappingLoader(mapping, BindingType.XML);
     classDescriptorResolver.setMappingLoader(mappingLoader);
    }
View Full Code Here

Examples of org.exolab.castor.mapping.MappingLoader

            throw ise;
        }
        this.classDescriptorResolver =
        ClassDescriptorResolverFactory.createClassDescriptorResolver(BindingType.XML);
     MappingUnmarshaller mappingUnmarshaller = new MappingUnmarshaller();
     MappingLoader mappingLoader = mappingUnmarshaller.getMappingLoader(mapping, BindingType.XML);
     classDescriptorResolver.setMappingLoader(mappingLoader);
    }
View Full Code Here

Examples of org.exolab.castor.mapping.MappingLoader

            throw ise;
        }
        this.classDescriptorResolver =
        ClassDescriptorResolverFactory.createClassDescriptorResolver(BindingType.XML);
     MappingUnmarshaller mappingUnmarshaller = new MappingUnmarshaller();
     MappingLoader mappingLoader = mappingUnmarshaller.getMappingLoader(mapping, BindingType.XML);
     classDescriptorResolver.setMappingLoader(mappingLoader);
    }
View Full Code Here

Examples of org.exolab.castor.mapping.MappingLoader

            throw ise;
        }
        this.classDescriptorResolver =
        ClassDescriptorResolverFactory.createClassDescriptorResolver(BindingType.XML);
     MappingUnmarshaller mappingUnmarshaller = new MappingUnmarshaller();
     MappingLoader mappingLoader = mappingUnmarshaller.getMappingLoader(mapping, BindingType.XML);
     classDescriptorResolver.setMappingLoader(mappingLoader);
    }
View Full Code Here

Examples of org.exolab.castor.mapping.loader.MappingLoader

        if ( _mapping == null )
            throw new MappingException( "Must call loadMapping first" );
        resolver = (MappingResolver) _resolvers.get( engine );
        if ( resolver == null ) {
            MappingLoader loaderImpl;
            Class         loaderClass;
            Constructor   loaderConst;

            try {
                if (_loader != null)
                    loaderClass = _loader.loadClass(engine.getLoaderClass() );
                else
                    loaderClass = Class.forName(engine.getLoaderClass());

                loaderConst = loaderClass.getConstructor( new Class[] { ClassLoader.class, PrintWriter.class } );
                loaderImpl = (MappingLoader) loaderConst.newInstance( new Object[] { _loader, _logWriter } );
                // Put loader in hash table first, so we don't get an error message if this
                // method is called a second time
                resolver = loaderImpl;
                _resolvers.put( engine, resolver );
                loaderImpl.setAllowRedefinitions(_allowRedefinitions);
                loaderImpl.loadMapping( _mapping, param );
            }
            catch ( Exception except ) {
                throw new MappingException( except );
            }
        }
View Full Code Here

Examples of org.exolab.castor.mapping.loader.MappingLoader

        if ( _mapping == null )
            throw new MappingException( "Must call loadMapping first" );
        resolver = (MappingResolver) _resolvers.get( engine );
        if ( resolver == null ) {
            MappingLoader loaderImpl;
            Class         loaderClass;
            Constructor   loaderConst;

            try {
                if (_loader != null)
                    loaderClass = _loader.loadClass(engine.getLoaderClass() );
                else
                    loaderClass = Class.forName(engine.getLoaderClass());

                loaderConst = loaderClass.getConstructor( new Class[] { ClassLoader.class, PrintWriter.class } );
                loaderImpl = (MappingLoader) loaderConst.newInstance( new Object[] { _loader, _logWriter } );
                // Put loader in hash table first, so we don't get an error message if this
                // method is called a second time
                resolver = loaderImpl;
                _resolvers.put( engine, resolver );
                loaderImpl.setAllowRedefinitions(_allowRedefinitions);
                loaderImpl.loadMapping( _mapping, param );
            }
            catch ( Exception except ) {
                throw new MappingException( except );
            }
        }
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingLoader

    final String groupName = tableRecord.getFullName();
        if(tableRecord.isVirtual()) {
            // get mappin transform
            String document = tableRecord.getSelectTransformation();           
            InputStream inputStream = new ByteArrayInputStream(document.getBytes());
            MappingLoader reader = new MappingLoader();
            MappingDocument mappingDoc = null;
            try{
                mappingDoc = reader.loadDocument(inputStream);
                mappingDoc.setName(groupName);
            } catch (Exception e){
                throw new TeiidComponentException(e, QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
            } finally {
              try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.